Преглед изворни кода

chore: remove references to Prometheus in Helm chart (#2814)

Remove references to deprecated prometheus values. 

Signed-off-by: Sebastián Gómez <sebastiangomezcorrea@gmail.com>
Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Sebastián Gómez пре 2 година
родитељ
комит
15b68cc722

+ 3 - 6
deploy/charts/external-secrets/README.md

@@ -48,6 +48,7 @@ The command removes all the Kubernetes components associated with the chart and
 | certController.image.repository | string | `"ghcr.io/external-secrets/external-secrets"` |  |
 | certController.image.repository | string | `"ghcr.io/external-secrets/external-secrets"` |  |
 | certController.image.tag | string | `""` |  |
 | certController.image.tag | string | `""` |  |
 | certController.imagePullSecrets | list | `[]` |  |
 | certController.imagePullSecrets | list | `[]` |  |
+| certController.metrics.listen.port | int | `8080` |  |
 | certController.metrics.service.annotations | object | `{}` | Additional service annotations |
 | certController.metrics.service.annotations | object | `{}` | Additional service annotations |
 | certController.metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | certController.metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | certController.metrics.service.port | int | `8080` | Metrics service port to scrape |
 | certController.metrics.service.port | int | `8080` | Metrics service port to scrape |
@@ -58,8 +59,6 @@ The command removes all the Kubernetes components associated with the chart and
 | certController.podLabels | object | `{}` |  |
 | certController.podLabels | object | `{}` |  |
 | certController.podSecurityContext | object | `{}` |  |
 | certController.podSecurityContext | object | `{}` |  |
 | certController.priorityClassName | string | `""` | Pod priority class name. |
 | certController.priorityClassName | string | `""` | Pod priority class name. |
-| certController.prometheus.enabled | bool | `false` | deprecated. will be removed with 0.7.0, use serviceMonitor instead |
-| certController.prometheus.service.port | int | `8080` | deprecated. will be removed with 0.7.0, use serviceMonitor instead |
 | certController.rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | certController.rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | certController.readinessProbe.address | string | `""` | Address for readiness probe |
 | certController.readinessProbe.address | string | `""` | Address for readiness probe |
 | certController.readinessProbe.port | int | `8081` | ReadinessProbe port for kubelet |
 | certController.readinessProbe.port | int | `8081` | ReadinessProbe port for kubelet |
@@ -105,6 +104,7 @@ The command removes all the Kubernetes components associated with the chart and
 | imagePullSecrets | list | `[]` |  |
 | imagePullSecrets | list | `[]` |  |
 | installCRDs | bool | `true` | If set, install and upgrade CRDs through helm chart. |
 | installCRDs | bool | `true` | If set, install and upgrade CRDs through helm chart. |
 | leaderElect | bool | `false` | If true, external-secrets will perform leader election between instances to ensure no more than one instance of external-secrets operates at a time. |
 | leaderElect | bool | `false` | If true, external-secrets will perform leader election between instances to ensure no more than one instance of external-secrets operates at a time. |
+| metrics.listen.port | int | `8080` |  |
 | metrics.service.annotations | object | `{}` | Additional service annotations |
 | metrics.service.annotations | object | `{}` | Additional service annotations |
 | metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | metrics.service.port | int | `8080` | Metrics service port to scrape |
 | metrics.service.port | int | `8080` | Metrics service port to scrape |
@@ -118,8 +118,6 @@ The command removes all the Kubernetes components associated with the chart and
 | processClusterExternalSecret | bool | `true` | if true, the operator will process cluster external secret. Else, it will ignore them. |
 | processClusterExternalSecret | bool | `true` | if true, the operator will process cluster external secret. Else, it will ignore them. |
 | processClusterStore | bool | `true` | if true, the operator will process cluster store. Else, it will ignore them. |
 | processClusterStore | bool | `true` | if true, the operator will process cluster store. Else, it will ignore them. |
 | processPushSecret | bool | `true` | if true, the operator will process push secret. Else, it will ignore them. |
 | processPushSecret | bool | `true` | if true, the operator will process push secret. Else, it will ignore them. |
-| prometheus.enabled | bool | `false` | deprecated. will be removed with 0.7.0, use serviceMonitor instead. |
-| prometheus.service.port | int | `8080` | deprecated. will be removed with 0.7.0, use serviceMonitor instead. |
 | rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | rbac.servicebindings.create | bool | `true` | Specifies whether a clusterrole to give servicebindings read access should be created. |
 | rbac.servicebindings.create | bool | `true` | Specifies whether a clusterrole to give servicebindings read access should be created. |
 | replicaCount | int | `1` |  |
 | replicaCount | int | `1` |  |
@@ -172,6 +170,7 @@ The command removes all the Kubernetes components associated with the chart and
 | webhook.image.tag | string | `""` | The image tag to use. The default is the chart appVersion. |
 | webhook.image.tag | string | `""` | The image tag to use. The default is the chart appVersion. |
 | webhook.imagePullSecrets | list | `[]` |  |
 | webhook.imagePullSecrets | list | `[]` |  |
 | webhook.lookaheadInterval | string | `""` | Specifices the lookaheadInterval for certificate validity |
 | webhook.lookaheadInterval | string | `""` | Specifices the lookaheadInterval for certificate validity |
+| webhook.metrics.listen.port | int | `8080` |  |
 | webhook.metrics.service.annotations | object | `{}` | Additional service annotations |
 | webhook.metrics.service.annotations | object | `{}` | Additional service annotations |
 | webhook.metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | webhook.metrics.service.enabled | bool | `false` | Enable if you use another monitoring tool than Prometheus to scrape the metrics |
 | webhook.metrics.service.port | int | `8080` | Metrics service port to scrape |
 | webhook.metrics.service.port | int | `8080` | Metrics service port to scrape |
@@ -183,8 +182,6 @@ The command removes all the Kubernetes components associated with the chart and
 | webhook.podSecurityContext | object | `{}` |  |
 | webhook.podSecurityContext | object | `{}` |  |
 | webhook.port | int | `10250` | The port the webhook will listen to |
 | webhook.port | int | `10250` | The port the webhook will listen to |
 | webhook.priorityClassName | string | `""` | Pod priority class name. |
 | webhook.priorityClassName | string | `""` | Pod priority class name. |
-| webhook.prometheus.enabled | bool | `false` | deprecated. will be removed with 0.7.0, use serviceMonitor instead |
-| webhook.prometheus.service.port | int | `8080` | deprecated. will be removed with 0.7.0, use serviceMonitor instead |
 | webhook.rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | webhook.rbac.create | bool | `true` | Specifies whether role and rolebinding resources should be created. |
 | webhook.readinessProbe.address | string | `""` | Address for readiness probe |
 | webhook.readinessProbe.address | string | `""` | Address for readiness probe |
 | webhook.readinessProbe.port | int | `8081` | ReadinessProbe port for kubelet |
 | webhook.readinessProbe.port | int | `8081` | ReadinessProbe port for kubelet |

+ 0 - 5
deploy/charts/external-secrets/templates/NOTES.txt

@@ -6,8 +6,3 @@ or ClusterSecretStore resource (for example, by creating a 'vault' SecretStore).
 More information on the different types of SecretStores and how to configure them
 More information on the different types of SecretStores and how to configure them
 can be found in our Github: {{ .Chart.Home }}
 can be found in our Github: {{ .Chart.Home }}
 
 
-{{ if  .Values.prometheus.enabled -}}
-deprecation warning:
-> The flag `prometheus.enabled` is deprecated and will be removed in the next release.
-  Please migrate to using servicemonitor instead.
-{{ end }}

+ 2 - 2
deploy/charts/external-secrets/templates/cert-controller-deployment.yaml

@@ -54,7 +54,7 @@ spec:
           - --service-namespace={{ .Release.Namespace }}
           - --service-namespace={{ .Release.Namespace }}
           - --secret-name={{ include "external-secrets.fullname" . }}-webhook
           - --secret-name={{ include "external-secrets.fullname" . }}-webhook
           - --secret-namespace={{ .Release.Namespace }}
           - --secret-namespace={{ .Release.Namespace }}
-          - --metrics-addr=:{{ .Values.certController.prometheus.service.port }}
+          - --metrics-addr=:{{ .Values.certController.metrics.listen.port }}
           - --healthz-addr={{ .Values.certController.readinessProbe.address }}:{{ .Values.certController.readinessProbe.port }}
           - --healthz-addr={{ .Values.certController.readinessProbe.address }}:{{ .Values.certController.readinessProbe.port }}
           {{ if not .Values.crds.createClusterSecretStore -}}
           {{ if not .Values.crds.createClusterSecretStore -}}
           - --crd-names=externalsecrets.external-secrets.io
           - --crd-names=externalsecrets.external-secrets.io
@@ -68,7 +68,7 @@ spec:
             {{- end }}
             {{- end }}
           {{- end }}
           {{- end }}
           ports:
           ports:
-            - containerPort: {{ .Values.certController.prometheus.service.port }}
+            - containerPort: {{ .Values.certController.metrics.listen.port }}
               protocol: TCP
               protocol: TCP
               name: metrics
               name: metrics
           readinessProbe:
           readinessProbe:

+ 2 - 12
deploy/charts/external-secrets/templates/cert-controller-service.yaml

@@ -1,30 +1,20 @@
-{{- if or (and .Values.certController.create .Values.certController.prometheus.enabled) (and .Values.certController.create .Values.certController.metrics.service.enabled) }}
+{{- if and .Values.certController.create .Values.certController.metrics.service.enabled }}
 apiVersion: v1
 apiVersion: v1
 kind: Service
 kind: Service
 metadata:
 metadata:
   name: {{ include "external-secrets.fullname" . }}-cert-controller-metrics
   name: {{ include "external-secrets.fullname" . }}-cert-controller-metrics
   labels:
   labels:
     {{- include "external-secrets.labels" . | nindent 4 }}
     {{- include "external-secrets.labels" . | nindent 4 }}
-  {{- if .Values.certController.prometheus.enabled }}
-  annotations:
-    prometheus.io/path: "/metrics"
-    prometheus.io/scrape: "true"
-    prometheus.io/port: {{ .Values.certController.prometheus.service.port | quote }}
-  {{- else }}
   {{- with .Values.metrics.service.annotations }}
   {{- with .Values.metrics.service.annotations }}
   annotations:
   annotations:
     {{- toYaml . | nindent 4 }}
     {{- toYaml . | nindent 4 }}
   {{- end }}
   {{- end }}
-  {{- end }}
 spec:
 spec:
   type: ClusterIP
   type: ClusterIP
   ports:
   ports:
-  {{- if .Values.certController.prometheus.enabled }}
-  - port: {{ .Values.certController.prometheus.service.port }}
-  {{- else }}
   - port: {{ .Values.certController.metrics.service.port }}
   - port: {{ .Values.certController.metrics.service.port }}
-  {{- end }}
     protocol: TCP
     protocol: TCP
+    targetPort: metrics
     name: metrics
     name: metrics
   selector:
   selector:
     {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 4 }}
     {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 4 }}

+ 2 - 1
deploy/charts/external-secrets/templates/deployment.yaml

@@ -86,8 +86,9 @@ spec:
             {{- end }}
             {{- end }}
           {{- end }}
           {{- end }}
           {{- end }}
           {{- end }}
+          - --metrics-addr=:{{ .Values.metrics.listen.port }}
           ports:
           ports:
-            - containerPort: {{ .Values.prometheus.service.port }}
+            - containerPort: {{ .Values.metrics.listen.port }}
               protocol: TCP
               protocol: TCP
               name: metrics
               name: metrics
           {{- with .Values.extraEnv }}
           {{- with .Values.extraEnv }}

+ 2 - 12
deploy/charts/external-secrets/templates/service.yaml

@@ -1,4 +1,4 @@
-{{- if or .Values.prometheus.enabled .Values.metrics.service.enabled }}
+{{- if .Values.metrics.service.enabled }}
 apiVersion: v1
 apiVersion: v1
 kind: Service
 kind: Service
 metadata:
 metadata:
@@ -6,26 +6,16 @@ metadata:
   namespace: {{ .Release.Namespace | quote }}
   namespace: {{ .Release.Namespace | quote }}
   labels:
   labels:
     {{- include "external-secrets.labels" . | nindent 4 }}
     {{- include "external-secrets.labels" . | nindent 4 }}
-  {{- if .Values.prometheus.enabled }}
-  annotations:
-    prometheus.io/path: "/metrics"
-    prometheus.io/scrape: "true"
-    prometheus.io/port: {{ .Values.prometheus.service.port | quote }}
-  {{- else }}
   {{- with .Values.metrics.service.annotations }}
   {{- with .Values.metrics.service.annotations }}
   annotations:
   annotations:
     {{- toYaml . | nindent 4 }}
     {{- toYaml . | nindent 4 }}
   {{- end }}
   {{- end }}
-  {{- end }}
 spec:
 spec:
   type: ClusterIP
   type: ClusterIP
   ports:
   ports:
-    {{- if .Values.prometheus.enabled }}
-    - port: {{ .Values.prometheus.service.port }}
-    {{- else }}
     - port: {{ .Values.metrics.service.port }}
     - port: {{ .Values.metrics.service.port }}
-    {{- end }}
       protocol: TCP
       protocol: TCP
+      targetPort: metrics
       name: metrics
       name: metrics
   selector:
   selector:
     {{- include "external-secrets.selectorLabels" . | nindent 4 }}
     {{- include "external-secrets.selectorLabels" . | nindent 4 }}

+ 3 - 3
deploy/charts/external-secrets/templates/servicemonitor.yaml

@@ -9,7 +9,7 @@ metadata:
 spec:
 spec:
   type: ClusterIP
   type: ClusterIP
   ports:
   ports:
-    - port: 8080
+    - port: {{ .Values.metrics.service.port }}
       protocol: TCP
       protocol: TCP
       name: metrics
       name: metrics
   selector:
   selector:
@@ -57,7 +57,7 @@ metadata:
 spec:
 spec:
   type: ClusterIP
   type: ClusterIP
   ports:
   ports:
-    - port: 8080
+    - port: {{ .Values.webhook.metrics.service.port }}
       protocol: TCP
       protocol: TCP
       name: metrics
       name: metrics
   selector:
   selector:
@@ -106,7 +106,7 @@ metadata:
 spec:
 spec:
   type: ClusterIP
   type: ClusterIP
   ports:
   ports:
-    - port: 8080
+    - port: {{ .Values.certController.metrics.listen.port }}
       protocol: TCP
       protocol: TCP
       name: metrics
       name: metrics
   selector:
   selector:

+ 2 - 2
deploy/charts/external-secrets/templates/webhook-deployment.yaml

@@ -53,7 +53,7 @@ spec:
           - --dns-name={{ include "external-secrets.fullname" . }}-webhook.{{ .Release.Namespace }}.svc
           - --dns-name={{ include "external-secrets.fullname" . }}-webhook.{{ .Release.Namespace }}.svc
           - --cert-dir={{ .Values.webhook.certDir }}
           - --cert-dir={{ .Values.webhook.certDir }}
           - --check-interval={{ .Values.webhook.certCheckInterval }}
           - --check-interval={{ .Values.webhook.certCheckInterval }}
-          - --metrics-addr=:{{ .Values.webhook.prometheus.service.port }}
+          - --metrics-addr=:{{ .Values.webhook.metrics.listen.port }}
           - --healthz-addr={{ .Values.webhook.readinessProbe.address }}:{{ .Values.webhook.readinessProbe.port }}
           - --healthz-addr={{ .Values.webhook.readinessProbe.address }}:{{ .Values.webhook.readinessProbe.port }}
           {{- if .Values.webhook.lookaheadInterval }}
           {{- if .Values.webhook.lookaheadInterval }}
           - --lookahead-interval={{ .Values.webhook.lookaheadInterval }}
           - --lookahead-interval={{ .Values.webhook.lookaheadInterval }}
@@ -66,7 +66,7 @@ spec:
             {{- end }}
             {{- end }}
           {{- end }}
           {{- end }}
           ports:
           ports:
-            - containerPort: {{ .Values.webhook.prometheus.service.port }}
+            - containerPort: {{ .Values.webhook.metrics.listen.port }}
               protocol: TCP
               protocol: TCP
               name: metrics
               name: metrics
             - containerPort: {{ .Values.webhook.port }}
             - containerPort: {{ .Values.webhook.port }}

+ 3 - 13
deploy/charts/external-secrets/templates/webhook-service.yaml

@@ -7,12 +7,7 @@ metadata:
   labels:
   labels:
     {{- include "external-secrets-webhook.labels" . | nindent 4 }}
     {{- include "external-secrets-webhook.labels" . | nindent 4 }}
     external-secrets.io/component: webhook
     external-secrets.io/component: webhook
-  {{- if .Values.webhook.prometheus.enabled}}
-  annotations:
-    prometheus.io/path: "/metrics"
-    prometheus.io/scrape: "true"
-    prometheus.io/port: {{ .Values.prometheus.service.port | quote }}
-  {{- else }}
+  {{- if .Values.webhook.metrics.service.enabled }}
   {{- with .Values.webhook.metrics.service.annotations }}
   {{- with .Values.webhook.metrics.service.annotations }}
   annotations:
   annotations:
     {{- toYaml . | nindent 4 }}
     {{- toYaml . | nindent 4 }}
@@ -25,15 +20,10 @@ spec:
     targetPort: {{ .Values.webhook.port }}
     targetPort: {{ .Values.webhook.port }}
     protocol: TCP
     protocol: TCP
     name: webhook
     name: webhook
-  {{- if or .Values.webhook.prometheus.enabled .Values.webhook.metrics.service.enabled }}
-  {{- if .Values.webhook.prometheus.enabled }}
-  - port: {{ .Values.webhook.prometheus.service.port }}
-    targetPort: {{ .Values.webhook.prometheus.service.port }}
-  {{- else }}
+  {{- if .Values.webhook.metrics.service.enabled }}
   - port: {{ .Values.webhook.metrics.service.port }}
   - port: {{ .Values.webhook.metrics.service.port }}
-    targetPort: {{ .Values.webhook.metrics.service.port }}
-  {{- end }}
     protocol: TCP
     protocol: TCP
+    targetPort: metrics
     name: metrics
     name: metrics
   {{- end }}
   {{- end }}
   selector:
   selector:

+ 1 - 0
deploy/charts/external-secrets/tests/__snapshot__/controller_test.yaml.snap

@@ -31,6 +31,7 @@ should match snapshot of default values:
           containers:
           containers:
             - args:
             - args:
                 - --concurrent=1
                 - --concurrent=1
+                - --metrics-addr=:8080
               image: ghcr.io/external-secrets/external-secrets:v0.9.9
               image: ghcr.io/external-secrets/external-secrets:v0.9.9
               imagePullPolicy: IfNotPresent
               imagePullPolicy: IfNotPresent
               name: external-secrets
               name: external-secrets

+ 24 - 3
deploy/charts/external-secrets/tests/__snapshot__/crds_test.yaml.snap

@@ -716,6 +716,11 @@ should match snapshot of default values:
                               type: string
                               type: string
                             principalType:
                             principalType:
                               description: The type of principal to use for authentication. If left blank, the Auth struct will determine the principal type. This optional field must be specified if using workload identity.
                               description: The type of principal to use for authentication. If left blank, the Auth struct will determine the principal type. This optional field must be specified if using workload identity.
+                              enum:
+                                - ""
+                                - UserPrincipal
+                                - InstancePrincipal
+                                - Workload
                               type: string
                               type: string
                             region:
                             region:
                               description: Region is the region where vault is located.
                               description: Region is the region where vault is located.
@@ -1443,7 +1448,7 @@ should match snapshot of default values:
                           description: AWS configures this store to sync secrets using AWS Secret Manager provider
                           description: AWS configures this store to sync secrets using AWS Secret Manager provider
                           properties:
                           properties:
                             additionalRoles:
                             additionalRoles:
-                              description: AdditionalRoles is a chained list of Role ARNs which the SecretManager provider will sequentially assume before assuming Role
+                              description: AdditionalRoles is a chained list of Role ARNs which the provider will sequentially assume before assuming the Role
                               items:
                               items:
                                 type: string
                                 type: string
                               type: array
                               type: array
@@ -1522,8 +1527,19 @@ should match snapshot of default values:
                               description: AWS Region to be used for the provider
                               description: AWS Region to be used for the provider
                               type: string
                               type: string
                             role:
                             role:
-                              description: Role is a Role ARN which the SecretManager provider will assume
+                              description: Role is a Role ARN which the provider will assume
                               type: string
                               type: string
+                            secretsManager:
+                              description: SecretsManager defines how the provider behaves when interacting with AWS SecretsManager
+                              properties:
+                                forceDeleteWithoutRecovery:
+                                  description: 'Specifies whether to delete the secret without any recovery window. You can''t use both this parameter and RecoveryWindowInDays in the same call. If you don''t use either, then by default Secrets Manager uses a 30 day recovery window. see: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html#SecretsManager-DeleteSecret-request-ForceDeleteWithoutRecovery'
+                                  type: boolean
+                                recoveryWindowInDays:
+                                  description: 'The number of days from 7 to 30 that Secrets Manager waits before permanently deleting the secret. You can''t use both this parameter and ForceDeleteWithoutRecovery in the same call. If you don''t use either, then by default Secrets Manager uses a 30 day recovery window. see: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html#SecretsManager-DeleteSecret-request-RecoveryWindowInDays'
+                                  format: int64
+                                  type: integer
+                              type: object
                             service:
                             service:
                               description: Service defines which service should be used to fetch the secrets
                               description: Service defines which service should be used to fetch the secrets
                               enum:
                               enum:
@@ -1544,7 +1560,7 @@ should match snapshot of default values:
                                 type: object
                                 type: object
                               type: array
                               type: array
                             transitiveTagKeys:
                             transitiveTagKeys:
-                              description: AWS STS assume role transitive session tags. Required when multiple rules are used with SecretStore
+                              description: AWS STS assume role transitive session tags. Required when multiple rules are used with the provider
                               items:
                               items:
                                 type: string
                                 type: string
                               type: array
                               type: array
@@ -2260,6 +2276,11 @@ should match snapshot of default values:
                               type: string
                               type: string
                             principalType:
                             principalType:
                               description: The type of principal to use for authentication. If left blank, the Auth struct will determine the principal type. This optional field must be specified if using workload identity.
                               description: The type of principal to use for authentication. If left blank, the Auth struct will determine the principal type. This optional field must be specified if using workload identity.
+                              enum:
+                                - ""
+                                - UserPrincipal
+                                - InstancePrincipal
+                                - Workload
                               type: string
                               type: string
                             region:
                             region:
                               description: Region is the region where vault is located.
                               description: Region is the region where vault is located.

+ 1 - 1
deploy/charts/external-secrets/tests/cert_controller_test.yaml

@@ -56,7 +56,7 @@ tests:
           value: "--healthz-addr=:8082"
           value: "--healthz-addr=:8082"
   - it: should override metrics port
   - it: should override metrics port
     set:
     set:
-      certController.prometheus.service.port: 8888
+      certController.metrics.listen.port: 8888
     asserts:
     asserts:
       - equal:
       - equal:
           path: spec.template.spec.containers[0].args[6]
           path: spec.template.spec.containers[0].args[6]

+ 7 - 0
deploy/charts/external-secrets/tests/controller_test.yaml

@@ -47,3 +47,10 @@ tests:
       - equal:
       - equal:
           path: spec.template.spec.hostNetwork
           path: spec.template.spec.hostNetwork
           value: true
           value: true
+  - it: should override metrics port
+    set:
+      metrics.listen.port: 8888
+    asserts:
+      - equal:
+          path: spec.template.spec.containers[0].args[1]
+          value: "--metrics-addr=:8888"

+ 9 - 0
deploy/charts/external-secrets/tests/webhook_test.yaml

@@ -161,3 +161,12 @@ tests:
     templates:
     templates:
       - validatingwebhook.yaml
       - validatingwebhook.yaml
       - crds/externalsecret.yaml
       - crds/externalsecret.yaml
+  - it: should override metrics port
+    set:
+      webhook.metrics.listen.port: 8888
+    templates:
+      - webhook-deployment.yaml
+    asserts:
+      - equal:
+          path: spec.template.spec.containers[0].args[5]
+          value: "--metrics-addr=:8888"

+ 11 - 19
deploy/charts/external-secrets/values.yaml

@@ -132,13 +132,6 @@ resources: {}
   #   cpu: 10m
   #   cpu: 10m
   #   memory: 32Mi
   #   memory: 32Mi
 
 
-prometheus:
-  # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead.
-  enabled: false
-  service:
-    # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead.
-    port: 8080
-
 serviceMonitor:
 serviceMonitor:
   # -- Specifies whether to create a ServiceMonitor resource for collecting Prometheus metrics
   # -- Specifies whether to create a ServiceMonitor resource for collecting Prometheus metrics
   enabled: false
   enabled: false
@@ -177,6 +170,10 @@ serviceMonitor:
   #   action: replace
   #   action: replace
 
 
 metrics:
 metrics:
+
+  listen:
+    port: 8080
+
   service:
   service:
     # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
     # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
     enabled: false
     enabled: false
@@ -299,14 +296,12 @@ webhook:
     enabled: false
     enabled: false
     minAvailable: 1
     minAvailable: 1
     # maxUnavailable: 1
     # maxUnavailable: 1
-  prometheus:
-    # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead
-    enabled: false
-    service:
-      # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead
-      port: 8080
 
 
   metrics:
   metrics:
+
+    listen:
+      port: 8080
+
     service:
     service:
       # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
       # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
       enabled: false
       enabled: false
@@ -418,14 +413,11 @@ certController:
     minAvailable: 1
     minAvailable: 1
     # maxUnavailable: 1
     # maxUnavailable: 1
 
 
-  prometheus:
-    # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead
-    enabled: false
-    service:
-      # -- deprecated. will be removed with 0.7.0, use serviceMonitor instead
+  metrics:
+
+    listen:
       port: 8080
       port: 8080
 
 
-  metrics:
     service:
     service:
       # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
       # -- Enable if you use another monitoring tool than Prometheus to scrape the metrics
       enabled: false
       enabled: false