diff --git a/catalog-info.yaml b/catalog-info.yaml index 210a49b..c91dff9 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -15,10 +15,12 @@ metadata: backstage.io/kubernetes-id: propertysettings-v2-service # Helm chart annotations for environment provisioning helm.cnoe.io/git-repo: https://gitea.cnoe.localtest.me:8443/giteaAdmin/propertysettings-v2-chart.git - helm.cnoe.io/chart-path: propertySettings-V2 + helm.cnoe.io/chart-path: property-settings-svc-v2-chart helm.cnoe.io/values-file: values-dev.yaml helm.cnoe.io/available-values-files: '["values.yaml", "values-dev.yaml", "values-local.yaml"]' helm.cnoe.io/dependencies: '{}' + # Dependency URL mapping for environment provisioning + helm.cnoe.io/dependency-urls: '{"hades-service": {"helmParam": "hades.baseUrl", "port": 8080, "serviceDns": "hades"}}' tags: - configuration - settings @@ -35,7 +37,8 @@ spec: type: service lifecycle: experimental owner: user1 - dependsOn: [] + dependsOn: + - component:default/hades-service providesApis: - propertysettings-v2-api consumesApis: [] diff --git a/property-settings-svc-v2-chart/templates/configmap.yaml b/property-settings-svc-v2-chart/templates/configmap.yaml index 51ac305..6e2e709 100644 --- a/property-settings-svc-v2-chart/templates/configmap.yaml +++ b/property-settings-svc-v2-chart/templates/configmap.yaml @@ -45,7 +45,7 @@ data: {{- if .Values.traefik.enabled }} "url": "{{ .Values.traefik.hadesUrl }}/hadesV2/context", {{- else }} - "url": "http://hades.hades.svc.cluster.local:8080/hadesV2/context", + "url": "{{ .Values.hades.baseUrl }}/hadesV2/context", {{- end }} "type": "get", "response": "com.sokrati.hadesObjects.ContextResponse" @@ -76,13 +76,30 @@ data: {{- if .Values.traefik.enabled }} "url": "{{ .Values.traefik.hadesUrl }}/hadesV2/context", {{- else }} - "url": "http://hades.hades.svc.cluster.local:8080/hadesV2/context", + "url": "{{ .Values.hades.baseUrl }}/hadesV2/context", {{- end }} "type": "get", "response": "com.sokrati.hadesObjects.ContextResponse" } } authConfig.cfg: | -{{ .Values.config.auth | indent 4 }} + { + prod: { + {{- if .Values.traefik.enabled }} + hades_auth_url : "{{ .Values.traefik.hadesUrl }}/hadesV2/authorize", + {{- else }} + hades_auth_url : "{{ .Values.hades.baseUrl }}/hadesV2/authorize", + {{- end }} + auth_enable : true + }, + test: { + {{- if .Values.traefik.enabled }} + hades_auth_url : "{{ .Values.traefik.hadesUrl }}/hadesV2/authorize", + {{- else }} + hades_auth_url : "{{ .Values.hades.baseUrl }}/hadesV2/authorize", + {{- end }} + auth_enable : true + } + } statsLogging.cfg: | {{ .Values.config.statsLogging | indent 4 }} diff --git a/property-settings-svc-v2-chart/values.yaml b/property-settings-svc-v2-chart/values.yaml index c4efbab..de6d19f 100644 --- a/property-settings-svc-v2-chart/values.yaml +++ b/property-settings-svc-v2-chart/values.yaml @@ -2,6 +2,10 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +# External service dependencies - URLs can be overridden via Helm parameters +hades: + baseUrl: "http://hades.hades.svc.cluster.local:8080" + # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ replicaCount: 1