Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Able to run controller inside the container platform with write access to root restrictions #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,28 @@ spec:
type: RuntimeDefault
containers:
- args:
- --leader-elect
- "--diagnostics-address=${CAAPH_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAAPH_INSECURE_DIAGNOSTICS:=false}"
- "--sync-period=${CAAPH_SYNC_PERIOD:=10m}"
- "--v=2"
- --leader-elect
- "--diagnostics-address=${CAAPH_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAAPH_INSECURE_DIAGNOSTICS:=false}"
- "--sync-period=${CAAPH_SYNC_PERIOD:=10m}"
- "--v=2"
env:
- name: XDG_DATA_HOME
value: /xdg/.data
- name: XDG_CONFIG_HOME
value: /xdg/.config
- name: XDG_STATE_HOME
value: /xdg/.state
- name: XDG_CACHE_HOME
value: /xdg/.cache
- name: XDG_CONFIG_DIRS
value: /xdg
image: controller:latest
imagePullPolicy: Always
name: manager
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
Expand All @@ -65,6 +77,16 @@ spec:
port: healthz
initialDelaySeconds: 10
periodSeconds: 10
volumeMounts:
dmvolod marked this conversation as resolved.
Show resolved Hide resolved
- mountPath: /xdg
name: xdg
- mountPath: /tmp
name: tmp
volumes:
- emptyDir: {}
name: xdg
- emptyDir: {}
name: tmp
Comment on lines +86 to +89
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use single tmp volume mounted to the /tmp and utilize it for all temporary files (common and XDG based). @Jont828 what do you think about it? This should work for all Kubernetes platforms and security restrictions

# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
# resources:
Expand Down
Loading