apiVersion: apps/v1 kind: Deployment metadata: name: gitea namespace: gitea labels: app: gitea spec: revisionHistoryLimit: 1 replicas: 4 selector: matchLabels: app: gitea template: metadata: labels: app: gitea spec: initContainers: - name: gitea-config image: opendevorg/gitea-init env: - {name: VERBOSE, value: '1'} volumeMounts: - {name: config-template, mountPath: /config_src} - {name: gitea-conf, mountPath: /conf} - {name: gitea-data, mountPath: /data} - {name: secrets, mountPath: /secrets} containers: - name: gitea image: opendevorg/gitea env: - name: deployment_id value: '3' # Increment to trigger a deployment. ports: - containerPort: 3000 - containerPort: 3080 volumeMounts: - name: gitea-data mountPath: /data - name: gitea-conf mountPath: /custom/conf - name: logs mountPath: /logs - name: openssh image: opendevorg/gitea-openssh ports: - containerPort: 22 volumeMounts: - name: gitea-data mountPath: /data - name: gitea-conf mountPath: /custom/conf - name: logs mountPath: /logs volumes: - name: gitea-data flexVolume: driver: ceph.rook.io/rook fsType: ceph options: fsName: rookfs clusterNamespace: rook-ceph clusterName: rook-ceph - name: config-template configMap: name: gitea-conf - name: gitea-conf emptyDir: - name: logs emptyDir: - name: secrets secret: secretName: gitea-app affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - gitea topologyKey: "kubernetes.io/hostname"