-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scc flag for registry service when custom name is defined (#1967)
* add scc flag for registry service when custom name is defined * add scc template * add scc test cases * fix pre-commit
- Loading branch information
1 parent
b6e796e
commit 529567a
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
################################# | ||
### Astronomer Registry Scc ### | ||
################################# | ||
{{- if and .Values.registry.serviceAccount.create .Values.registry.serviceAccount.sccEnabled }} | ||
apiVersion: security.openshift.io/v1 | ||
kind: SecurityContextConstraints | ||
metadata: | ||
annotations: | ||
release.openshift.io/create-only: "true" | ||
"helm.sh/hook": "pre-install,pre-upgrade" | ||
name: {{ template "registry.ServiceAccount" . }}-anyuid | ||
priority: 10 | ||
readOnlyRootFilesystem: false | ||
requiredDropCapabilities: | ||
- MKNOD | ||
runAsUser: | ||
type: RunAsAny | ||
seLinuxContext: | ||
type: MustRunAs | ||
supplementalGroups: | ||
type: RunAsAny | ||
users: | ||
- system:serviceaccount:{{ .Release.Namespace }}:{{ template "registry.ServiceAccount" . }} | ||
volumes: | ||
- configMap | ||
- downwardAPI | ||
- emptyDir | ||
- persistentVolumeClaim | ||
- projected | ||
- secret | ||
defaultAddCapabilities: null | ||
fsGroup: | ||
type: RunAsAny | ||
allowHostDirVolumePlugin: false | ||
allowHostIPC: false | ||
allowHostNetwork: false | ||
allowHostPID: false | ||
allowHostPorts: false | ||
allowPrivilegeEscalation: false | ||
allowPrivilegedContainer: false | ||
allowedCapabilities: null | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters