From 2a21289eec3b56a99adf321bd0f21ae65097b51d Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Tue, 30 Apr 2024 13:46:15 +0300 Subject: [PATCH] add custom podAnnotations/labels to yaml, fix missing labels on pod itself --- mirrord-operator/Chart.yaml | 2 +- mirrord-operator/templates/deployment.yaml | 12 ++++++++++++ mirrord-operator/values.yaml | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mirrord-operator/Chart.yaml b/mirrord-operator/Chart.yaml index 4484108..d6274a1 100644 --- a/mirrord-operator/Chart.yaml +++ b/mirrord-operator/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.3.2 +version: 1.4.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/mirrord-operator/templates/deployment.yaml b/mirrord-operator/templates/deployment.yaml index b773d8d..11d1ebf 100644 --- a/mirrord-operator/templates/deployment.yaml +++ b/mirrord-operator/templates/deployment.yaml @@ -3,6 +3,8 @@ kind: Deployment metadata: labels: app: mirrord-operator + component: operator + app.kubernetes.io/component: operator {{- include "mirrord-operator.labels" . | nindent 4 }} name: mirrord-operator namespace: {{ .Values.namespace }} @@ -13,7 +15,17 @@ spec: template: metadata: labels: + {{- include "mirrord-operator.labels" . | nindent 8 }} app: mirrord-operator + component: operator + app.kubernetes.io/component: operator + {{- if .Values.operator.podLabels }} + {{ toYaml .Values.operator.podLabels | indent 8 }} + {{- end }} + annotations: + {{- if .Values.operator.podAnnotations }} + {{ toYaml .Values.operator.podAnnotations | indent 8 }} + {{- end }} spec: {{- if .Values.operator.imagePullSecrets }} imagePullSecrets: diff --git a/mirrord-operator/values.yaml b/mirrord-operator/values.yaml index b415c1c..29ec120 100644 --- a/mirrord-operator/values.yaml +++ b/mirrord-operator/values.yaml @@ -15,7 +15,8 @@ roleNamespaces: [] operator: image: ghcr.io/metalbear-co/operator - + podAnnotations: {} + podLabels: {} jsonLog: false # imagePullSecrets: # - name: value