Skip to content

Commit

Permalink
Merge pull request #2790 from tonistiigi/k8s-examples-update-v0.10
Browse files Browse the repository at this point in the history
[v0.10] examples/kubernetes: replace deprecated seccomp annotations with securityContext
  • Loading branch information
tonistiigi authored Apr 7, 2022
2 parents 939c71d + 58b5892 commit 5bc9c7b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion examples/kubernetes/deployment+service.rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ spec:
app: buildkitd
annotations:
container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined
container.seccomp.security.alpha.kubernetes.io/buildkitd: unconfined
# see buildkit/docs/rootless.md for caveats of rootless mode
spec:
containers:
Expand Down Expand Up @@ -52,6 +51,9 @@ spec:
initialDelaySeconds: 5
periodSeconds: 30
securityContext:
# Needs Kubernetes >= 1.19
seccompProfile:
type: Unconfined
# To change UID/GID, you need to rebuild the image
runAsUser: 1000
runAsGroup: 1000
Expand Down
4 changes: 3 additions & 1 deletion examples/kubernetes/job.rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ spec:
metadata:
annotations:
container.apparmor.security.beta.kubernetes.io/buildkit: unconfined
container.seccomp.security.alpha.kubernetes.io/buildkit: unconfined
# see buildkit/docs/rootless.md for caveats of rootless mode
spec:
restartPolicy: Never
Expand Down Expand Up @@ -43,6 +42,9 @@ spec:
# To push the image to a registry, add
# `--output type=image,name=docker.io/username/image,push=true`
securityContext:
# Needs Kubernetes >= 1.19
seccompProfile:
type: Unconfined
# To change UID/GID, you need to rebuild the image
runAsUser: 1000
runAsGroup: 1000
Expand Down
4 changes: 3 additions & 1 deletion examples/kubernetes/pod.rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: buildkitd
annotations:
container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined
container.seccomp.security.alpha.kubernetes.io/buildkitd: unconfined
# see buildkit/docs/rootless.md for caveats of rootless mode
spec:
containers:
Expand All @@ -29,6 +28,9 @@ spec:
initialDelaySeconds: 5
periodSeconds: 30
securityContext:
# Needs Kubernetes >= 1.19
seccompProfile:
type: Unconfined
# To change UID/GID, you need to rebuild the image
runAsUser: 1000
runAsGroup: 1000
4 changes: 3 additions & 1 deletion examples/kubernetes/statefulset.rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ spec:
app: buildkitd
annotations:
container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined
container.seccomp.security.alpha.kubernetes.io/buildkitd: unconfined
# see buildkit/docs/rootless.md for caveats of rootless mode
spec:
containers:
Expand All @@ -42,6 +41,9 @@ spec:
initialDelaySeconds: 5
periodSeconds: 30
securityContext:
# Needs Kubernetes >= 1.19
seccompProfile:
type: Unconfined
# To change UID/GID, you need to rebuild the image
runAsUser: 1000
runAsGroup: 1000

0 comments on commit 5bc9c7b

Please sign in to comment.