From e07c9109c1c79a44f416134fe748f08853ce8e58 Mon Sep 17 00:00:00 2001 From: Mykola Marusenko Date: Thu, 4 Dec 2025 17:35:14 +0200 Subject: [PATCH] feat: Add Docker registry and podLabels to helm chart (#246) --- deploy-templates/README.md | 6 ++++-- deploy-templates/templates/deployment.yaml | 8 +++++++- deploy-templates/values.yaml | 10 +++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/deploy-templates/README.md b/deploy-templates/README.md index eed57a7..57ad315 100644 --- a/deploy-templates/README.md +++ b/deploy-templates/README.md @@ -27,8 +27,9 @@ A Helm chart for KubeRocketCI Codebase Operator | envs[0].value | string | `"360"` | | | envs[1] | object | `{"name":"CODEBASE_BRANCH_MAX_CONCURRENT_RECONCILES","value":"3"}` | Maximum number of parallel reconciliation codebasebranches | | global.platform | string | `"kubernetes"` | platform type that can be "kubernetes" or "openshift" | -| image.repository | string | `"epamedp/codebase-operator"` | EDP codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator) | -| image.tag | string | `nil` | EDP codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags) | +| image.registry | string | `""` | KubeRocketCI codebase-operator Docker image registry. | +| image.repository | string | `"epamedp/codebase-operator"` | KubeRocketCI codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator) | +| image.tag | string | `nil` | KubeRocketCI codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags) | | imagePullPolicy | string | `"IfNotPresent"` | | | imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry | | jira.apiUrl | string | `"https://jiraeu-api.example.com"` | API URL for development | @@ -39,6 +40,7 @@ A Helm chart for KubeRocketCI Codebase Operator | jira.rootUrl | string | `"https://jiraeu.example.com"` | URL to Jira server | | name | string | `"codebase-operator"` | component name | | nodeSelector | object | `{}` | | +| podLabels | object | `{}` | Labels to be added to the pod | | podSecurityContext | object | `{"runAsNonRoot":true}` | Pod Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | | resources.limits.memory | string | `"1Gi"` | | | resources.requests.cpu | string | `"50m"` | | diff --git a/deploy-templates/templates/deployment.yaml b/deploy-templates/templates/deployment.yaml index 1bcd753..f18ba52 100644 --- a/deploy-templates/templates/deployment.yaml +++ b/deploy-templates/templates/deployment.yaml @@ -17,6 +17,12 @@ spec: metadata: labels: name: {{ .Values.name }} + {{- if hasKey .Values.podLabels "name" }} + {{ fail "The 'name' key is not allowed in podLabels" }} + {{- end }} + {{- range $key, $value := .Values.podLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: serviceAccountName: edp-{{ .Values.name }} {{- if .Values.podSecurityContext }} @@ -27,7 +33,7 @@ spec: {{- end }} containers: - name: {{ .Values.name }} - image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + image: {{ if .Values.image.registry }}{{ .Values.image.registry }}/{{ end }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} ports: - containerPort: 9443 name: webhook-server diff --git a/deploy-templates/values.yaml b/deploy-templates/values.yaml index cba83bd..2a0a396 100644 --- a/deploy-templates/values.yaml +++ b/deploy-templates/values.yaml @@ -5,14 +5,18 @@ global: # -- component name name: codebase-operator annotations: {} +# -- Labels to be added to the pod +podLabels: {} nodeSelector: {} tolerations: [] affinity: {} image: - # -- EDP codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator) + # -- KubeRocketCI codebase-operator Docker image registry. + registry: "" + # -- KubeRocketCI codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator) repository: epamedp/codebase-operator # if not defined then .Chart.AppVersion is used - # -- EDP codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags) + # -- KubeRocketCI codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags) tag: envs: - name: RECONCILATION_PERIOD @@ -63,6 +67,6 @@ jira: # the continual collection of anonymized statistics, essential for informed decision-making and strategic # platform enhancements. This feature respects user preferences, offering the choice to participate in shaping # the platform's improvement initiatives while ensuring anonymity and data privacy. -# Read more about EDP telemetry here: https://epam.github.io/edp-install/developer-guide/telemetry/ +# Read more about KubeRocketCI telemetry here: https://docs.kuberocketci.io/docs/developer-guide/telemetry # -- Flag to enable/disable telemetry telemetryEnabled: true