Skip to content

Commit

Permalink
feat(locking-service): deploy to cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tyriis committed Sep 18, 2023
1 parent 341e1b2 commit 7998c02
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions kubernetes/apps/home-automation/locking-service/flux-sync.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7998c02

Please sign in to comment.