未验证 提交 a7ba51fb 编写于 作者: A Alessandro (Ale) Segala 提交者: GitHub

Allow setting seccompProfile and drop all capabilities for control plane services (#6505)

Fixes #6233
Signed-off-by: NItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: NDapr Bot <56698301+dapr-bot@users.noreply.github.com>
上级 65902338
...@@ -98,7 +98,8 @@ The Helm chart has the follow configuration options that can be supplied: ...@@ -98,7 +98,8 @@ The Helm chart has the follow configuration options that can be supplied:
| `global.issuerFilenames.ca` | Custom name of the file containing the root CA certificate inside the container | `ca.crt` | | `global.issuerFilenames.ca` | Custom name of the file containing the root CA certificate inside the container | `ca.crt` |
| `global.issuerFilenames.cert` | Custom name of the file containing the leaf certificate inside the container | `issuer.crt` | | `global.issuerFilenames.cert` | Custom name of the file containing the leaf certificate inside the container | `issuer.crt` |
| `global.issuerFilenames.key` | Custom name of the file containing the leaf certificate's key inside the container | `issuer.key` | | `global.issuerFilenames.key` | Custom name of the file containing the leaf certificate's key inside the container | `issuer.key` |
| `global.actors.enabled` | Enables the Dapr actors building block. When "false", the Dapr Placement serice is not installed, and attempting to use Dapr actors will fail. | `true` | | `global.actors.enabled` | Enables the Dapr actors building block. When "false", the Dapr Placement serice is not installed, and attempting to use Dapr actors will fail. | `true` |
| `global.seccompProfile` | SeccompProfile for Dapr control plane services | `""` |
| `global.rbac.namespaced` | Removes cluster wide permissions where applicable | `false` | | `global.rbac.namespaced` | Removes cluster wide permissions where applicable | `false` |
| `global.argoRolloutServiceReconciler.enabled` | Enable the service reconciler for Dapr-enabled Argo Rollouts | `false` | | `global.argoRolloutServiceReconciler.enabled` | Enable the service reconciler for Dapr-enabled Argo Rollouts | `false` |
......
...@@ -110,11 +110,17 @@ spec: ...@@ -110,11 +110,17 @@ spec:
{{- if eq .Values.global.daprControlPlaneOs "linux" }} {{- if eq .Values.global.daprControlPlaneOs "linux" }}
securityContext: securityContext:
runAsNonRoot: {{ .Values.runAsNonRoot }} runAsNonRoot: {{ .Values.runAsNonRoot }}
{{- if eq .Values.debug.enabled true }} {{- if eq .Values.debug.enabled true }}
capabilities: capabilities:
add: add: ["SYS_PTRACE"]
- SYS_PTRACE {{- else }}
{{- end }} capabilities:
drop: ["ALL"]
{{- end }}
{{- if .Values.global.seccompProfile }}
seccompProfile:
type: {{ .Values.global.seccompProfile }}
{{- end }}
{{- end }} {{- end }}
env: env:
- name: NAMESPACE - name: NAMESPACE
......
...@@ -154,11 +154,17 @@ spec: ...@@ -154,11 +154,17 @@ spec:
{{- else }} {{- else }}
runAsUser: 0 runAsUser: 0
{{- end }} {{- end }}
{{- if eq .Values.debug.enabled true }} {{- if eq .Values.debug.enabled true }}
capabilities: capabilities:
add: add: ["SYS_PTRACE"]
- SYS_PTRACE {{- else }}
{{- end }} capabilities:
drop: ["ALL"]
{{- end }}
{{- if .Values.global.seccompProfile }}
seccompProfile:
type: {{ .Values.global.seccompProfile }}
{{- end }}
{{- end }} {{- end }}
env: env:
- name: PLACEMENT_ID - name: PLACEMENT_ID
......
...@@ -92,8 +92,14 @@ spec: ...@@ -92,8 +92,14 @@ spec:
runAsNonRoot: {{ .Values.runAsNonRoot }} runAsNonRoot: {{ .Values.runAsNonRoot }}
{{- if eq .Values.debug.enabled true }} {{- if eq .Values.debug.enabled true }}
capabilities: capabilities:
add: add: ["SYS_PTRACE"]
- SYS_PTRACE {{- else }}
capabilities:
drop: ["ALL"]
{{- end }}
{{- if .Values.global.seccompProfile }}
seccompProfile:
type: {{ .Values.global.seccompProfile }}
{{- end }} {{- end }}
{{- end }} {{- end }}
env: env:
......
...@@ -78,8 +78,14 @@ spec: ...@@ -78,8 +78,14 @@ spec:
{{- end }} {{- end }}
{{- if eq .Values.debug.enabled true }} {{- if eq .Values.debug.enabled true }}
capabilities: capabilities:
add: add: ["SYS_PTRACE"]
- SYS_PTRACE {{- else }}
capabilities:
drop: ["ALL"]
{{- end }}
{{- if .Values.global.seccompProfile }}
seccompProfile:
type: {{ .Values.global.seccompProfile }}
{{- end }} {{- end }}
{{- end }} {{- end }}
command: command:
......
...@@ -26,6 +26,7 @@ global: ...@@ -26,6 +26,7 @@ global:
enabled: true enabled: true
daprControlPlaneOs: linux daprControlPlaneOs: linux
labels: {} labels: {}
seccompProfile: ""
k8sLabels: k8sLabels:
app.kubernetes.io/name: "{{ .Release.Name }}" app.kubernetes.io/name: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Values.global.tag }}" app.kubernetes.io/version: "{{ .Values.global.tag }}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册