buildbot: renam/intro

This commit is contained in:
Nico Schottelius 2021-07-28 20:19:27 +02:00
parent e6ac22689a
commit b3f8e33212

View file

@ -2,39 +2,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-gitea
name: {{ .Release.Name }}-buildbot
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-gitea
app: {{ .Release.Name }}-buildbot
replicas: 1
template:
metadata:
labels:
app: {{ .Release.Name }}-gitea
app: {{ .Release.Name }}-buildbot
use-as-service: {{ .Release.Name }}
spec:
initContainers:
- name: wait-for-cert
image: busybox
command:
- sh
- -c
- until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 5; done
volumeMounts:
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
# - name: wait-for-cert
# image: busybox
# command:
# - sh
# - -c
# - until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 5; done
# volumeMounts:
# - name: etcletsencrypt
# mountPath: "/etc/letsencrypt"
containers:
# This container will only start *after* the cert has been placed
- name: nginx
image: nginx:1.21-alpine
ports:
- containerPort: 443
volumeMounts:
- name: nginx-config
mountPath: "/etc/nginx/conf.d/"
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
# - name: nginx
# image: nginx:1.21-alpine
# ports:
# - containerPort: 443
# volumeMounts:
# - name: nginx-config
# mountPath: "/etc/nginx/conf.d/"
# - name: etcletsencrypt
# mountPath: "/etc/letsencrypt"
- name: postgres
image: postgres:13
ports:
@ -47,39 +47,34 @@ spec:
- name: postgres-data
mountPath: "/var/lib/postgresql/data"
subPath: postgres
- name: gitea
image: gitea/gitea:{{ .Chart.AppVersion }}
- name: buildbot
image: buildbot/buildbot:v{{ .Chart.AppVersion }}
ports:
- containerPort: 22
- containerPort: 3000
securityContext:
capabilities:
add:
- SYS_CHROOT
- containerPort: 8010
env:
- name: USER_UID
value: "1000"
- name: USER_GID
value: "1000"
- name: GITEA__server__DOMAIN
value: "{{ tpl .Values.fqdn . }}"
- name: GITEA__server__ROOT_URL
value: "https://{{ tpl .Values.fqdn . }}"
- name: GITEA__database__DB_TYPE
value: "postgres"
- name: GITEA__database__HOST
# - name: USER_UID
# value: "1000"
# - name: USER_GID
# value: "1000"
# - name: BUILDBOT__server__DOMAIN
# value: "{{ tpl .Values.fqdn . }}"
# - name: BUILDBOT__server__ROOT_URL
# value: "https://{{ tpl .Values.fqdn . }}"
- name: BUILDBOT_DB_URL
value: "postgresql+psycopg2://{POSTGRES_USER}:{POSTGRES_PASSWORD}@db/{POSTGRES_DB}"
- name: BUILDBOT__database__HOST
value: "localhost"
- name: GITEA__database__NAME
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_DB
- name: GITEA__database__USER
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
key: POSTGRES_USER
- name: GITEA__database__PASSWD
- name: POSTGRES_PASSWORD
valueFrom:
configMapKeyRef:
name: {{ tpl .Values.identifier . }}-postgres-config
@ -113,22 +108,13 @@ metadata:
spec:
type: ClusterIP
ports:
- port: 22
name: ssh
# Required for letsencrypt
- port: 80
- port: 8010
name: http
- port: 443
name: https
selector:
use-as-service: {{ .Release.Name }}
# ---
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: {{ tpl .Values.identifier . }}-giteaconfig
# data:
# {{ tpl (.Files.Glob "gitea/*").AsConfig . | indent 2 }}
---
apiVersion: v1
kind: PersistentVolumeClaim
@ -200,34 +186,34 @@ spec:
persistentVolumeClaim:
claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs
backoffLimit: 3
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.identifier . }}-nginx-config
data:
default.conf: |
server {
listen 443 ssl;
listen [::]:443 ssl;
#---
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: {{ tpl .Values.identifier . }}-nginx-config
# data:
# default.conf: |
# server {
# listen 443 ssl;
# listen [::]:443 ssl;
server_name {{ tpl .Values.fqdn . }};
# server_name {{ tpl .Values.fqdn . }};
ssl_certificate /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/privkey.pem;
# ssl_certificate /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/privkey.pem;
client_max_body_size 256m;
# client_max_body_size 256m;
location / {
proxy_pass http://localhost:3000;
}
}
# location / {
# proxy_pass http://localhost:3000;
# }
# }
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.identifier . }}-postgres-config
data:
POSTGRES_USER: gitea
POSTGRES_USER: buildbot
POSTGRES_PASSWORD: aiJohtoqueeng0oosh8ohfoh1chahPh3
POSTGRES_DB: gitea
POSTGRES_DB: buildbot