Refactor Gitea deployment: remove init containers and streamline configuration
This commit is contained in:
@@ -16,81 +16,13 @@ spec:
|
|||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
app: gitea
|
||||||
component: web
|
component: web
|
||||||
|
managedBy: wild-cloud
|
||||||
|
partOf: wild-cloud
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
initContainers:
|
|
||||||
- name: init-directories
|
|
||||||
image: "{{ .apps.gitea.image }}"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command:
|
|
||||||
- "/usr/sbin/init_directory_structure.sh"
|
|
||||||
env:
|
|
||||||
- name: GITEA_APP_INI
|
|
||||||
value: /data/gitea/conf/app.ini
|
|
||||||
- name: GITEA_CUSTOM
|
|
||||||
value: /data/gitea
|
|
||||||
- name: GITEA_WORK_DIR
|
|
||||||
value: /data
|
|
||||||
- name: GITEA_TEMP
|
|
||||||
value: /tmp/gitea
|
|
||||||
volumeMounts:
|
|
||||||
- name: init
|
|
||||||
mountPath: /usr/sbin
|
|
||||||
- name: temp
|
|
||||||
mountPath: /tmp
|
|
||||||
- name: data
|
|
||||||
mountPath: /data
|
|
||||||
securityContext:
|
|
||||||
{}
|
|
||||||
resources:
|
|
||||||
limits: {}
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
- name: configure-gitea
|
|
||||||
image: "{{ .apps.gitea.image }}"
|
|
||||||
command:
|
|
||||||
- "/usr/sbin/configure_gitea.sh"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
env:
|
|
||||||
- name: GITEA_APP_INI
|
|
||||||
value: /data/gitea/conf/app.ini
|
|
||||||
- name: GITEA_CUSTOM
|
|
||||||
value: /data/gitea
|
|
||||||
- name: GITEA_WORK_DIR
|
|
||||||
value: /data
|
|
||||||
- name: GITEA_TEMP
|
|
||||||
value: /tmp/gitea
|
|
||||||
- name: HOME
|
|
||||||
value: /data/gitea/git
|
|
||||||
- name: GITEA_ADMIN_USERNAME
|
|
||||||
value: "{{ .apps.gitea.adminUser }}"
|
|
||||||
- name: GITEA_ADMIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: gitea-secrets
|
|
||||||
key: adminPassword
|
|
||||||
- name: GITEA_ADMIN_PASSWORD_MODE
|
|
||||||
value: keepUpdated
|
|
||||||
volumeMounts:
|
|
||||||
- name: init
|
|
||||||
mountPath: /usr/sbin
|
|
||||||
- name: temp
|
|
||||||
mountPath: /tmp
|
|
||||||
- name: data
|
|
||||||
mountPath: /data
|
|
||||||
- name: config
|
|
||||||
mountPath: /data/gitea/conf/app.ini
|
|
||||||
subPath: app.ini
|
|
||||||
resources:
|
|
||||||
limits: {}
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 60
|
||||||
containers:
|
containers:
|
||||||
- name: gitea
|
- name: gitea
|
||||||
@@ -113,6 +45,15 @@ spec:
|
|||||||
value: /tmp/gitea
|
value: /tmp/gitea
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: /data/gitea/git
|
value: /data/gitea/git
|
||||||
|
- name: GITEA_ADMIN_USERNAME
|
||||||
|
value: "admin"
|
||||||
|
- name: GITEA_ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: gitea-secrets
|
||||||
|
key: adminPassword
|
||||||
|
- name: GITEA_ADMIN_PASSWORD_MODE
|
||||||
|
value: keepUpdated
|
||||||
- name: GITEA__security__SECRET_KEY
|
- name: GITEA__security__SECRET_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@@ -158,17 +99,7 @@ spec:
|
|||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
- name: config
|
|
||||||
mountPath: /data/gitea/conf/app.ini
|
|
||||||
subPath: app.ini
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: init
|
|
||||||
configMap:
|
|
||||||
name: gitea-config
|
|
||||||
defaultMode: 0o110
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: gitea-config
|
|
||||||
- name: temp
|
- name: temp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: data
|
- name: data
|
||||||
|
Reference in New Issue
Block a user