All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 28s
108 lines
No EOL
2.7 KiB
YAML
108 lines
No EOL
2.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: k8s-mgmt-pod
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: k8s-mgmt-pod
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: k8s-mgmt-pod
|
|
spec:
|
|
serviceAccountName: k8s-mgmt-pod
|
|
automountServiceAccountToken: true
|
|
|
|
securityContext:
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: OnRootMismatch
|
|
|
|
containers:
|
|
- name: k8s-mgmt-pod
|
|
image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:latest
|
|
imagePullPolicy: Always
|
|
|
|
ports:
|
|
- name: ssh
|
|
containerPort: 2222
|
|
- name: webssh
|
|
containerPort: 3000
|
|
|
|
env:
|
|
- name: ADMIN_SSH_PUBKEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: k8s-mgmt-pod-auth
|
|
key: ADMIN_SSH_PUBKEY
|
|
optional: true
|
|
- name: USER_SSH_PUBKEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: k8s-mgmt-pod-auth
|
|
key: USER_SSH_PUBKEY
|
|
optional: true
|
|
- name: ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: k8s-mgmt-pod-auth
|
|
key: ADMIN_PASSWORD
|
|
optional: true
|
|
- name: USER_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: k8s-mgmt-pod-auth
|
|
key: USER_PASSWORD
|
|
optional: true
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 2222
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 2222
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
|
|
volumeMounts:
|
|
- name: state
|
|
mountPath: /var/lib/k8s-mgmt-pod
|
|
|
|
securityContext:
|
|
runAsUser: 0
|
|
runAsGroup: 0
|
|
runAsNonRoot: false
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
add:
|
|
- AUDIT_WRITE
|
|
- CHOWN
|
|
- DAC_OVERRIDE
|
|
- FOWNER
|
|
- SETGID
|
|
- SETUID
|
|
- SYS_CHROOT
|
|
|
|
volumes:
|
|
- name: state
|
|
persistentVolumeClaim:
|
|
claimName: k8s-mgmt-pod-state |