Skip to content

Commit

Permalink
wip: Mon Nov 18 18:19:11 +03 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-klimko committed Nov 18, 2024
1 parent 7e955c4 commit 468de3e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
12 changes: 7 additions & 5 deletions charts/cf-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,12 @@ volumeProvisioner:
image:
tag: 1.30.0-rootless
digest: sha256:712e549e6e843b04684647f17e0973f8047e0d60e6e8b38a693ea64dc75b0479
podSecurityContext:
enabled: true
containerSecurityContext:
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /var/lib/codefresh/dind-volumes on host nodes
volumePermissions:
enabled: false
Expand All @@ -746,15 +748,15 @@ runtime:
mountPath: /home/rootless/
containerSecurityContext:
privileged: true
podSecurityContext:
enabled: true
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /home/rootless in DinD pod
# !!! Will slow down dind pod startup
volumePermissions:
enabled: false
enabled: true
```

### ARM
Expand Down
12 changes: 7 additions & 5 deletions charts/cf-runtime/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,12 @@ volumeProvisioner:
image:
tag: 1.30.0-rootless
digest: sha256:712e549e6e843b04684647f17e0973f8047e0d60e6e8b38a693ea64dc75b0479
podSecurityContext:
enabled: true
containerSecurityContext:
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /var/lib/codefresh/dind-volumes on host nodes
volumePermissions:
enabled: false
Expand All @@ -748,15 +750,15 @@ runtime:
mountPath: /home/rootless/
containerSecurityContext:
privileged: true
podSecurityContext:
enabled: true
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /home/rootless in DinD pod
# !!! Will slow down dind pod startup
volumePermissions:
enabled: false
enabled: true
```

### ARM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
args:
- -ec
- |
chown -R {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} {{ $localVolumeParentDir }}
chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} {{ $localVolumeParentDir }}
volumeMounts:
- mountPath: {{ $localVolumeParentDir }}
name: dind-volume-dir
Expand Down Expand Up @@ -95,4 +95,4 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ dockerDaemonScheduler:
args:
- -ec
- |
chown -R {{ $dindContext.podSecurityContext.runAsUser }}:{{ $dindContext.podSecurityContext.fsGroup }} /home/rootless/.local/share/docker
chown -R {{ $dindContext.containerSecurityContext.runAsUser }}:{{ $dindContext.podSecurityContext.fsGroup }} /home/rootless/.local/share/docker
volumeMounts:
- mountPath: /home/rootless/.local/share/docker
name: dind
Expand Down
12 changes: 7 additions & 5 deletions charts/cf-runtime/values-rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ volumeProvisioner:
image:
tag: 1.30.0-rootless
digest: sha256:712e549e6e843b04684647f17e0973f8047e0d60e6e8b38a693ea64dc75b0479
podSecurityContext:
enabled: true
containerSecurityContext:
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /var/lib/codefresh/dind-volumes on host nodes
volumePermissions:
enabled: false
Expand All @@ -25,12 +27,12 @@ runtime:
mountPath: /home/rootless/
containerSecurityContext:
privileged: true
podSecurityContext:
enabled: true
runAsUser: 1000
podSecurityContext:
fsGroup: 1000
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods
fsGroupChangePolicy: "OnRootMismatch"
# -- Enable initContainer to run chmod for /home/rootless in DinD pod
# !!! Will slow down dind pod startup
volumePermissions:
enabled: false
enabled: true

0 comments on commit 468de3e

Please sign in to comment.