Skip to content

Commit

Permalink
Update docs and clean up old logic
Browse files Browse the repository at this point in the history
Signed-off-by: Abhi Kapoor <[email protected]>
  • Loading branch information
abhi-kapoor committed Dec 11, 2024
1 parent 1d98ebf commit 120da92
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/kubechecks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ commonLabels: {}
configMap:
create: false
env: {}
# KUBECHECKS_ALLOWED_NAMESPACES: default,namespace-a
# KUBECHECKS_ADDITIONAL_NAMESPACES: default,namespace-a
# KUBECHECKS_ARGOCD_API_INSECURE: "false"
# KUBECHECKS_ARGOCD_API_PATH_PREFIX: /
# KUBECHECKS_ARGOCD_API_NAMESPACE: argocd
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The full list of supported environment variables is described below:

|Env Var|Description|Default Value|
|-----------|-------------|------|
|`KUBECHECKS_ALLOWED_NAMESPACES`|Run Kubechecks in namespaced scope instead of cluster scope by specifying the namespaces of the Argo application to monitor.|`[]`|
|`KUBECHECKS_ADDITIONAL_NAMESPACES`|Additional namespaces other than the ArgoCDNamespace to monitor for applications.|`[]`|
|`KUBECHECKS_ARGOCD_API_INSECURE`|Enable to use insecure connections over TLS to the ArgoCD API server.|`false`|
|`KUBECHECKS_ARGOCD_API_NAMESPACE`|ArgoCD namespace where the application watcher will read Custom Resource Definitions (CRD) for Application and ApplicationSet resources.|`argocd`|
|`KUBECHECKS_ARGOCD_API_PLAINTEXT`|Enable to use plaintext connections without TLS.|`false`|
Expand Down
2 changes: 0 additions & 2 deletions pkg/app_watcher/app_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ func NewApplicationWatcher(kubeCfg *rest.Config, vcsToArgoMap appdir.VcsToArgoMa
ctrl := ApplicationWatcher{
applicationClientset: appclientset.NewForConfigOrDie(kubeCfg),
vcsToArgoMap: vcsToArgoMap,
appInformer: []cache.SharedIndexInformer{},
appLister: []applisters.ApplicationLister{},
}

appInformer, appLister := ctrl.newApplicationInformerAndLister(time.Second*30, cfg)
Expand Down
5 changes: 0 additions & 5 deletions pkg/events/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"reflect"
"slices"
"strings"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -292,10 +291,6 @@ func (ce *CheckEvent) Process(ctx context.Context) error {
ce.logger.Info().Msgf("adding %d apps to the queue", len(ce.affectedItems.Applications))
// Produce apps onto channel
for _, app := range ce.affectedItems.Applications {
if len(ce.ctr.Config.AdditionalNamespaces) > 0 && !slices.Contains(ce.ctr.Config.AdditionalNamespaces, app.ObjectMeta.Namespace) {
ce.logger.Info().Msgf("skipping app %s, namespace %s not allowed", app.Name, app.ObjectMeta.Namespace)
continue
}
ce.queueApp(app)
}

Expand Down

0 comments on commit 120da92

Please sign in to comment.