diff --git a/charts/perfectscale-agent/Chart.yaml b/charts/perfectscale-agent/Chart.yaml index 93bd752..c32dd13 100644 --- a/charts/perfectscale-agent/Chart.yaml +++ b/charts/perfectscale-agent/Chart.yaml @@ -9,4 +9,4 @@ dependencies: - name: kube-state-metrics version: "4.16.0" repository: https://prometheus-community.github.io/helm-charts - condition: kube-state-metrics.enabled + condition: settings.deployKubeStateMetrics diff --git a/charts/perfectscale-agent/templates/deployment.yaml b/charts/perfectscale-agent/templates/deployment.yaml index 88cf97c..8aa6519 100644 --- a/charts/perfectscale-agent/templates/deployment.yaml +++ b/charts/perfectscale-agent/templates/deployment.yaml @@ -30,11 +30,13 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.settings.deployKubeStateMetrics }} initContainers: - name: depends-on image: "public.ecr.aws/perfectscale-io/alpine:3.17" command: [ 'sh' ] args: [ '-c', 'curl --retry-all-errors --retry 30 --retry-delay 5 -s {{ include "helm.exporter.ksmAddress" . }}; sleep {{ .Values.settings.initSleep | default "1s" }}' ] + {{- end }} {{- if .Values.containerSecurityContext }} securityContext: {{ toYaml .Values.containerSecurityContext | indent 12 }} diff --git a/charts/perfectscale-agent/values.yaml b/charts/perfectscale-agent/values.yaml index 7305993..431dd17 100644 --- a/charts/perfectscale-agent/values.yaml +++ b/charts/perfectscale-agent/values.yaml @@ -2,8 +2,9 @@ replicaCount: 1 image: repository: public.ecr.aws/perfectscale-io/psc-exporter pullPolicy: Always - tag: "v0.0.29" + tag: "v0.0.30" settings: + deployKubeStateMetrics: true serviceId: "psc-exporter" env: "prod" logLevel: "INFO" @@ -93,7 +94,6 @@ serviceMonitor: # labels: # prometheus: kube-prometheus kube-state-metrics: - enabled: true containerSecurityContext: allowPrivilegeEscalation: false seccompProfile: