Skip to content

Commit 3816952

Browse files
feat(cf-runtime): add labels to dind/engine pods (#431)
1 parent de0f22a commit 3816952

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

charts/cf-runtime/.ci/values-ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ runtime:
2424
dind:
2525
image:
2626
tag: 24.0.6-1.28.3-rootless
27+
podLabels:
28+
key: dind
2729
resources:
2830
requests:
2931
cpu: 100m
@@ -32,6 +34,8 @@ runtime:
3234
cpu: 1000m
3335
memory: 1024Mi
3436
engine:
37+
podLabels:
38+
key: engine
3539
resources:
3640
requests:
3741
cpu: 100m

charts/cf-runtime/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 6.3.6
4+
version: 6.3.7
55
keywords:
66
- codefresh
77
- runner
@@ -14,8 +14,8 @@ maintainers:
1414
url: https://codefresh-io.github.io/
1515
annotations:
1616
artifacthub.io/changes: |
17-
- kind: fixed
18-
description: Update codefresh/kubectl and codefresh/cf-k8s-agent images
17+
- kind: changed
18+
description: Add option to provide labels to dind and engine pods
1919
dependencies:
2020
- name: cf-common
2121
repository: oci://quay.io/codefresh/charts

charts/cf-runtime/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 6.3.6](https://img.shields.io/badge/Version-6.3.6-informational?style=flat-square)
3+
![Version: 6.3.7](https://img.shields.io/badge/Version-6.3.7-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

@@ -1013,12 +1013,13 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
10131013
| runtime.accounts | list | `[]` | (for On-Premise only) Assign accounts to runtime (list of account ids) |
10141014
| runtime.agent | bool | `true` | (for On-Premise only) Enable agent |
10151015
| runtime.description | string | `""` | Runtime description |
1016-
| runtime.dind | object | `{"affinity":{},"env":{},"image":{"registry":"quay.io","repository":"codefresh/dind","tag":"24.0.6-1.28.3"},"nodeSelector":{},"podAnnotations":{},"pvcs":{"dind":{"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}},"resources":{"limits":{"cpu":"400m","memory":"800Mi"},"requests":null},"schedulerName":"","serviceAccount":"codefresh-engine","tolerations":[],"userAccess":true,"userVolumeMounts":{},"userVolumes":{}}` | Parameters for DinD (docker-in-docker) pod (aka "runtime" pod). |
1016+
| runtime.dind | object | `{"affinity":{},"env":{},"image":{"registry":"quay.io","repository":"codefresh/dind","tag":"24.0.6-1.28.3"},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"pvcs":{"dind":{"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}},"resources":{"limits":{"cpu":"400m","memory":"800Mi"},"requests":null},"schedulerName":"","serviceAccount":"codefresh-engine","tolerations":[],"userAccess":true,"userVolumeMounts":{},"userVolumes":{}}` | Parameters for DinD (docker-in-docker) pod (aka "runtime" pod). |
10171017
| runtime.dind.affinity | object | `{}` | Set affinity |
10181018
| runtime.dind.env | object | `{}` | Set additional env vars. |
10191019
| runtime.dind.image | object | `{"registry":"quay.io","repository":"codefresh/dind","tag":"24.0.6-1.28.3"}` | Set dind image. |
10201020
| runtime.dind.nodeSelector | object | `{}` | Set node selector. |
10211021
| runtime.dind.podAnnotations | object | `{}` | Set pod annotations. |
1022+
| runtime.dind.podLabels | object | `{}` | Set pod labels. |
10221023
| runtime.dind.pvcs | object | `{"dind":{"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}}` | PV claim spec parametes. |
10231024
| runtime.dind.pvcs.dind | object | `{"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}` | Default dind PVC parameters |
10241025
| runtime.dind.pvcs.dind.name | string | `"dind"` | PVC name prefix. Keep `dind` as default! Don't change! |
@@ -1033,13 +1034,14 @@ Go to [https://<YOUR_ONPREM_DOMAIN_HERE>/admin/runtime-environments/system](http
10331034
| runtime.dind.userVolumeMounts | object | `{}` | Add extra volume mounts |
10341035
| runtime.dind.userVolumes | object | `{}` | Add extra volumes |
10351036
| runtime.dindDaemon | object | See below | DinD pod daemon config |
1036-
| runtime.engine | object | `{"affinity":{},"command":["npm","run","start"],"env":{},"image":{"registry":"quay.io","repository":"codefresh/engine","tag":"1.168.2"},"nodeSelector":{},"podAnnotations":{},"resources":{"limits":{"cpu":"1000m","memory":"2048Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"runtimeImages":{"COMPOSE_IMAGE":"quay.io/codefresh/compose:v2.20.3-1.4.0","CONTAINER_LOGGER_IMAGE":"quay.io/codefresh/cf-container-logger:1.10.3","CR_6177_FIXER":"quay.io/codefresh/alpine:edge","DOCKER_BUILDER_IMAGE":"quay.io/codefresh/cf-docker-builder:1.3.11","DOCKER_PULLER_IMAGE":"quay.io/codefresh/cf-docker-puller:8.0.16","DOCKER_PUSHER_IMAGE":"quay.io/codefresh/cf-docker-pusher:6.0.15","DOCKER_TAG_PUSHER_IMAGE":"quay.io/codefresh/cf-docker-tag-pusher:1.3.13","FS_OPS_IMAGE":"quay.io/codefresh/fs-ops:1.2.3","GC_BUILDER_IMAGE":"quay.io/codefresh/cf-gc-builder:0.5.3","GIT_CLONE_IMAGE":"quay.io/codefresh/cf-git-cloner:10.1.21","KUBE_DEPLOY":"quay.io/codefresh/cf-deploy-kubernetes:16.1.11","PIPELINE_DEBUGGER_IMAGE":"quay.io/codefresh/cf-debugger:1.3.0","TEMPLATE_ENGINE":"quay.io/codefresh/pikolo:0.14.0"},"schedulerName":"","serviceAccount":"codefresh-engine","tolerations":[],"userEnvVars":[]}` | Parameters for Engine pod (aka "pipeline" orchestrator). |
1037+
| runtime.engine | object | `{"affinity":{},"command":["npm","run","start"],"env":{},"image":{"registry":"quay.io","repository":"codefresh/engine","tag":"1.168.2"},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"resources":{"limits":{"cpu":"1000m","memory":"2048Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"runtimeImages":{"COMPOSE_IMAGE":"quay.io/codefresh/compose:v2.20.3-1.4.0","CONTAINER_LOGGER_IMAGE":"quay.io/codefresh/cf-container-logger:1.10.3","CR_6177_FIXER":"quay.io/codefresh/alpine:edge","DOCKER_BUILDER_IMAGE":"quay.io/codefresh/cf-docker-builder:1.3.11","DOCKER_PULLER_IMAGE":"quay.io/codefresh/cf-docker-puller:8.0.16","DOCKER_PUSHER_IMAGE":"quay.io/codefresh/cf-docker-pusher:6.0.15","DOCKER_TAG_PUSHER_IMAGE":"quay.io/codefresh/cf-docker-tag-pusher:1.3.13","FS_OPS_IMAGE":"quay.io/codefresh/fs-ops:1.2.3","GC_BUILDER_IMAGE":"quay.io/codefresh/cf-gc-builder:0.5.3","GIT_CLONE_IMAGE":"quay.io/codefresh/cf-git-cloner:10.1.21","KUBE_DEPLOY":"quay.io/codefresh/cf-deploy-kubernetes:16.1.11","PIPELINE_DEBUGGER_IMAGE":"quay.io/codefresh/cf-debugger:1.3.0","TEMPLATE_ENGINE":"quay.io/codefresh/pikolo:0.14.0"},"schedulerName":"","serviceAccount":"codefresh-engine","tolerations":[],"userEnvVars":[]}` | Parameters for Engine pod (aka "pipeline" orchestrator). |
10371038
| runtime.engine.affinity | object | `{}` | Set affinity |
10381039
| runtime.engine.command | list | `["npm","run","start"]` | Set container command. |
10391040
| runtime.engine.env | object | `{}` | Set additional env vars. |
10401041
| runtime.engine.image | object | `{"registry":"quay.io","repository":"codefresh/engine","tag":"1.168.2"}` | Set image. |
10411042
| runtime.engine.nodeSelector | object | `{}` | Set node selector. |
10421043
| runtime.engine.podAnnotations | object | `{}` | Set pod annotations. |
1044+
| runtime.engine.podLabels | object | `{}` | Set pod labels. |
10431045
| runtime.engine.resources | object | `{"limits":{"cpu":"1000m","memory":"2048Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | Set resources. |
10441046
| runtime.engine.runtimeImages | object | See below. | Set system(base) runtime images. |
10451047
| runtime.engine.schedulerName | string | `""` | Set scheduler name. |

charts/cf-runtime/templates/runtime/runtime-env-spec-tmpl.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ runtimeScheduler:
6565
{{- with $engineContext.podAnnotations }}
6666
annotations: {{- toYaml . | nindent 4 }}
6767
{{- end }}
68+
{{- with $engineContext.podLabels }}
69+
labels: {{- toYaml . | nindent 4 }}
70+
{{- end }}
6871
{{- if $engineContext.schedulerName }}
6972
schedulerName: {{ $engineContext.schedulerName }}
7073
{{- end }}
@@ -111,6 +114,9 @@ dockerDaemonScheduler:
111114
{{- with $dindContext.podAnnotations }}
112115
annotations: {{- toYaml . | nindent 4 }}
113116
{{- end }}
117+
{{- with $dindContext.podLabels }}
118+
labels: {{- toYaml . | nindent 4 }}
119+
{{- end }}
114120
{{- if $dindContext.schedulerName }}
115121
schedulerName: {{ $dindContext.schedulerName }}
116122
{{- end }}

charts/cf-runtime/tests/runtime/runtime_test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ tests:
8787
value: engine
8888
annotations:
8989
karpenter.sh/do-not-evict: "true"
90+
labels:
91+
key: engine
9092
resources:
9193
limits:
9294
cpu: 200m
@@ -124,6 +126,8 @@ tests:
124126
value: dinds
125127
annotations:
126128
karpenter.sh/do-not-evict: "true"
129+
labels:
130+
key: dind
127131
pvcs:
128132
- name: dind
129133
reuseVolumeSelector: "codefresh-app,io.codefresh.accountName"

charts/cf-runtime/tests/runtime/runtime_values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ runtime:
1818
ALICE: BOB
1919
podAnnotations:
2020
karpenter.sh/do-not-evict: "true"
21+
podLabels:
22+
key: dind
2123
nodeSelector:
2224
topology.kubernetes.io/zone: us-east-1a
2325
affinity:
@@ -82,6 +84,8 @@ runtime:
8284
key: token
8385
podAnnotations:
8486
karpenter.sh/do-not-evict: "true"
87+
podLabels:
88+
key: engine
8589
nodeSelector:
8690
topology.kubernetes.io/zone: us-east-1a
8791
affinity:

charts/cf-runtime/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ runtime:
458458
env: {}
459459
# -- Set pod annotations.
460460
podAnnotations: {}
461+
# -- Set pod labels.
462+
podLabels: {}
461463
# -- Set node selector.
462464
nodeSelector: {}
463465
# -- Set affinity
@@ -531,6 +533,8 @@ runtime:
531533
env: {}
532534
# -- Set pod annotations.
533535
podAnnotations: {}
536+
# -- Set pod labels.
537+
podLabels: {}
534538
# -- Set node selector.
535539
nodeSelector: {}
536540
# -- Set affinity

0 commit comments

Comments
 (0)