forked from ab/homelab
added KHM app
This commit is contained in:
21
k8s/apps/khm/app.yaml
Normal file
21
k8s/apps/khm/app.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: khm
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: homelab
|
||||||
|
destination:
|
||||||
|
namespace: khm
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
source:
|
||||||
|
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: k8s/apps/khm
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
prune: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
|
47
k8s/apps/khm/deployment.yaml
Normal file
47
k8s/apps/khm/deployment.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: khm
|
||||||
|
namespace: khm
|
||||||
|
labels:
|
||||||
|
app: khm
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: khm
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: khm
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
||||||
|
containers:
|
||||||
|
- name: khm
|
||||||
|
image: 'ultradesu/khm:latest'
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
/usr/local/bin/khm --server --db-user=${PG_USER} --db-password=${PG_PASS} --flows=default --db-host=psql.psql.svc --ip=0.0.0.0
|
||||||
|
env:
|
||||||
|
- name: PG_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: khm-pg-creds
|
||||||
|
key: PG_USER
|
||||||
|
- name: PG_PASS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: khm-pg-creds
|
||||||
|
key: PG_PASS
|
||||||
|
- name: RUST_LOG
|
||||||
|
value: khm=info
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
25
k8s/apps/khm/external-secrets.yaml
Normal file
25
k8s/apps/khm/external-secrets.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: khm-pg-creds
|
||||||
|
namespace: khm
|
||||||
|
spec:
|
||||||
|
target:
|
||||||
|
name: khm-pg-creds
|
||||||
|
deletionPolicy: Delete
|
||||||
|
template:
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
PG_USER: "khm"
|
||||||
|
PG_PASS: |-
|
||||||
|
{{ .pass }}
|
||||||
|
data:
|
||||||
|
- secretKey: pass
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: 2a9deb39-ef22-433e-a1be-df1555625e22
|
||||||
|
property: fields[3].value
|
9
k8s/apps/khm/kustomization.yaml
Normal file
9
k8s/apps/khm/kustomization.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- app.yaml
|
||||||
|
- external-secrets.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
|
14
k8s/apps/khm/service.yaml
Normal file
14
k8s/apps/khm/service.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: khm
|
||||||
|
namespace: khm
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: khm
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
|
Reference in New Issue
Block a user