apiVersion: apps/v1 kind: Deployment metadata: name: cgit labels: app: cgit spec: selector: matchLabels: app: cgit template: metadata: labels: app: cgit spec: nodeSelector: kubernetes.io/hostname: "jade" imagePullSecrets: - name: registry-creds securityContext: fsGroup: 1002 containers: - name: cgit image: reg.icyphox.sh/cgit imagePullPolicy: Always volumeMounts: - name: git mountPath: "/home/git" readOnly: false - name: config mountPath: "/etc/cgitrc" subPath: "cgitrc" readOnly: true - name: nginx-config mountPath: "/etc/nginx/conf.d/default.conf" subPath: "default.conf" readOnly: true - name: cgit-ui mountPath: "/usr/share/webapps/cgit/static" readOnly: false command: ["/bin/sh"] args: - -c #- sed -i '/^#.*conf.d/s/^#//' /etc/nginx/nginx.conf && - /usr/bin/spawn-fcgi -M 666 -s /run/fcgiwrap.socket /usr/bin/fcgiwrap && /usr/sbin/nginx -g "daemon off;" ports: - name: http containerPort: 80 volumes: - name: git hostPath: path: /home/git - name: config configMap: name: cgit-config - name: nginx-config configMap: name: cgit-nginx - name: cgit-ui persistentVolumeClaim: claimName: cgit-ui --- apiVersion: v1 kind: Service metadata: name: cgit spec: selector: app: cgit ports: - name: http port: 80 targetPort: 80