k8s hlaeja account registry

This commit is contained in:
2025-07-22 16:03:32 +02:00
committed by swordsteel
parent 91eef1911f
commit 203acf6a76
7 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: account-register
namespace: hlaeja
labels:
app: account-register
environment: testing
tier: backend
type: Opaque
stringData:
SPRING_R2DBC_PASSWORD: "password"

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: account-register
namespace: hlaeja
labels:
app: account-register
environment: testing
tier: backend
data:
SPRING_PROFILES_ACTIVE: "testing"
SPRING_R2DBC_URL: "r2dbc:postgresql://postgres:5432/account_registry"
SPRING_R2DBC_USERNAME: "services"
JWT_PRIVATE_KEY: "cert/private_key.pem"

View File

@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: account-register
namespace: hlaeja
labels:
app: account-register
environment: testing
tier: backend
spec:
replicas: 1
selector:
matchLabels:
app: account-register
template:
metadata:
labels:
app: account-register
spec:
imagePullSecrets:
- name: github
containers:
- name: account-register-app
image: ghcr.io/swordsteel/hlaeja-account-registry:0.2.0
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: account-register
- secretRef:
name: account-register
volumeMounts:
- name: jwt-key-volume
mountPath: /app/resources/cert
readOnly: true
ports:
- containerPort: 8080
volumes:
- name: jwt-key-volume
secret:
secretName: account-jwt-private-key
items:
- key: private_key.pem
path: private_key.pem

View File

@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: account-register
namespace: hlaeja
annotations:
metallb.universe.tf/address-pool: default
labels:
app: account-register
environment: testing
tier: backend
spec:
type: LoadBalancer
loadBalancerIP: 10.0.3.111
selector:
app: account-register
ports:
- protocol: TCP
port: 80
targetPort: 8080