Skip to content

Commit

Permalink
Add seccompProfile field in securityContext instead of annotation (
Browse files Browse the repository at this point in the history
  • Loading branch information
kota2and3kan committed Aug 4, 2022
1 parent ebff947 commit 6a5ee36
Show file tree
Hide file tree
Showing 13 changed files with 888 additions and 27 deletions.
4 changes: 2 additions & 2 deletions charts/envoy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Current chart version is `2.1.0`
| image.version | string | `"1.3.0"` | |
| imagePullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. |
| nodeSelector | object | `{}` | nodeSelector is form of node selection constraint |
| podAnnotations | object | `{"seccomp.security.alpha.kubernetes.io/pod":"runtime/default"}` | Pod annotations for the envoy Deployment |
| podSecurityContext | object | `{}` | PodSecurityContext holds pod-level security attributes and common container settings |
| podAnnotations | object | `{}` | Pod annotations for the envoy Deployment |
| podSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | PodSecurityContext holds pod-level security attributes and common container settings |
| podSecurityPolicy.enabled | bool | `true` | enable pod security policy |
| prometheusRule.enabled | bool | `false` | enable rules for prometheus |
| prometheusRule.namespace | string | `"monitoring"` | which namespace prometheus is located. by default monitoring |
Expand Down
15 changes: 10 additions & 5 deletions charts/envoy/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,21 @@
"type": "object"
},
"podAnnotations": {
"type": "object"
},
"podSecurityContext": {
"type": "object",
"properties": {
"seccomp.security.alpha.kubernetes.io/pod": {
"type": "string"
"seccompProfile": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
}
}
},
"podSecurityContext": {
"type": "object"
},
"podSecurityPolicy": {
"type": "object",
"properties": {
Expand Down
8 changes: 4 additions & 4 deletions charts/envoy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ strategy:
type: RollingUpdate

# podSecurityContext -- PodSecurityContext holds pod-level security attributes and common container settings
podSecurityContext: {}
# fsGroup: 2000
podSecurityContext:
seccompProfile:
type: RuntimeDefault

# securityContext -- Setting security context at the pod applies those settings to all containers in the pod
securityContext:
Expand All @@ -43,8 +44,7 @@ securityContext:
allowPrivilegeEscalation: false

# podAnnotations -- Pod annotations for the envoy Deployment
podAnnotations:
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
podAnnotations: {}

service:
# service.type -- service types in kubernetes
Expand Down
4 changes: 3 additions & 1 deletion charts/scalardb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Current chart version is `1.3.0`
| scalardb.image.tag | string | `"3.4.0"` | Docker tag of the image. |
| scalardb.imagePullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. |
| scalardb.nodeSelector | object | `{}` | nodeSelector is form of node selection constraint. |
| scalardb.podSecurityContext | object | `{}` | PodSecurityContext holds pod-level security attributes and common container settings. |
| scalardb.podAnnotations | object | `{}` | Pod annotations for the scalardb deployment |
| scalardb.podSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | PodSecurityContext holds pod-level security attributes and common container settings. |
| scalardb.podSecurityPolicy.enabled | bool | `true` | Enable pod security policy |
| scalardb.prometheusRule.enabled | bool | `false` | Enable rules for prometheus. |
| scalardb.prometheusRule.namespace | string | `"monitoring"` | Which namespace prometheus is located. by default monitoring. |
| scalardb.replicaCount | int | `3` | Default values for number of replicas. |
Expand Down
5 changes: 5 additions & 0 deletions charts/scalardb/templates/scalardb/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ spec:
{{- end }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/scalardb/configmap.yaml") . | sha256sum }}
{{- if .Values.scalardb.podAnnotations }}
{{- toYaml .Values.scalardb.podAnnotations | nindent 8 }}
{{- end }}
labels:
{{- include "scalardb.selectorLabels" . | nindent 8 }}
spec:
Expand Down
15 changes: 10 additions & 5 deletions charts/scalardb/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,21 @@
"type": "object"
},
"podAnnotations": {
"type": "object"
},
"podSecurityContext": {
"type": "object",
"properties": {
"seccomp.security.alpha.kubernetes.io/pod": {
"type": "string"
"seccompProfile": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
}
}
},
"podSecurityContext": {
"type": "object"
},
"podSecurityPolicy": {
"type": "object",
"properties": {
Expand Down
7 changes: 3 additions & 4 deletions charts/scalardb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ scalardb:

# -- PodSecurityContext holds pod-level security attributes and common container settings.
podSecurityContext:
{}
# fsGroup: 2000
seccompProfile:
type: RuntimeDefault

# -- Setting security context at the pod applies those settings to all containers in the pod.
securityContext:
Expand All @@ -192,8 +192,7 @@ scalardb:
allowPrivilegeEscalation: false

# -- Pod annotations for the scalardb deployment
podAnnotations:
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
podAnnotations: {}

# -- Resources allowed to the pod.
resources:
Expand Down
2 changes: 1 addition & 1 deletion charts/scalardl-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Current chart version is `1.3.0`
| auditor.image.version | string | `"3.3.0"` | Docker tag |
| auditor.imagePullSecrets | list | `[{"name":"reg-docker-secrets"}]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. |
| auditor.nodeSelector | object | `{}` | nodeSelector is form of node selection constraint |
| auditor.podSecurityContext | object | `{}` | PodSecurityContext holds pod-level security attributes and common container settings |
| auditor.podSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | PodSecurityContext holds pod-level security attributes and common container settings |
| auditor.prometheusRule.enabled | bool | `false` | enable rules for prometheus |
| auditor.prometheusRule.namespace | string | `"monitoring"` | which namespace prometheus is located. by default monitoring |
| auditor.replicaCount | int | `3` | number of replicas to deploy |
Expand Down
Loading

0 comments on commit 6a5ee36

Please sign in to comment.