123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- ---
- apiVersion: v1
- kind: Namespace
- metadata:
- name: gogs
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gogs
- namespace: gogs
- spec:
- strategy:
- type: Recreate
- selector:
- matchLabels:
- app: gogs
- replicas: 1
- template:
- metadata:
- labels:
- app: gogs
- spec:
- containers:
- - name: gogs
- image: gogs/gogs:0.13.0
- env:
- - name: SOCAT_LINK
- value: "false"
- name: DISABLE_REGISTRATION
- value: "true"
- ports:
- - containerPort: 22
- name: ssh-svc
- - containerPort: 3000
- name: http-web-svc
- volumeMounts:
- - mountPath: "/data"
- name: data
- livenessProbe:
- httpGet:
- path: /
- port: 3000
- failureThreshold: 10
- initialDelaySeconds: 30
- periodSeconds: 10
- volumes:
- - name: data
- persistentVolumeClaim:
- claimName: gogs-pvc
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: gogs-service
- namespace: gogs
- spec:
- selector:
- app: gogs
- type: ClusterIP
- ports:
- - name: gogs-web-port
- protocol: TCP
- port: 3000
- targetPort: http-web-svc
- - name: gogs-ssh-port
- protocol: TCP
- port: 22
- targetPort: ssh-svc
|