1
0
Fork 0

Compare commits

...

3 Commits

18 changed files with 165 additions and 193 deletions

View File

@ -1,7 +1,7 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: gitea name: server
labels: labels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
spec: spec:
@ -20,16 +20,22 @@ spec:
- name: gitea - name: gitea
image: gitea/gitea image: gitea/gitea
env: env:
- name: GITEA__SERVER__SSH_DOMAIN
valueFrom:
configMapKeyRef:
name: kustomize-generated-config
key: GITEA_EXTERNAL_HOST
- name: GITEA__SERVER__ROOT_URL - name: GITEA__SERVER__ROOT_URL
value: https://${GITEA_EXTERNAL_HOST} valueFrom:
- name: GITEA__WEBHOOK_ALLOWED_HOST_LIST configMapKeyRef:
value: ${DRONE_EXTERNAL_HOST} name: kustomize-generated-config
key: GITEA_EXTERNAL_URL
# - name: GITEA__WEBHOOK_ALLOWED_HOST_LIST
# value: ${DRONE_EXTERNAL_HOST}
- name: GITEA__DEFAULT__APP_NAME - name: GITEA__DEFAULT__APP_NAME
value: Badjware's code stash value: Badjware's code stash
- name: GITEA__SERVICE__DISABLE_REGISTRATION - name: GITEA__SERVICE__DISABLE_REGISTRATION
value: "yes" value: "yes"
- name: GITEA__SERVER__SSH_DOMAIN
value: ${GITEA_EXTERNAL_HOST}
- name: GITEA__SERVER__SSH_PORT - name: GITEA__SERVER__SSH_PORT
value: "30022" value: "30022"
- name: GITEA__METRICS__ENABLED - name: GITEA__METRICS__ENABLED
@ -56,7 +62,7 @@ spec:
volumes: volumes:
- name: gitea-pv - name: gitea-pv
persistentVolumeClaim: persistentVolumeClaim:
claimName: gitea-pvc claimName: server-pvc
# --- # ---
# apiVersion: v1 # apiVersion: v1
# kind: PersistentVolume # kind: PersistentVolume
@ -77,7 +83,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: gitea-pvc name: server-pvc
labels: labels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
spec: spec:
@ -94,7 +100,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: gitea name: server
labels: labels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
monitor: prometheus monitor: prometheus
@ -109,7 +115,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: gitea-ssh name: server-ssh
labels: labels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
spec: spec:

View File

@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: gitea name: server
labels: labels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
probe: blackbox-http probe: blackbox-http
@ -14,6 +14,6 @@ spec:
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: gitea name: server
port: port:
name: http name: http

View File

@ -2,6 +2,8 @@ resources:
- gitea-deployment.yaml - gitea-deployment.yaml
- gitea-ingress.yaml - gitea-ingress.yaml
namePrefix: gitea-
commonLabels: commonLabels:
app.kubernetes.io/name: gitea app.kubernetes.io/name: gitea
app.kubernetes.io/component: server app.kubernetes.io/component: server
@ -15,3 +17,21 @@ commonLabels:
# - database=gitea # - database=gitea
# - username=gitea # - username=gitea
# - password=changeme # - password=changeme
configMapGenerator:
- name: kustomize-generated-config
literals:
- GITEA_EXTERNAL_HOST=code.badjware.dev
- GITEA_EXTERNAL_URL=https://code.badjware.dev
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.GITEA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: server
fieldPaths:
- spec.rules.0.host

View File

@ -1,7 +1,7 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: grafana name: server
labels: labels:
app.kubernetes.io/name: grafana app.kubernetes.io/name: grafana
spec: spec:
@ -28,9 +28,15 @@ spec:
image: grafana/grafana image: grafana/grafana
env: env:
- name: GF_SERVER_DOMAIN - name: GF_SERVER_DOMAIN
value: ${GRAFANA_EXTERNAL_HOST} valueFrom:
configMapKeyRef:
name: kustomize-generated-config
key: GRAFANA_EXTERNAL_HOST
- name: GF_SERVER_ROOT_URL - name: GF_SERVER_ROOT_URL
value: https://${GRAFANA_EXTERNAL_HOST}/ valueFrom:
configMapKeyRef:
name: kustomize-generated-config
key: GRAFANA_EXTERNAL_URL
# - name: GF_AUTH_ANONYMOUS_ENABLED # - name: GF_AUTH_ANONYMOUS_ENABLED
# value: "true" # value: "true"
- name: GF_INSTALL_PLUGINS - name: GF_INSTALL_PLUGINS
@ -80,12 +86,12 @@ spec:
secretName: grafana-config secretName: grafana-config
- name: grafana-pv - name: grafana-pv
persistentVolumeClaim: persistentVolumeClaim:
claimName: grafana-pvc claimName: server-pvc
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: grafana-pvc name: server-pvc
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
@ -96,7 +102,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: grafana name: server
labels: labels:
app.kubernetes.io/name: grafana app.kubernetes.io/name: grafana
monitor: prometheus monitor: prometheus

View File

@ -1,7 +1,7 @@
apiVersion: external-secrets.io/v1beta1 apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret kind: ExternalSecret
metadata: metadata:
name: grafana-config name: server-config
spec: spec:
secretStoreRef: secretStoreRef:
name: aws-parameters-store name: aws-parameters-store

View File

@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: grafana name: server
labels: labels:
app.kubernetes.io/name: grafana app.kubernetes.io/name: grafana
probe: blackbox-http probe: blackbox-http
@ -14,6 +14,6 @@ spec:
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: grafana name: server
port: port:
name: http name: http

View File

@ -3,15 +3,34 @@ resources:
- grafana-ingress.yaml - grafana-ingress.yaml
- grafana-externalsecret.yaml - grafana-externalsecret.yaml
namePrefix: grafana-
commonLabels: commonLabels:
app.kubernetes.io/name: grafana app.kubernetes.io/name: grafana
app.kubernetes.io/component: server
app.kubernetes.io/part-of: monitoring app.kubernetes.io/part-of: monitoring
configMapGenerator: configMapGenerator:
- name: kustomize-generated-config
literals:
- GRAFANA_EXTERNAL_HOST=grafana.badjware.dev
- GRAFANA_EXTERNAL_URL=https://grafana.badjware.dev
- name: grafana-datasources - name: grafana-datasources
files: files:
- datasources.yaml=provision/datasources.yaml - datasources.yaml=provision/datasources.yaml
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.GRAFANA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: server
fieldPaths:
- spec.rules.0.host
# secretGenerator: # secretGenerator:
# - name: postgres-credentials # - name: postgres-credentials
# type: Opaque # type: Opaque

View File

@ -4,5 +4,26 @@ resources:
- longhorn-recurringjob.yaml - longhorn-recurringjob.yaml
- longhorn-externalsecret.yaml - longhorn-externalsecret.yaml
namePrefix: longhorn-
commonLabels: commonLabels:
app.kubernetes.io/name: longhorn app.kubernetes.io/name: longhorn
configMapGenerator:
- name: kustomize-generated-config
literals:
- LONGHORN_EXTERNAL_HOST=longhorn.badjnet.home
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.LONGHORN_EXTERNAL_HOST
targets:
- select:
kind: HelmChart
name: chart
fieldPaths:
- spec.set.[ingress.host]
options:
create: true

View File

@ -1,7 +1,7 @@
apiVersion: helm.cattle.io/v1 apiVersion: helm.cattle.io/v1
kind: HelmChart kind: HelmChart
metadata: metadata:
name: longhorn name: chart
namespace: kube-system namespace: kube-system
spec: spec:
repo: https://charts.longhorn.io repo: https://charts.longhorn.io

View File

@ -4,9 +4,28 @@ resources:
- nextcloud-deployment.yaml - nextcloud-deployment.yaml
- nextcloud-ingress.yaml - nextcloud-ingress.yaml
namePrefix: nextcloud-
commonLabels: commonLabels:
app.kubernetes.io/name: nextcloud app.kubernetes.io/name: nextcloud
configMapGenerator:
- name: kustomize-generated-config
literals:
- NEXTCLOUD_EXTERNAL_HOST=cloud.badjware.dev
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.NEXTCLOUD_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: server
fieldPaths:
- spec.rules.0.host
patches: patches:
- patch: |- - patch: |-
apiVersion: external-secrets.io/v1beta1 apiVersion: external-secrets.io/v1beta1

View File

@ -1,7 +1,7 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: nextcloud name: server
labels: labels:
app.kubernetes.io/name: nextcloud app.kubernetes.io/name: nextcloud
app.kubernetes.io/component: server app.kubernetes.io/component: server
@ -45,14 +45,14 @@ spec:
- name: TRUSTED_PROXIES - name: TRUSTED_PROXIES
value: 10.0.0.0/8 value: 10.0.0.0/8
- name: REDIS_HOST - name: REDIS_HOST
value: redis.$(NAMESPACE).svc.cluster.local value: nextcloud-redis.$(NAMESPACE).svc.cluster.local
- name: REDIS_HOST_PASSWORD - name: REDIS_HOST_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: redis-credentials name: redis-credentials
key: password key: password
- name: POSTGRES_HOST - name: POSTGRES_HOST
value: postgres.$(NAMESPACE).svc.cluster.local value: nextcloud-postgres.$(NAMESPACE).svc.cluster.local
- name: POSTGRES_DB - name: POSTGRES_DB
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -84,12 +84,12 @@ spec:
volumes: volumes:
- name: nextcloud-pv - name: nextcloud-pv
persistentVolumeClaim: persistentVolumeClaim:
claimName: nextcloud-pvc claimName: server-pvc
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: nextcloud-pvc name: server-pvc
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
@ -100,7 +100,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: nextcloud name: server
labels: labels:
app.kubernetes.io/name: nextcloud app.kubernetes.io/name: nextcloud
spec: spec:

View File

@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: nextcloud name: server
labels: labels:
app.kubernetes.io/name: nextcloud app.kubernetes.io/name: nextcloud
probe: blackbox-http probe: blackbox-http
@ -14,6 +14,6 @@ spec:
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: nextcloud name: server
port: port:
name: http name: http

View File

@ -4,6 +4,8 @@ resources:
- prometheus-ingress.yaml - prometheus-ingress.yaml
- traefik-podmonitor.yaml - traefik-podmonitor.yaml
namePrefix: prometheus-
commonLabels: commonLabels:
app.kubernetes.io/name: prometheus app.kubernetes.io/name: prometheus
app.kubernetes.io/part-of: monitoring app.kubernetes.io/part-of: monitoring
@ -20,5 +22,22 @@ secretGenerator:
literals: literals:
- prometheus-additional.yaml= - prometheus-additional.yaml=
configMapGenerator:
- name: kustomize-generated-config
literals:
- PROMETHEUS_EXTERNAL_HOST=prometheus.badjnet.home
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.PROMETHEUS_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: prometheus
fieldPaths:
- spec.rules.0.host
configurations: configurations:
- kustomizeconfig/namereference.yaml - kustomizeconfig/namereference.yaml

View File

@ -4,7 +4,26 @@ resources:
- traefik-helmchartconfig.yaml - traefik-helmchartconfig.yaml
- traefik-ingress.yaml - traefik-ingress.yaml
namePrefix: traefik-
namespace: kube-system namespace: kube-system
commonLabels: commonLabels:
app.kubernetes.io/name: traefik app.kubernetes.io/name: traefik
configMapGenerator:
- name: kustomize-generated-config
literals:
- TRAEFIK_EXTERNAL_HOST=traefik.badjnet.home
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.TRAEFIK_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: traefik
fieldPaths:
- spec.rules.0.host

View File

@ -3,6 +3,8 @@ resources:
# - ../../namespaces/kubernetes-dashboard # - ../../namespaces/kubernetes-dashboard
- ../../overlays/gitea - ../../overlays/gitea
# - ../../overlays/woodpecker
# - ../../overlays/gitlab
- ../../overlays/monitoring - ../../overlays/monitoring
- ../../overlays/nextcloud - ../../overlays/nextcloud
@ -34,22 +36,7 @@ images:
- name: redis - name: redis
newTag: 6.2.10 newTag: 6.2.10
configMapGenerator: # configMapGenerator:
- name: replacements
namespace: default
literals:
- TRAEFIK_EXTERNAL_HOST=traefik.badjnet.home
- LONGHORN_EXTERNAL_HOST=longhorn.badjnet.home
- GITEA_EXTERNAL_HOST=code.badjware.dev
- GITEA_EXTERNAL_URL=https://code.badjware.dev
- GRAFANA_EXTERNAL_HOST=grafana.badjware.dev
- GRAFANA_EXTERNAL_URL=https://grafana.badjware.dev
- DRONE_EXTERNAL_HOST=drone.badjware.dev
- NEXTCLOUD_EXTERNAL_HOST=cloud.badjware.dev
- PROMETHEUS_EXTERNAL_HOST=prometheus.badjnet.home
# - name: ecommerce-exporter-config # - name: ecommerce-exporter-config
# namespace: monitoring # namespace: monitoring
# behavior: replace # behavior: replace
@ -57,7 +44,7 @@ configMapGenerator:
# - ecommerce-exporter.yml=configurations/ecommerce-exporter/ecommerce-exporter.yml # - ecommerce-exporter.yml=configurations/ecommerce-exporter/ecommerce-exporter.yml
secretGenerator: secretGenerator:
- name: additional-scrape-configs - name: prometheus-additional-scrape-configs
type: Opaque type: Opaque
namespace: monitoring namespace: monitoring
behavior: replace behavior: replace
@ -72,7 +59,7 @@ patches:
- target: - target:
version: v1 version: v1
kind: Deployment kind: Deployment
name: nextcloud name: nextcloud-server
path: patches/nextcloud-deployment-patch.yaml path: patches/nextcloud-deployment-patch.yaml
# - target: # - target:
# version: v1 # version: v1
@ -82,145 +69,3 @@ patches:
# patchesStrategicMerge: # patchesStrategicMerge:
# - patches/blackbox-exporter-probe-patch.yaml # - patches/blackbox-exporter-probe-patch.yaml
replacements:
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.TRAEFIK_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: traefik
namespace: kube-system
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.LONGHORN_EXTERNAL_HOST
targets:
- select:
kind: HelmChart
name: longhorn
namespace: kube-system
fieldPaths:
- spec.set.[ingress.host]
options:
create: true
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GITEA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: gitea
namespace: gitea
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GITEA_EXTERNAL_URL
targets:
- select:
kind: Deployment
name: gitea
namespace: gitea
fieldPaths:
- spec.template.spec.containers.0.env.0.value
- select:
kind: Deployment
name: drone-server
namespace: gitea
fieldPaths:
- spec.template.spec.containers.0.env.0.value
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GRAFANA_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: grafana
namespace: monitoring
fieldPaths:
- spec.rules.0.host
- select:
kind: Deployment
name: grafana
namespace: monitoring
fieldPaths:
- spec.template.spec.containers.0.env.0.value
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.GRAFANA_EXTERNAL_URL
targets:
- select:
kind: Deployment
name: grafana
namespace: monitoring
fieldPaths:
- spec.template.spec.containers.0.env.1.value
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.DRONE_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: drone
namespace: gitea
fieldPaths:
- spec.rules.0.host
- select:
kind: Deployment
name: drone-server
namespace: gitea
fieldPaths:
- spec.template.spec.containers.0.env.1.value
- select:
kind: Deployment
name: gitea
namespace: gitea
fieldPaths:
- spec.template.spec.containers.0.env.1.value
- select:
kind: Deployment
name: drone-server
namespace: gitea
fieldPaths:
- spec.template.spec.containers.0.env.1.value
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.NEXTCLOUD_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: nextcloud
namespace: nextcloud
fieldPaths:
- spec.rules.0.host
- source:
kind: ConfigMap
name: replacements
namespace: default
fieldPath: data.PROMETHEUS_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: prometheus
namespace: monitoring
fieldPaths:
- spec.rules.0.host

View File

@ -1,7 +1,5 @@
resources: resources:
- namespace.yaml - namespace.yaml
- ../../bases/gitea - ../../bases/gitea
- ../../bases/drone-server
- ../../bases/drone-runner
namespace: gitea namespace: gitea

View File

@ -1,5 +1,6 @@
resources: resources:
- namespace.yaml - namespace.yaml
- ../../bases/prometheus-operator
- ../../bases/prometheus - ../../bases/prometheus
# - ../../bases/node-exporter # - ../../bases/node-exporter
- ../../bases/blackbox-exporter - ../../bases/blackbox-exporter

View File

@ -1,6 +1,5 @@
resources: resources:
- ../../bases/longhorn - ../../bases/longhorn
- ../../bases/traefik - ../../bases/traefik
- ../../bases/prometheus-operator
- ../../bases/external-secrets - ../../bases/external-secrets
- clustersecretstore.yaml - clustersecretstore.yaml