Skip to content

Commit f4f1bec

Browse files
Fix AppArmor config on new K8s versions
1 parent 921706d commit f4f1bec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

charts/anvilops/templates/buildkitd/buildkitd-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ spec:
1515
metadata:
1616
labels:
1717
{{- include "anvilops.buildkitd.labels" . | nindent 8 }}
18+
{{ if semverCompare "<1.30" .Capabilities.KubeVersion.Version }}
1819
annotations:
1920
container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined
21+
{{ end }}
2022
spec:
2123
{{ if .Values.buildkitd.enableUserNamespaces -}}
2224
hostUsers: false
@@ -67,6 +69,10 @@ spec:
6769
type: Unconfined
6870
runAsUser: 1000
6971
runAsGroup: 1000
72+
{{ if semverCompare ">=1.30" .Capabilities.KubeVersion.Version }}
73+
appArmorProfile:
74+
type: Unconfined
75+
{{ end }}
7076
ports:
7177
- containerPort: 1234
7278
volumeMounts:

0 commit comments

Comments
 (0)