File tree Expand file tree Collapse file tree 5 files changed +90
-6
lines changed
templates/volume-provisioner Expand file tree Collapse file tree 5 files changed +90
-6
lines changed Original file line number Diff line number Diff line change 11apiVersion : v2
22description : A Helm chart for Codefresh Runner
33name : cf-runtime
4- version : 3.0.7
4+ version : 3.0.8
55keywords :
66 - codefresh
77 - runner
@@ -15,7 +15,9 @@ maintainers:
1515annotations :
1616 artifacthub.io/changes : |
1717 - kind: fixed
18- description: Fix env var indent in runtime patch job
18+ description: Fix security context for dind-lv-monitor (OpenShift support)
19+ - kind: changed
20+ description: Use rootless cli image for runtime patch job
1921dependencies :
2022 - name : cf-common
2123 repository : https://chartmuseum.codefresh.io/cf-common
Original file line number Diff line number Diff line change 11## Codefresh Runner
22
3- ![ Version: 3.0.7 ] ( https://img.shields.io/badge/Version-3.0.7 -informational?style=flat-square )
3+ ![ Version: 3.0.8 ] ( https://img.shields.io/badge/Version-3.0.8 -informational?style=flat-square )
44
55Helm chart for deploying [ Codefresh Runner] ( https://codefresh.io/docs/docs/installation/codefresh-runner/ ) to Kubernetes.
66
@@ -19,6 +19,7 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
1919 - [ Custom global environment variables] ( #custom-global-environment-variables )
2020 - [ Volume reuse policy] ( #volume-reuse-policy )
2121 - [ Volume cleaners] ( #volume-cleaners )
22+ - [ Openshift] ( #openshift )
2223
2324## Prerequisites
2425
@@ -374,6 +375,39 @@ volumeProvisioner:
374375 INODE_USAGE_THRESHOLD : 60 # default 80
375376` ` `
376377
378+ ### Openshift
379+
380+ To install Codefresh Runner on OpenShift use the following ` values.yaml` example
381+
382+ ` ` ` yaml
383+ runner:
384+ podSecurityContext:
385+ enabled: false
386+
387+ volumeProvisioner:
388+ podSecurityContext:
389+ enabled: false
390+ env:
391+ PRIVILEGED_CONTAINER: true
392+ dind-lv-monitor:
393+ containerSecurityContext:
394+ enabled: true
395+ privileged: true
396+ volumePermissions:
397+ enabled: true
398+ securityContext:
399+ privileged: true
400+ runAsUser: auto
401+ ` ` `
402+
403+ Grant `privileged` SCC to `cf-runtime-runner` and `cf-runtime-volume-provisioner` service accounts.
404+
405+ ` ` ` console
406+ oc adm policy add-scc-to-user privileged system:serviceaccount:codefresh:cf-runtime-runner
407+
408+ oc adm policy add-scc-to-user privileged system:serviceaccount:codefresh:cf-runtime-volume-provisioner
409+ ` ` `
410+
377411# # Requirements
378412
379413| Repository | Name | Version |
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/insta
1919 - [Custom global environment variables](#custom-global-environment-variables)
2020 - [Volume reuse policy](#volume-reuse-policy)
2121 - [Volume cleaners](#volume-cleaners)
22+ - [Openshift](#openshift)
2223
2324## Prerequisites
2425
@@ -374,6 +375,40 @@ volumeProvisioner:
374375 INODE_USAGE_THRESHOLD: 60 # default 80
375376```
376377
378+ ### Openshift
379+
380+ To install Codefresh Runner on OpenShift use the following `values.yaml` example
381+
382+ ```yaml
383+ runner:
384+ podSecurityContext:
385+ enabled: false
386+
387+ volumeProvisioner:
388+ podSecurityContext:
389+ enabled: false
390+ env:
391+ PRIVILEGED_CONTAINER: true
392+ dind-lv-monitor:
393+ containerSecurityContext:
394+ enabled: true
395+ privileged: true
396+ volumePermissions:
397+ enabled: true
398+ securityContext:
399+ privileged: true
400+ runAsUser: auto
401+ ```
402+
403+ Grant `privileged` SCC to `cf-runtime-runner` and `cf-runtime-volume-provisioner` service accounts.
404+
405+ ```console
406+ oc adm policy add-scc-to-user privileged system:serviceaccount:codefresh:cf-runtime-runner
407+
408+ oc adm policy add-scc-to-user privileged system:serviceaccount:codefresh:cf-runtime-volume-provisioner
409+ ```
410+
411+
377412{{ template "chart.requirementsSection" . }}
378413
379414{{ template "chart.valuesSection" . }}
Original file line number Diff line number Diff line change @@ -38,17 +38,25 @@ spec:
3838 args :
3939 - -ec
4040 - |
41- chown -R {{ $values.podSecurityContext.fsGroup }}:{{ $values.podSecurityContext.fsGroup }} {{ $localVolumeParentDir }}
41+ chown -R {{ $values.podSecurityContext.runAsUser }}:{{ $values.podSecurityContext.fsGroup }} {{ $localVolumeParentDir }}
4242 volumeMounts :
4343 - mountPath : {{ $localVolumeParentDir }}
4444 name : dind-volume-dir
45+ {{- if eq ( toString ( $values.volumePermissions.securityContext.runAsUser )) "auto" }}
46+ securityContext : {{- omit $values.volumePermissions.securityContext "runAsUser" | toYaml | nindent 10 }}
47+ {{- else }}
48+ securityContext : {{- $values.volumePermissions.securityContext | toYaml | nindent 10 }}
49+ {{- end }}
4550 resources :
4651 {{- toYaml $values.volumePermissions.resources | nindent 10 }}
4752 {{- end }}
4853 containers :
4954 - name : dind-lv-monitor
5055 image : {{ include (printf "%s.image.name" $cfCommonTplSemver ) (dict "image" $values.image "context" .) }}
5156 imagePullPolicy : {{ $values.image.pullPolicy | default "Always" }}
57+ {{- if $values.containerSecurityContext.enabled }}
58+ securityContext : {{- omit $values.containerSecurityContext "enabled" | toYaml | nindent 10 }}
59+ {{- end }}
5260 command :
5361 - /home/dind-volume-utils/bin/local-volumes-agent
5462 env :
Original file line number Diff line number Diff line change @@ -194,7 +194,9 @@ volumeProvisioner:
194194 podAnnotations : {}
195195 podSecurityContext :
196196 enabled : true
197+ runAsUser : 1000
197198 fsGroup : 1000
199+ containerSecurityContext : {}
198200 env : {}
199201 resources : {}
200202 nodeSelector : {}
@@ -209,6 +211,8 @@ volumeProvisioner:
209211 repository : alpine
210212 tag : 3.18
211213 resources : {}
214+ securityContext :
215+ runAsUser : 0 # auto
212216
213217 # `dind-volume-cleanup` CronJob parameters
214218 # (external volumes cleaner)
@@ -499,14 +503,15 @@ runtime:
499503 image :
500504 registry : quay.io
501505 repository : codefresh/cli
502- tag : 0.84.6
506+ tag : 0.84.8-rootless
503507 annotations : {}
504508 affinity : {}
505509 nodeSelector : {}
506510 podSecurityContext : {}
507511 resources : {}
508512 tolerations : []
509- env : {}
513+ env :
514+ HOME : /tmp
510515
511516 # -- Set parent runtime to inherit.
512517 # Should not be changes. Parent runtime is controlled from Codefresh side.
You can’t perform that action at this time.
0 commit comments