diff --git a/kustomize/bases/actual/actual-deployment.yaml b/kustomize/bases/actual/actual-deployment.yaml new file mode 100644 index 0000000..ddd0699 --- /dev/null +++ b/kustomize/bases/actual/actual-deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: server + labels: + app.kubernetes.io/name: actual +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: actual + template: + metadata: + labels: + app.kubernetes.io/name: actual + spec: + containers: + - name: actual + image: actualbudget/actual-server + ports: + - name: http + containerPort: 5006 + resources: + requests: + cpu: 250m + memory: 500Mi + limits: + cpu: 250m + memory: 500Mi + volumeMounts: + - name: actual-pv + mountPath: /data + volumes: + - name: actual-pv + persistentVolumeClaim: + claimName: server-pvc +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: server-pvc + labels: + app.kubernetes.io/name: actual +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +--- +apiVersion: v1 +kind: Service +metadata: + name: server + labels: + app.kubernetes.io/name: actual + monitor: prometheus +spec: + selector: + app.kubernetes.io/name: actual + ports: + - name: http + port: 5006 + targetPort: http \ No newline at end of file diff --git a/kustomize/bases/actual/actual-ingress.yaml b/kustomize/bases/actual/actual-ingress.yaml new file mode 100644 index 0000000..b79a1dc --- /dev/null +++ b/kustomize/bases/actual/actual-ingress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: server + labels: + app.kubernetes.io/name: actual + probe: blackbox-http +spec: + rules: + - host: ${ACTUAL_EXTERNAL_HOST} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: server + port: + name: http diff --git a/kustomize/bases/actual/kustomization.yaml b/kustomize/bases/actual/kustomization.yaml new file mode 100644 index 0000000..e8a2ddb --- /dev/null +++ b/kustomize/bases/actual/kustomization.yaml @@ -0,0 +1,23 @@ +resources: + - actual-deployment.yaml + - actual-ingress.yaml + +namePrefix: actual- + +configMapGenerator: + - name: kustomize-generated-config + literals: + - ACTUAL_EXTERNAL_HOST=actual.badjware.dev + - ACTUAL_EXTERNAL_URL=https://actual.badjware.dev + +replacements: + - source: + kind: ConfigMap + name: kustomize-generated-config + fieldPath: data.ACTUAL_EXTERNAL_HOST + targets: + - select: + kind: Ingress + name: server + fieldPaths: + - spec.rules.0.host diff --git a/kustomize/env/prod/kustomization.yaml b/kustomize/env/prod/kustomization.yaml index 144babd..cd48131 100644 --- a/kustomize/env/prod/kustomization.yaml +++ b/kustomize/env/prod/kustomization.yaml @@ -10,6 +10,7 @@ resources: - ../../overlays/home-assistant - ../../overlays/jellyfin - ../../overlays/deluge + - ../../overlays/actual - probes/snmp-exporter.yaml # resources: diff --git a/kustomize/overlays/actual/kustomization.yaml b/kustomize/overlays/actual/kustomization.yaml new file mode 100644 index 0000000..48c01f6 --- /dev/null +++ b/kustomize/overlays/actual/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - namespace.yaml + - ../../bases/actual + +namespace: actual diff --git a/kustomize/overlays/actual/namespace.yaml b/kustomize/overlays/actual/namespace.yaml new file mode 100644 index 0000000..9bb8120 --- /dev/null +++ b/kustomize/overlays/actual/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: actual \ No newline at end of file