setup prod
This commit is contained in:
parent
b9c69e3f4b
commit
f90e1bb0b5
|
@ -91,6 +91,5 @@ spec:
|
|||
app.kubernetes.io/component: runner
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 3000
|
||||
targetPort: http
|
|
@ -68,6 +68,5 @@ spec:
|
|||
app.kubernetes.io/component: server
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: http
|
|
@ -5,7 +5,9 @@ metadata:
|
|||
labels:
|
||||
app.kubernetes.io/name: gitea
|
||||
spec:
|
||||
replicas: 1 # replica count must be set to 1 in database is sqlite
|
||||
replicas: 1 # gitea doesn't handle HA well
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: gitea
|
||||
|
@ -18,42 +20,22 @@ spec:
|
|||
- name: gitea
|
||||
image: gitea/gitea
|
||||
env:
|
||||
# - name: INSTALL_LOCK
|
||||
# value: "yes"
|
||||
- name: DISABLE_REGISTRATION
|
||||
value: "yes"
|
||||
- name: APP_NAME
|
||||
- name: GITEA__DEFAULT__APP_NAME
|
||||
value: Badjware's code stash
|
||||
- name: RUN_MODE
|
||||
value: prod
|
||||
- name: ROOT_URL
|
||||
- name: GITEA__SERVICE__DISABLE_REGISTRATION
|
||||
value: "yes"
|
||||
- name: GITEA__SERVER__ROOT_URL
|
||||
value: https://${GITEA_EXTERNAL_HOST}
|
||||
- name: SSH_DOMAIN
|
||||
- name: GITEA__SERVER__SSH_DOMAIN
|
||||
value: ${GITEA_EXTERNAL_HOST}
|
||||
- name: GITEA__SERVER__SSH_PORT
|
||||
value: "30022"
|
||||
- name: GITEA__METRICS__ENABLED
|
||||
value: "true"
|
||||
# - name: DB_TYPE
|
||||
# value: postgres
|
||||
# - name: DB_HOST
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: host
|
||||
# - name: DB_NAME
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: database
|
||||
# - name: DB_USER
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: username
|
||||
# - name: DB_PASSWD
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: password
|
||||
- name: GITEA__REPOSITORY__DISABLED_REPO_UNITS
|
||||
value: repo.wiki
|
||||
- name: GITEA__REPOSITORY__DEFAULT_REPO_UNITS
|
||||
value: repo.code,repo.releases
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
|
@ -119,10 +101,20 @@ spec:
|
|||
app.kubernetes.io/name: gitea
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: http
|
||||
- name: ssh
|
||||
protocol: TCP
|
||||
port: 22
|
||||
targetPort: ssh
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitea-ssh
|
||||
labels:
|
||||
app.kubernetes.io/name: gitea
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app.kubernetes.io/name: gitea
|
||||
ports:
|
||||
- port: 22
|
||||
targetPort: ssh
|
||||
nodePort: 30022
|
|
@ -5,6 +5,9 @@ metadata:
|
|||
labels:
|
||||
app.kubernetes.io/name: grafana
|
||||
spec:
|
||||
replicas: 1 # we can only have 1 replica for as long as the database is sqlite
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: grafana
|
||||
|
@ -107,6 +110,5 @@ spec:
|
|||
app.kubernetes.io/name: grafana
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 3000
|
||||
targetPort: http
|
|
@ -1,2 +1,3 @@
|
|||
resources:
|
||||
- https://raw.githubusercontent.com/longhorn/longhorn/v1.2.0/deploy/longhorn.yaml
|
||||
- https://raw.githubusercontent.com/longhorn/longhorn/v1.2.0/deploy/longhorn.yaml
|
||||
- longhorn-ingress.yaml
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: longhorn-frontend
|
||||
namespace: longhorn-system
|
||||
labels:
|
||||
app.kubernetes.io/name: longhorn-ui
|
||||
spec:
|
||||
rules:
|
||||
- host: ${LONGHORN_EXTERNAL_HOST}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: longhorn-frontend
|
||||
port:
|
||||
name: http
|
|
@ -94,6 +94,5 @@ spec:
|
|||
app.kubernetes.io/name: nextcloud
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: http
|
|
@ -63,5 +63,4 @@ spec:
|
|||
ports:
|
||||
- name: http-metrics
|
||||
port: 9100
|
||||
protocol: TCP
|
||||
targetPort: http-metrics
|
|
@ -7,3 +7,6 @@ bases:
|
|||
# allow "kubectl apply -l managed-by=cluster --prune ..."
|
||||
commonlabels:
|
||||
managed-by: kustomize-cluster
|
||||
|
||||
transformers:
|
||||
- transformers/placeholders.yaml
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
LONGHORN_EXTERNAL_HOST=longhorn.badjnet.local
|
|
@ -0,0 +1,5 @@
|
|||
apiVersion: badjware/v1
|
||||
kind: PlaceholderTransformer
|
||||
metadata:
|
||||
name: placeholders
|
||||
placeholdersFile: placeholders.txt
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: badjware/v1
|
||||
kind: SSMParameterPlaceholderTransformer
|
||||
metadata:
|
||||
name: ssm-parameter
|
||||
resourceSelectors:
|
||||
- kind: Secret
|
|
@ -1,40 +1,40 @@
|
|||
# bases:
|
||||
# - ../../namespaces/kubernetes-dashboard
|
||||
# - ../../namespaces/gitea
|
||||
# - ../../namespaces/grafana
|
||||
# - ../../namespaces/monitoring
|
||||
bases:
|
||||
- ../../namespaces/kubernetes-dashboard
|
||||
- ../../namespaces/gitea
|
||||
- ../../namespaces/grafana
|
||||
- ../../namespaces/monitoring
|
||||
|
||||
# images:
|
||||
# - name: gitea/gitea
|
||||
# newtag: 1.15.0
|
||||
# - name: grafana
|
||||
# newtag: 8.1.2
|
||||
# - name: drone/drone
|
||||
# newtag: 2.0.6
|
||||
# - name: drone/drone-runner-kube
|
||||
# newtag: 1.0.0-beta.9
|
||||
images:
|
||||
- name: gitea/gitea
|
||||
newtag: 1.15.0
|
||||
- name: grafana
|
||||
newtag: 8.1.2
|
||||
- name: drone/drone
|
||||
newtag: 2.0.6
|
||||
- name: drone/drone-runner-kube
|
||||
newtag: 1.0.0-beta.9
|
||||
|
||||
# secretGenerator:
|
||||
# - name: drone-secret
|
||||
# type: Opaque
|
||||
# namespace: gitea
|
||||
# behavior: replace
|
||||
# literals:
|
||||
# - rpc_secret=9128146e66f104873df80dad3ef12cf0
|
||||
# # https://docs.drone.io/server/provider/gitea/
|
||||
# - name: drone-gitea-oauth-secret
|
||||
# type: Opaque
|
||||
# namespace: gitea
|
||||
# behavior: replace
|
||||
# literals:
|
||||
# - client_id=6c0c6878-baf1-4648-b0cf-69eeae69e692
|
||||
# - client_secret=Q78VsgyfgTzKrvQEmokEMj84g7epKrlBpmDjcbhKXCIh
|
||||
secretGenerator:
|
||||
- name: drone-secret
|
||||
type: Opaque
|
||||
namespace: gitea
|
||||
behavior: replace
|
||||
literals:
|
||||
- rpc_secret=${ssm:/k3s/prod/drone/gitea/rpc_secret}
|
||||
# https://docs.drone.io/server/provider/gitea/
|
||||
- name: drone-gitea-oauth-secret
|
||||
type: Opaque
|
||||
namespace: gitea
|
||||
behavior: replace
|
||||
literals:
|
||||
- client_id=${ssm:/k3s/prod/drone/gitea/client_id}
|
||||
- client_secret=${ssm:/k3s/prod/drone/gitea/client_secret}
|
||||
|
||||
# # allow "kubectl apply -l managed-by=kustomize --prune ..."
|
||||
# commonlabels:
|
||||
# managed-by: kustomize
|
||||
# allow "kubectl apply -l managed-by=kustomize --prune ..."
|
||||
commonlabels:
|
||||
managed-by: kustomize
|
||||
|
||||
# transformers:
|
||||
# - transformers/placeholders.yaml
|
||||
# # - transformers/ssm-secrets.yaml
|
||||
transformers:
|
||||
- transformers/placeholders.yaml
|
||||
- transformers/ssm-secrets.yaml
|
||||
|
||||
|
|
Loading…
Reference in New Issue