12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- ---
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: gogs
- namespace: cicd
- spec:
- selector:
- matchLabels:
- app: gogs
- replicas: 1
- updateStrategy:
- type: RollingUpdate
- serviceName: gogs
- podManagementPolicy: OrderedReady
- template:
- metadata:
- labels:
- app: gogs
- app.kubernetes.io/name: gogs
- spec:
- volumes:
- - name: appconf
- configMap:
- # Provide the name of the ConfigMap you want to mount.
- name: gogs-app-ini
- # An array of keys from the ConfigMap to create as files
- items:
- - key: "app.ini"
- path: "app.ini"
- - name: gogs-data
- persistentVolumeClaim:
- claimName: gogs-pvc
- containers:
- - name: gogs
- volumeMounts:
- - name: appconf
- mountPath: "/data/gogs/conf"
- readOnly: true
- - name: gogs-data
- mountPath: /data
- subPath: 'gogs-data'
- - name: gogs-data
- mountPath: /etc/ssh
- subPath: 'ssh'
- image: gogs/gogs
- imagePullPolicy: IfNotPresent
- ports:
- - name: web
- containerPort: 6161
- protocol: TCP
- - name: ssh
- containerPort: 22
- protocol: TCP
- resources:
- limits:
- memory: 1000Mi
- cpu: 1000m
- ephemeral-storage: 10Gi
- securityContext:
- allowPrivilegeEscalation: false
- #runAsGroup: ''
- env:
- - name: TZ
- value: "Asia/Shanghai"
- - name: SOCAT_LINK
- value: "false"
|