Skip to content

Commit 0d4d041

Browse files
feat: Add Docker registry and podLabels to helm chart (#246)
1 parent a538cd2 commit 0d4d041

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

deploy-templates/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ A Helm chart for KubeRocketCI Codebase Operator
2727
| envs[0].value | string | `"360"` | |
2828
| envs[1] | object | `{"name":"CODEBASE_BRANCH_MAX_CONCURRENT_RECONCILES","value":"3"}` | Maximum number of parallel reconciliation codebasebranches |
2929
| global.platform | string | `"kubernetes"` | platform type that can be "kubernetes" or "openshift" |
30-
| 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) |
31-
| 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) |
30+
| image.registry | string | `""` | KubeRocketCI codebase-operator Docker image registry. |
31+
| 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) |
32+
| 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) |
3233
| imagePullPolicy | string | `"IfNotPresent"` | |
3334
| imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
3435
| jira.apiUrl | string | `"https://jiraeu-api.example.com"` | API URL for development |
@@ -39,6 +40,7 @@ A Helm chart for KubeRocketCI Codebase Operator
3940
| jira.rootUrl | string | `"https://jiraeu.example.com"` | URL to Jira server |
4041
| name | string | `"codebase-operator"` | component name |
4142
| nodeSelector | object | `{}` | |
43+
| podLabels | object | `{}` | Labels to be added to the pod |
4244
| podSecurityContext | object | `{"runAsNonRoot":true}` | Pod Security Context Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
4345
| resources.limits.memory | string | `"1Gi"` | |
4446
| resources.requests.cpu | string | `"50m"` | |

deploy-templates/templates/deployment.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ spec:
1717
metadata:
1818
labels:
1919
name: {{ .Values.name }}
20+
{{- if hasKey .Values.podLabels "name" }}
21+
{{ fail "The 'name' key is not allowed in podLabels" }}
22+
{{- end }}
23+
{{- range $key, $value := .Values.podLabels }}
24+
{{ $key }}: {{ $value | quote }}
25+
{{- end }}
2026
spec:
2127
serviceAccountName: edp-{{ .Values.name }}
2228
{{- if .Values.podSecurityContext }}
@@ -27,7 +33,7 @@ spec:
2733
{{- end }}
2834
containers:
2935
- name: {{ .Values.name }}
30-
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
36+
image: {{ if .Values.image.registry }}{{ .Values.image.registry }}/{{ end }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
3137
ports:
3238
- containerPort: 9443
3339
name: webhook-server

deploy-templates/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ global:
55
# -- component name
66
name: codebase-operator
77
annotations: {}
8+
# -- Labels to be added to the pod
9+
podLabels: {}
810
nodeSelector: {}
911
tolerations: []
1012
affinity: {}
1113
image:
12-
# -- EDP codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator)
14+
# -- KubeRocketCI codebase-operator Docker image registry.
15+
registry: ""
16+
# -- KubeRocketCI codebase-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator)
1317
repository: epamedp/codebase-operator
1418
# if not defined then .Chart.AppVersion is used
15-
# -- EDP codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags)
19+
# -- KubeRocketCI codebase-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/codebase-operator/tags)
1620
tag:
1721
envs:
1822
- name: RECONCILATION_PERIOD
@@ -63,6 +67,6 @@ jira:
6367
# the continual collection of anonymized statistics, essential for informed decision-making and strategic
6468
# platform enhancements. This feature respects user preferences, offering the choice to participate in shaping
6569
# the platform's improvement initiatives while ensuring anonymity and data privacy.
66-
# Read more about EDP telemetry here: https://epam.github.io/edp-install/developer-guide/telemetry/
70+
# Read more about KubeRocketCI telemetry here: https://docs.kuberocketci.io/docs/developer-guide/telemetry
6771
# -- Flag to enable/disable telemetry
6872
telemetryEnabled: true

0 commit comments

Comments
 (0)