diff --git a/helm/charts/05-device-configuration/Chart.yaml b/helm/charts/05-device-configuration/Chart.yaml new file mode 100644 index 0000000..29ed973 --- /dev/null +++ b/helm/charts/05-device-configuration/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v2 +name: hlaeja-device-configuration +description: A Helm chart for the hlaeja device configuration +version: 0.1.0 diff --git a/helm/charts/05-device-configuration/templates/01-secret.yaml b/helm/charts/05-device-configuration/templates/01-secret.yaml new file mode 100644 index 0000000..5145f90 --- /dev/null +++ b/helm/charts/05-device-configuration/templates/01-secret.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: device-configuration-environment + labels: + app: device-configuration + environment: {{ .Values.environment }} + tier: backend +type: Opaque +data: + SPRING_CASSANDRA_PASSWORD: {{ .Values.secrets.cassandraPassword | b64enc | quote }} diff --git a/helm/charts/05-device-configuration/templates/02-configmap.yaml b/helm/charts/05-device-configuration/templates/02-configmap.yaml new file mode 100644 index 0000000..4b02603 --- /dev/null +++ b/helm/charts/05-device-configuration/templates/02-configmap.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: device-configuration-environment + labels: + app: device-configuration + environment: {{ .Values.environment }} + tier: backend +data: + SPRING_PROFILES_ACTIVE: {{ .Values.config.profiles | quote }} + SPRING_CASSANDRA_CONTACT_POINTS: {{ .Values.config.cassandraContactPoints | quote }} + SPRING_CASSANDRA_USERNAME: {{ .Values.config.cassandraUsername | quote }} diff --git a/helm/charts/05-device-configuration/templates/03-deployment.yaml b/helm/charts/05-device-configuration/templates/03-deployment.yaml new file mode 100644 index 0000000..70552a2 --- /dev/null +++ b/helm/charts/05-device-configuration/templates/03-deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: device-configuration + labels: + app: device-configuration + environment: {{ .Values.environment }} + tier: backend +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + app: device-configuration + template: + metadata: + labels: + app: device-configuration + spec: + imagePullSecrets: + - name: {{ .Values.docker.registry }} + containers: + - name: device-configuration-app + image: {{ .Values.docker.image }} + imagePullPolicy: IfNotPresent + envFrom: + - configMapRef: + name: device-configuration-environment + - secretRef: + name: device-configuration-environment + ports: + - containerPort: 8080 diff --git a/helm/charts/05-device-configuration/templates/04-service.yaml b/helm/charts/05-device-configuration/templates/04-service.yaml new file mode 100644 index 0000000..b1c88d8 --- /dev/null +++ b/helm/charts/05-device-configuration/templates/04-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: device-configuration + labels: + app: device-configuration + environment: {{ .Values.environment }} + tier: backend +spec: + {{- if and .Values.loadBalancerIP (ne .Values.loadBalancerIP "") }} + type: LoadBalancer + loadBalancerIP: {{ .Values.loadBalancerIP }} + {{- end }} + selector: + app: device-configuration + ports: + - protocol: TCP + port: 80 + targetPort: 8080 diff --git a/helm/charts/05-device-configuration/values.yaml b/helm/charts/05-device-configuration/values.yaml new file mode 100644 index 0000000..0af81f7 --- /dev/null +++ b/helm/charts/05-device-configuration/values.yaml @@ -0,0 +1,15 @@ +environment: testing +replicas: 1 +#loadBalancerIP: 10.0.3.23 + +docker: + registry: dockerRegistry + image: lulz.ltd/hlaeja/hlaeja-device-configuration:0.1.0 + +secrets: + cassandraPassword: "password" + +config: + profiles: testing + cassandraContactPoints: database-cassandra + cassandraUsername: service diff --git a/helm/helmfile.yaml b/helm/helmfile.yaml index 0301284..93d17d7 100644 --- a/helm/helmfile.yaml +++ b/helm/helmfile.yaml @@ -22,3 +22,9 @@ releases: chart: ./charts/04-device-registry values: [] historyMax: 3 + + - name: device-configuration + namespace: hlaeja-testing + chart: ./charts/05-device-configuration + values: [] + historyMax: 3 diff --git a/http/device-configuration/actuator.http b/http/device-configuration/actuator.http index 4d03087..de4867d 100644 --- a/http/device-configuration/actuator.http +++ b/http/device-configuration/actuator.http @@ -1,2 +1,5 @@ ### get actuator GET {{hostname}}/actuator + +### get actuator health +GET {{hostname}}/actuator/health