Compare commits
10 Commits
drone-ci
...
8050126d2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8050126d2d | ||
|
|
b5bbc5fa34 | ||
|
|
bbfa3f2964 | ||
|
|
0a60d8831c | ||
|
|
cc6f31b4b9 | ||
|
|
069502d056 | ||
|
|
278e6a9cd7 | ||
|
|
eba722992f | ||
|
|
871d47fff8 | ||
| 21238a032d |
@@ -3,6 +3,12 @@
|
||||
This repository contains configuration files and other assets, that are used to
|
||||
deploy and operate this Gitea instance.
|
||||
|
||||
To upload the customization files to the running pod:
|
||||
|
||||
```
|
||||
./script/copy_customization
|
||||
```
|
||||
|
||||
Feel free to [open issues] for questions, suggestions, bugs, to-do items, and
|
||||
whatever else you want to discuss or resolve.
|
||||
|
||||
|
||||
11
kubernetes/custom/options/label/Default
Normal file
11
kubernetes/custom/options/label/Default
Normal file
@@ -0,0 +1,11 @@
|
||||
#db231d bug ; Something is not working
|
||||
#76db1d enhancement ; Improving existing functionality
|
||||
#1d76db feature ; New functionality
|
||||
#db1d76 idea ; Something to consider
|
||||
#db1d76 question ; Looking for an answer
|
||||
#fbca04 security ; All your base are belong to us
|
||||
#1dd5db ui/ux ; User interface, process design, etc.
|
||||
#333333 dev environment ; Config, builds, CI, deployment, etc.
|
||||
#cccccc duplicate ; This issue or pull request already exists
|
||||
#cccccc invalid ; Not a bug
|
||||
#cccccc wontfix ; This won't be fixed
|
||||
14
kubernetes/custom/options/label/Kosmos
Normal file
14
kubernetes/custom/options/label/Kosmos
Normal file
@@ -0,0 +1,14 @@
|
||||
#db231d bug ; Something is not working
|
||||
#76db1d enhancement ; Improving existing functionality
|
||||
#1d76db feature ; New functionality
|
||||
#db1d76 idea ; Something to consider
|
||||
#db1d76 question ; Looking for an answer
|
||||
#fbca04 security ; All your base are belong to us
|
||||
#1dd5db ui/ux ; User interface, process design, etc.
|
||||
#333333 dev environment ; Config, builds, CI, deployment, etc.
|
||||
#008080 kredits-1 ; Small contribution
|
||||
#008080 kredits-2 ; Medium contribution
|
||||
#008080 kredits-3 ; Large contribution
|
||||
#cccccc duplicate ; This issue or pull request already exists
|
||||
#cccccc invalid ; Not a bug
|
||||
#cccccc wontfix ; This won't be fixed
|
||||
@@ -15,18 +15,18 @@ spec:
|
||||
initContainers:
|
||||
- name: init-config
|
||||
image: busybox
|
||||
command: ['sh', '-c', 'mkdir -p /data/gitea/conf && mkdir -p /data/gitea/https && cp /root/conf/app.ini /data/gitea/conf/app.ini && chown 1000:1000 /data/gitea/conf/app.ini && chmod 660 /data/gitea/conf/app.ini && cp /root/conf/*.pem /data/gitea/https && chmod 600 /data/gitea/https/*.pem && chown -R 1000:1000 /data/gitea']
|
||||
command: [
|
||||
'sh', '-c',
|
||||
'mkdir -p /data/gitea/conf && mkdir -p /data/gitea/https && cp /root/conf/app.ini /data/gitea/conf/app.ini && chown 1000:1000 /data/gitea/conf/app.ini && chmod 660 /data/gitea/conf/app.ini && cp /root/conf/*.pem /data/gitea/https && chmod 600 /data/gitea/https/*.pem && chown -R 1000:1000 /data/gitea'
|
||||
]
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: gitea-server-data
|
||||
- mountPath: /root/conf
|
||||
name: config
|
||||
containers:
|
||||
# This is only used for the initial setup, it does nothing once a app.ini
|
||||
# file exists in the conf/ directory of the data directory
|
||||
# (/data/gitea/conf in our case)
|
||||
- name: gitea-server
|
||||
image: gitea/gitea:1.7.1
|
||||
image: gitea/gitea:1.7.5
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
- containerPort: 3001
|
||||
@@ -64,7 +64,7 @@ spec:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storage: 20Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
11
script/copy_customization
Executable file
11
script/copy_customization
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for podname in $(kubectl get pods -l name=gitea-server -o json \
|
||||
| jq -r '.items[].metadata.name'); do
|
||||
for path in ./kubernetes/custom/*; do
|
||||
echo "Copying ${path}..."
|
||||
kubectl cp "${path}" "${podname}":"/data/gitea/"
|
||||
done
|
||||
# Fix permissions
|
||||
kubectl exec "${podname}" -- chown -R 1000:1000 /data/gitea/
|
||||
done
|
||||
Reference in New Issue
Block a user