apiVersion: apps/v1
kind: Deployment
metadata:
  name: cobbler
  namespace: cobbler
  labels:
    app: cobbler
spec:
  selector:
    matchLabels:
      app: cobbler
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: cobbler
    spec:
      hostNetwork: true
      volumes:
        - name: omnia-storage
          hostPath:
            path: /home/omnia/
            type: Directory
        - name: mnt-iso
          hostPath:
            path: /mnt/
            type: Directory
      containers:
        - name: cobbler
          image: 'localhost/cobbler:latest'
          imagePullPolicy: Never
          command:
            - /sbin/init
          ports:
            - containerPort: 25151
            - containerPort: 443
            - containerPort: 81
            - containerPort: 69
              protocol: UDP
          volumeMounts:
            - name: mnt-iso
              mountPath: /mnt
            - name: omnia-storage
              mountPath: /root/omnia
          securityContext:
            privileged: true