helm hlaeja account 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:
@@ -10,11 +10,16 @@ secrets:
|
|||||||
|
|
||||||
# Look at /doc/rsa_key.md to make these values (we use rsa so and need a public and privet key)
|
# Look at /doc/rsa_key.md to make these values (we use rsa so and need a public and privet key)
|
||||||
jwt:
|
jwt:
|
||||||
# - name: jwt-key
|
# - name: account-jwt-private-key
|
||||||
# app: jwt-service
|
# app: account-register
|
||||||
# tier: backend
|
# tier: backend
|
||||||
# jwtFilename: jwt_key.pem
|
# jwtFilename: private_key.pem
|
||||||
# jwtFile: JwtKeyFileBase64==
|
# jwtFile: AccountJwtPrivateKeyFileBase64==
|
||||||
|
# - name: account-jwt-public-key
|
||||||
|
# app: account-register
|
||||||
|
# tier: frontend
|
||||||
|
# jwtFilename: private_key.pem
|
||||||
|
# jwtFile: AccountJwtPublicKeyFileBase64==
|
||||||
|
|
||||||
# Look at /doc/keystore.md to make these values
|
# Look at /doc/keystore.md to make these values
|
||||||
keystore:
|
keystore:
|
||||||
|
|||||||
4
helm/charts/03-account-registry/Chart.yaml
Normal file
4
helm/charts/03-account-registry/Chart.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: hlaeja-account-registry
|
||||||
|
description: A Helm chart for the hlaeja account registry
|
||||||
|
version: 0.1.0
|
||||||
11
helm/charts/03-account-registry/templates/01-secret.yaml
Normal file
11
helm/charts/03-account-registry/templates/01-secret.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: account-register-environment
|
||||||
|
labels:
|
||||||
|
app: account-register
|
||||||
|
environment: {{ .Values.environment }}
|
||||||
|
tier: backend
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
SPRING_R2DBC_PASSWORD: {{ .Values.secrets.r2dbcPassword | b64enc | quote }}
|
||||||
13
helm/charts/03-account-registry/templates/02-configmap.yaml
Normal file
13
helm/charts/03-account-registry/templates/02-configmap.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: account-register-environment
|
||||||
|
labels:
|
||||||
|
app: account-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 }}"
|
||||||
42
helm/charts/03-account-registry/templates/03-deployment.yaml
Normal file
42
helm/charts/03-account-registry/templates/03-deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: account-register
|
||||||
|
labels:
|
||||||
|
app: account-register
|
||||||
|
environment: {{ .Values.environment }}
|
||||||
|
tier: backend
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicas }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: account-register
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: account-register
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.docker.registry }}
|
||||||
|
containers:
|
||||||
|
- name: account-register-app
|
||||||
|
image: {{ .Values.docker.image }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: account-register-environment
|
||||||
|
- secretRef:
|
||||||
|
name: account-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 }}
|
||||||
19
helm/charts/03-account-registry/templates/04-service.yaml
Normal file
19
helm/charts/03-account-registry/templates/04-service.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: account-register
|
||||||
|
labels:
|
||||||
|
app: account-register
|
||||||
|
environment: {{ .Values.environment }}
|
||||||
|
tier: backend
|
||||||
|
spec:
|
||||||
|
{{- if and .Values.loadBalancerIP (ne .Values.loadBalancerIP "") }}
|
||||||
|
type: LoadBalancer
|
||||||
|
loadBalancerIP: {{ .Values.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
app: account-register
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
19
helm/charts/03-account-registry/values.yaml
Normal file
19
helm/charts/03-account-registry/values.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
environment: testing
|
||||||
|
replicas: 1
|
||||||
|
#loadBalancerIP: 10.0.3.21
|
||||||
|
|
||||||
|
docker:
|
||||||
|
registry: dockerRegistry
|
||||||
|
image: lulz.ltd/hlaeja/hlaeja-account-registry:0.1.0
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
r2dbcPassword: "password"
|
||||||
|
|
||||||
|
config:
|
||||||
|
profiles: testing
|
||||||
|
r2dbcUrl: r2dbc:postgresql://database-postgresql:5432/account_registry
|
||||||
|
r2dbcUsername: services
|
||||||
|
|
||||||
|
jwtPrivetKey:
|
||||||
|
name: account-jwt-private-key
|
||||||
|
filename: private_key.pem
|
||||||
@@ -10,3 +10,9 @@ releases:
|
|||||||
chart: ./charts/02-database
|
chart: ./charts/02-database
|
||||||
values: []
|
values: []
|
||||||
historyMax: 3
|
historyMax: 3
|
||||||
|
|
||||||
|
- name: account-register
|
||||||
|
namespace: hlaeja-testing
|
||||||
|
chart: ./charts/03-account-registry
|
||||||
|
values: []
|
||||||
|
historyMax: 3
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
### get actuator
|
### get actuator
|
||||||
GET {{hostname}}/actuator
|
GET {{hostname}}/actuator
|
||||||
|
|
||||||
|
### get actuator health
|
||||||
|
GET {{hostname}}/actuator/health
|
||||||
|
|||||||
Reference in New Issue
Block a user