helm hlaeja device registry

- update actuator.http
- update helmfile.yaml
- add 04-service.yaml
- add 03-deployment.yaml
- add 02-configmap.yaml
- add 01-secret.yaml
- update 01 secret values.yaml with jwt
- add values.yaml
- add Chart.yaml
This commit is contained in:
2025-07-27 12:33:20 +02:00
committed by swordsteel
parent 6c906ec522
commit d800579673
9 changed files with 127 additions and 0 deletions

View File

@@ -20,6 +20,16 @@ secrets:
# tier: frontend
# jwtFilename: private_key.pem
# jwtFile: AccountJwtPublicKeyFileBase64==
# - name: device-jwt-private-key
# app: device-register
# tier: backend
# jwtFilename: private_key.pem
# jwtFile: DeviceJwtPrivateKeyFileBase64==
# - name: device-jwt-public-key
# app: device-register
# tier: frontend
# jwtFilename: private_key.pem
# jwtFile: DeviceJwtPublicKeyFileBase64==
# Look at /doc/keystore.md to make these values
keystore:

View File

@@ -0,0 +1,4 @@
apiVersion: v2
name: hlaeja-device-register
description: A Helm chart for the hlaeja device registry
version: 0.1.0

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: device-register-environment
labels:
app: device-register
environment: {{ .Values.environment }}
tier: backend
type: Opaque
data:
SPRING_R2DBC_PASSWORD: {{ .Values.secrets.r2dbcPassword | b64enc | quote }}

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: device-register-environment
labels:
app: device-register
environment: {{ .Values.environment }}
tier: backend
data:
SPRING_PROFILES_ACTIVE: {{ .Values.config.profiles | quote }}
SPRING_R2DBC_URL: {{ .Values.config.r2dbcUrl | quote }}
SPRING_R2DBC_USERNAME: {{ .Values.config.r2dbcUsername | quote }}
JWT_PRIVATE_KEY: "cert/{{ .Values.jwtPrivetKey.filename }}"

View File

@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: device-register
labels:
app: device-register
environment: {{ .Values.environment }}
tier: backend
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: device-register
template:
metadata:
labels:
app: device-register
spec:
imagePullSecrets:
- name: {{ .Values.docker.registry }}
containers:
- name: device-register-app
image: {{ .Values.docker.image }}
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: device-register-environment
- secretRef:
name: device-register-environment
volumeMounts:
- name: jwt-key-volume
mountPath: /app/resources/cert
readOnly: true
ports:
- containerPort: 8080
volumes:
- name: jwt-key-volume
secret:
secretName: {{ .Values.jwtPrivetKey.name }}
items:
- key: {{ .Values.jwtPrivetKey.filename }}
path: {{ .Values.jwtPrivetKey.filename }}

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: device-register
labels:
app: device-register
environment: {{ .Values.environment }}
tier: backend
spec:
{{- if and .Values.loadBalancerIP (ne .Values.loadBalancerIP "") }}
type: LoadBalancer
loadBalancerIP: {{ .Values.loadBalancerIP }}
{{- end }}
selector:
app: device-register
ports:
- protocol: TCP
port: 80
targetPort: 8080

View File

@@ -0,0 +1,19 @@
environment: testing
replicas: 1
#loadBalancerIP: 10.0.3.22
docker:
registry: dockerRegistry
image: lulz.ltd/hlaeja/hlaeja-device-registry:0.1.0
secrets:
r2dbcPassword: "password"
config:
profiles: testing
r2dbcUrl: r2dbc:postgresql://database-postgresql:5432/device_registry
r2dbcUsername: services
jwtPrivetKey:
name: device-jwt-private-key
filename: private_key.pem

View File

@@ -16,3 +16,9 @@ releases:
chart: ./charts/03-account-registry
values: []
historyMax: 3
- name: device-registry
namespace: hlaeja-testing
chart: ./charts/04-device-registry
values: []
historyMax: 3