helm hlaeja registry api
- update actuator.http - update helmfile.yaml - add 03-service.yaml - add 02-deployment.yaml - add 01-configmap.yaml - update 01 secret values.yaml with keystore - add values.yaml - add Chart.yaml
This commit is contained in:
@@ -38,4 +38,9 @@ secrets:
|
||||
# tier: frontend
|
||||
# keystorePassword: ServiceKeystorePassword
|
||||
# keystoreFile: ServiceKeystoreFileBase64==
|
||||
# - name: registry-api-keystore
|
||||
# app: registry-api
|
||||
# tier: frontend
|
||||
# keystorePassword: ServiceKeystorePassword
|
||||
# keystoreFile: ServiceKeystoreFileBase64==
|
||||
|
||||
|
||||
4
helm/charts/08-registry-api/Chart.yaml
Normal file
4
helm/charts/08-registry-api/Chart.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v2
|
||||
name: hlaeja-registry-api
|
||||
description: A Helm chart for the hlaeja registry api
|
||||
version: 0.1.0
|
||||
25
helm/charts/08-registry-api/templates/01-configmap.yaml
Normal file
25
helm/charts/08-registry-api/templates/01-configmap.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: registry-api-environment
|
||||
labels:
|
||||
app: registry-api
|
||||
environment: {{ .Values.environment }}
|
||||
tier: frontend
|
||||
data:
|
||||
SPRING_PROFILES_ACTIVE: {{ .Values.config.profiles | quote }}
|
||||
ACCOUNT_REGISTRY_URL: {{ .Values.config.accountRegistryUrl | quote }}
|
||||
DEVICE_REGISTRY_URL: {{ .Values.config.deviceRegistryUrl | quote }}
|
||||
|
||||
# all of this should be preset in application.yaml
|
||||
SERVER_PORT: "8443"
|
||||
SERVER_SSL_ENABLED: "true"
|
||||
SERVER_SSL_KEY_STORE: "/app/resources/cert/keystore.p12"
|
||||
SERVER_SSL_KEY_STORE_TYPE: "PKCS12"
|
||||
|
||||
# This was experimental and should be removed in later versions
|
||||
MANAGEMENT_METRICS_TAGS_APPLICATION: "register-api"
|
||||
MANAGEMENT_INFLUX_METRICS_EXPORT_ENABLED: "false"
|
||||
MANAGEMENT_INFLUX_METRICS_EXPORT_URL: "http://influxdb"
|
||||
# adding this here as it's going to be deleted and is not sued internally
|
||||
MANAGEMENT_INFLUX_METRICS_EXPORT_TOKEN: "invalidInfluxDbToken=="
|
||||
57
helm/charts/08-registry-api/templates/02-deployment.yaml
Normal file
57
helm/charts/08-registry-api/templates/02-deployment.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: registry-api
|
||||
labels:
|
||||
app: registry-api
|
||||
environment: {{ .Values.environment }}
|
||||
tier: frontend
|
||||
spec:
|
||||
replicas: {{ .Values.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: registry-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: registry-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.docker.registry }}
|
||||
containers:
|
||||
- name: registry-api-app
|
||||
image: {{ .Values.docker.image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: registry-api-environment
|
||||
env:
|
||||
- name: SERVER_SSL_KEY_STORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.keystoreRef }}
|
||||
key: keystore-password
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
volumeMounts:
|
||||
- name: keystore-volume
|
||||
mountPath: /app/resources/cert/keystore.p12
|
||||
subPath: keystore.p12
|
||||
readOnly: true
|
||||
- name: jwt-volume
|
||||
mountPath: /app/resources/cert/{{ .Values.jwtPublicKey.filename }}
|
||||
subPath: {{ .Values.jwtPublicKey.filename }}
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: keystore-volume
|
||||
secret:
|
||||
secretName: {{ .Values.keystoreRef }}
|
||||
items:
|
||||
- key: keystore.p12
|
||||
path: keystore.p12
|
||||
- name: jwt-volume
|
||||
secret:
|
||||
secretName: {{ .Values.jwtPublicKey.name }}
|
||||
items:
|
||||
- key: {{ .Values.jwtPublicKey.filename }}
|
||||
path: {{ .Values.jwtPublicKey.filename }}
|
||||
19
helm/charts/08-registry-api/templates/03-service.yaml
Normal file
19
helm/charts/08-registry-api/templates/03-service.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: registry-api
|
||||
labels:
|
||||
app: registry-api
|
||||
environment: {{ .Values.environment }}
|
||||
tier: frontend
|
||||
spec:
|
||||
{{- if and .Values.loadBalancerIP (ne .Values.loadBalancerIP "") }}
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: {{ .Values.loadBalancerIP }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: registry-api
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
targetPort: 8443
|
||||
18
helm/charts/08-registry-api/values.yaml
Normal file
18
helm/charts/08-registry-api/values.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
environment: testing
|
||||
replicas: 1
|
||||
#loadBalancerIP: 10.0.3.13
|
||||
|
||||
docker:
|
||||
registry: dockerRegistry
|
||||
image: lulz.ltd/hlaeja/hlaeja-registry-api:0.1.0
|
||||
|
||||
config:
|
||||
profiles: testing
|
||||
accountRegistryUrl: http://account-register
|
||||
deviceRegistryUrl: http://device-register
|
||||
|
||||
jwtPublicKey:
|
||||
name: account-jwt-public-key
|
||||
filename: public_key.pem
|
||||
|
||||
keystoreRef: registry-api-keystore
|
||||
@@ -40,3 +40,9 @@ releases:
|
||||
chart: ./charts/07-device-api
|
||||
values: []
|
||||
historyMax: 3
|
||||
|
||||
- name: registry-api
|
||||
namespace: hlaeja-testing
|
||||
chart: ./charts/08-registry-api
|
||||
values: []
|
||||
historyMax: 3
|
||||
|
||||
Reference in New Issue
Block a user