diff --git a/kubernetes/apps/home-automation/locking-service/app/configuration.yaml b/kubernetes/apps/home-automation/locking-service/app/configuration.yaml new file mode 100644 index 000000000..6a3dcf3b5 --- /dev/null +++ b/kubernetes/apps/home-automation/locking-service/app/configuration.yaml @@ -0,0 +1,13 @@ +--- +app: + port: 3000 + host: 127.0.0.1 + +redis: + # host: redis.database.svc.cluster.local + # port: 6379 + keyPrefix: locking-service. + sentinels: + - host: redis.database.svc.cluster.local + port: 26379 + name: redis-master diff --git a/kubernetes/apps/home-automation/locking-service/app/helm-release.yaml b/kubernetes/apps/home-automation/locking-service/app/helm-release.yaml new file mode 100644 index 000000000..8c43242ff --- /dev/null +++ b/kubernetes/apps/home-automation/locking-service/app/helm-release.yaml @@ -0,0 +1,58 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: &app locking-service +spec: + interval: 15m + chart: + spec: + chart: app-template + version: 1.5.1 + interval: 15m + sourceRef: + kind: HelmRepository + name: bjw-s-charts + namespace: flux-system + maxHistory: 15 + install: + createNamespace: true + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + retries: 3 + uninstall: + keepHistory: false + values: + image: + repository: ghcr.io/tyriis/locking-service + tag: v0.0.4 + env: + TZ: ${SETTING_TZ} + NODE_ENV: production + CONFIG_PATH: /config/configuration.yaml + service: + main: + ports: + http: + port: 3000 + persistence: + config: + enabled: true + type: custom + readOnly: true + volumeSpec: + configMap: + name: locking-service-config + subPath: + - path: configuration.yaml + mountPath: /config/configuration.yaml + + podAnnotations: + configmap.reloader.stakater.com/reload: locking-service-config + + ingress: + main: + enabled: false diff --git a/kubernetes/apps/home-automation/locking-service/app/kustomization.yaml b/kubernetes/apps/home-automation/locking-service/app/kustomization.yaml new file mode 100644 index 000000000..93462e220 --- /dev/null +++ b/kubernetes/apps/home-automation/locking-service/app/kustomization.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: home-automation +resources: + - helm-release.yaml +commonLabels: + app.kubernetes.io/name: locking-service + app.kubernetes.io/instance: locking-service + app.kubernetes.io/managed-by: fluxcd.io +configMapGenerator: + - name: locking-service-config + behavior: create + files: + - configuration.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/kubernetes/apps/home-automation/locking-service/flux-sync.yaml b/kubernetes/apps/home-automation/locking-service/flux-sync.yaml new file mode 100644 index 000000000..c8e94e0e8 --- /dev/null +++ b/kubernetes/apps/home-automation/locking-service/flux-sync.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: apps-locking-service + namespace: flux-system + labels: + substitution.flux.home.arpa/enabled: "true" +spec: + interval: 10m + path: ./kubernetes/apps/home-automation/locking-service/app + prune: true + sourceRef: + kind: GitRepository + name: home-ops + wait: true