Files
open-cluster-management/deploy/spoke/deployment.yaml
Zhiwei Yin 54160128dd run as non-root
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2021-04-16 15:11:35 +08:00

47 lines
1.1 KiB
YAML

kind: Deployment
apiVersion: apps/v1
metadata:
name: spoke-agent
labels:
app: spoke-agent
spec:
replicas: 1
selector:
matchLabels:
app: spoke-agent
template:
metadata:
labels:
app: spoke-agent
spec:
serviceAccountName: spoke-agent-sa
containers:
- name: spoke-agent
image: quay.io/open-cluster-management/registration:latest
imagePullPolicy: IfNotPresent
args:
- "/registration"
- "agent"
- "--cluster-name=local-development"
- "--bootstrap-kubeconfig=/spoke/bootstrap/kubeconfig"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsNonRoot: true
volumeMounts:
- name: bootstrap-secret
mountPath: "/spoke/bootstrap"
readOnly: true
- name: hub-kubeconfig
mountPath: "/spoke/hub-kubeconfig"
volumes:
- name: bootstrap-secret
secret:
secretName: bootstrap-secret
- name: hub-kubeconfig
emptyDir:
medium: Memory