Compare commits
14 Commits
2f02ddb79d
...
feature/st
| Author | SHA1 | Date | |
|---|---|---|---|
| 1928fdad6e | |||
| 2ab0db6c2a | |||
| d6d70af0ad | |||
| 75881c4c3f | |||
| 3cd4b3102c | |||
| 11ae884dea | |||
| 6785287227 | |||
| d4784e9787 | |||
| da278556ed | |||
| 4dd0f4b844 | |||
| b6894598a6 | |||
| 972bbedb87 | |||
| db396d6ee1 | |||
| d821e02dec |
19
README.md
19
README.md
@@ -6,21 +6,4 @@ issues](https://gitea.kosmos.org/kosmos/gitea.kosmos.org/issues) for questions,
|
||||
suggestions, bugs, to-do items, and whatever else you want to discuss or
|
||||
resolve.
|
||||
|
||||
## Building & deploying
|
||||
|
||||
To create a new image containing the customizations:
|
||||
|
||||
Edit `packer/custom.json` to increment the tag, then run this script (needs
|
||||
[Packer](https://www.packer.io/) in your path)
|
||||
|
||||
|
||||
./script/build_customizations_image
|
||||
|
||||
|
||||
Then edit `kubernetes/gitea-server.yaml` to use the new tag
|
||||
(`image: eu.gcr.io/fluted-magpie-218106/gitea_custom:$VERSION`) and apply the
|
||||
change:
|
||||
|
||||
|
||||
cd kubernetes
|
||||
kubectl apply -f gitea-server.yaml
|
||||
See `doc/` folder for some technical info.
|
||||
|
||||
20
doc/customizations-image.md
Normal file
20
doc/customizations-image.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## Customizations image
|
||||
|
||||
### Build
|
||||
|
||||
To create a new Docker image containing our Gitea customizations (label sets,
|
||||
styles, page content, etc.):
|
||||
|
||||
Edit `packer/custom.json` to increment the tag, then run this script (needs
|
||||
[Packer](https://www.packer.io/) in your path)
|
||||
|
||||
./script/build_customizations_image
|
||||
|
||||
### Deploy
|
||||
|
||||
Edit `kubernetes/gitea-server.yaml` to use the new tag
|
||||
(`image: eu.gcr.io/fluted-magpie-218106/gitea_custom:$VERSION`) and apply the
|
||||
change:
|
||||
|
||||
cd kubernetes
|
||||
kubectl apply -f gitea-server.yaml
|
||||
103
kubernetes/gitea-server-statefulset.yaml
Normal file
103
kubernetes/gitea-server-statefulset.yaml
Normal file
@@ -0,0 +1,103 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: gitea-server
|
||||
labels:
|
||||
app: gitea
|
||||
spec:
|
||||
serviceName: gitea-server
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: gitea-server
|
||||
app: gitea
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-config
|
||||
# This is a busybox image with our gitea customizations saved to
|
||||
# /custom, built using ./script/build_customizations_image from the
|
||||
# root of the repo
|
||||
image: eu.gcr.io/fluted-magpie-218106/gitea_custom:0.1.2
|
||||
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 && cp -R /custom/* /data/gitea && chown -R 1000:1000 /data/gitea'
|
||||
]
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: gitea-server-data
|
||||
- mountPath: /root/conf
|
||||
name: config
|
||||
containers:
|
||||
- name: gitea-server
|
||||
image: gitea/gitea:1.10.1
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
- containerPort: 3001
|
||||
- containerPort: 22
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: gitea-server-data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: config
|
||||
secret:
|
||||
secretName: gitea-config
|
||||
items:
|
||||
- key: app.ini
|
||||
path: app.ini
|
||||
mode: 256
|
||||
- key: cert.pem
|
||||
path: cert.pem
|
||||
mode: 256
|
||||
- key: key.pem
|
||||
path: key.pem
|
||||
mode: 256
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: gitea-server-data
|
||||
labels:
|
||||
app: gitea
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
storageClassName: gcePersistentDisk
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitea-server
|
||||
labels:
|
||||
name: gitea-server
|
||||
app: gitea
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
# preserves the client source IP
|
||||
externalTrafficPolicy: Local
|
||||
ports:
|
||||
- name: "ssh"
|
||||
port: 22
|
||||
targetPort: 22
|
||||
- name: "http"
|
||||
port: 80
|
||||
targetPort: 3001
|
||||
- name: "https"
|
||||
port: 443
|
||||
targetPort: 3000
|
||||
selector:
|
||||
name: gitea-server
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
name: config
|
||||
containers:
|
||||
- name: gitea-server
|
||||
image: gitea/gitea:1.9.0
|
||||
image: gitea/gitea:1.10.1
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
- containerPort: 3001
|
||||
@@ -42,10 +42,10 @@ spec:
|
||||
name: gitea-server-data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
cpu: 150m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user