diff --git a/charts/mccp/templates/clusters-service/deployment.yaml b/charts/mccp/templates/clusters-service/deployment.yaml index 1d6eab35e..439c1b863 100644 --- a/charts/mccp/templates/clusters-service/deployment.yaml +++ b/charts/mccp/templates/clusters-service/deployment.yaml @@ -71,6 +71,11 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} + {{- if .Values.extraEnvVars }} + {{- with .Values.extraEnvVars }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} volumeMounts: - name: ui-server-volume mountPath: /html diff --git a/charts/mccp/values.yaml b/charts/mccp/values.yaml index 29377a74d..5bdb385f0 100644 --- a/charts/mccp/values.yaml +++ b/charts/mccp/values.yaml @@ -120,10 +120,10 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - host: "" - paths: - - path: / - pathType: ImplementationSpecific + - host: "" + paths: + - path: / + pathType: ImplementationSpecific # tls: [] # - secretName: chart-example-tls @@ -135,6 +135,12 @@ envVars: value: "true" - name: WEAVE_GITOPS_FEATURE_CLUSTER value: "true" + - name: WEAVE_GITOPS_USERS_CLIENTS_TTL + value: "30s" + +# extraEnvVars is a list of extra environment variables to set on the +# deployment. These are in addition to the envVars above. +extraEnvVars: [] networkPolicy: enabled: true diff --git a/cmd/clusters-service/app/server.go b/cmd/clusters-service/app/server.go index c1420f96d..bf5c68c78 100644 --- a/cmd/clusters-service/app/server.go +++ b/cmd/clusters-service/app/server.go @@ -431,7 +431,10 @@ func StartServer(ctx context.Context, log logr.Logger, tempDir string, p Params) clientsFactory := clustersmngr.CachedClientFactory if !p.UseK8sCachedClients { + log.Info("Using un-cached clients") clientsFactory = clustersmngr.ClientFactory + } else { + log.Info("Using cached clients") } clustersManager := clustersmngr.NewClustersManager( diff --git a/pkg/cluster/namespaces/userCache.go b/pkg/cluster/namespaces/userCache.go index 5ce20a885..37df290e4 100644 --- a/pkg/cluster/namespaces/userCache.go +++ b/pkg/cluster/namespaces/userCache.go @@ -12,7 +12,7 @@ import ( const ( cacheTTL = time.Minute - cacheResolutionTime = 5 * time.Minute + cacheResolutionTime = 30 * time.Second ) type UsersResourcesNamespaces struct {