system-config/kubernetes/gitea/k8s/deployment.yaml
James E. Blair a6328eee0c Add gitea k8s resource definitions and playbook
This adds k8s resource definitions for running gitea, and an ansible
playbook to create them.

It also includes ansible playbooks to create orgs and repos.

Change-Id: Ib64597512c6a85d7e1495d18ae42b242f9af5a67
2019-02-05 18:52:21 +00:00

70 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
labels:
app: gitea
spec:
replicas: 1
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
ports:
- containerPort: 3000
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