diff --git a/.circleci/config.yml b/.circleci/config.yml index 65a66be..83c13f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - architect: giantswarm/architect@5.1.1 + architect: giantswarm/architect@5.8.0 workflows: package-and-push-chart-on-tag: diff --git a/helm/alloy-gateway/templates/_helpers.tpl b/helm/alloy-gateway/templates/_helpers.tpl index c371db9..4aca614 100644 --- a/helm/alloy-gateway/templates/_helpers.tpl +++ b/helm/alloy-gateway/templates/_helpers.tpl @@ -13,25 +13,14 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{/* -Selector labels -*/}} -{{- define "labels.selector" -}} -app.kubernetes.io/name: {{ include "name" . | quote }} -app.kubernetes.io/instance: {{ .Release.Name | quote }} -{{- end -}} - {{/* Common labels */}} {{- define "labels.common" -}} -{{ include "labels.selector" . }} +app.kubernetes.io/name: {{ include "name" . | quote }} +app.kubernetes.io/instance: {{ .Release.Name | quote }} app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -application.giantswarm.io/branch: {{ .Chart.Annotations.branch | replace "#" "-" | replace "/" "-" | replace "." "-" | trunc 63 | trimSuffix "-" | quote }} -application.giantswarm.io/commit: {{ .Chart.Annotations.commit | quote }} -application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | quote }} -giantswarm.io/managed-by: {{ .Release.Name | quote }} -giantswarm.io/service-type: {{ .Values.serviceType }} +application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | default "atlas" | quote }} helm.sh/chart: {{ include "chart" . | quote }} {{- end -}} diff --git a/helm/alloy-gateway/templates/alloy-gateway-configmap.yaml b/helm/alloy-gateway/templates/alloy-gateway-configmap.yaml index 08c0bd4..db2e0a9 100644 --- a/helm/alloy-gateway/templates/alloy-gateway-configmap.yaml +++ b/helm/alloy-gateway/templates/alloy-gateway-configmap.yaml @@ -1,12 +1,19 @@ +{{- if .Values.alloy.enabled }} apiVersion: v1 kind: ConfigMap metadata: + labels: + {{- include "labels.common" . | nindent 4 }} name: observability-gateway-config namespace: giantswarm data: values: | + {{- with .Values.alloy }} alloy: - {{- .Values.alloy | nindent 6 }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.networkPolicy }} networkPolicy: - {{- .Values.networkPolicy | nindent 6 }} - + {{- toYaml . | nindent 6 }} + {{ end }} +{{- end -}} diff --git a/helm/alloy-gateway/templates/alloy-gateway.yaml b/helm/alloy-gateway/templates/alloy-gateway.yaml index 0c6c2bc..d549495 100644 --- a/helm/alloy-gateway/templates/alloy-gateway.yaml +++ b/helm/alloy-gateway/templates/alloy-gateway.yaml @@ -1,3 +1,5 @@ +{{- if .Values.alloy.enabled }} +## This app is not deployed if alloy is disabled apiVersion: application.giantswarm.io/v1alpha1 kind: App metadata: @@ -22,8 +24,9 @@ spec: secret: name: "" namespace: "" - name: observability-gateway + name: alloy namespace: monitoring # used by renovate # repo: giantswarm/alloy version: 0.5.2 +{{- end -}} diff --git a/helm/alloy-gateway/values.schema.json b/helm/alloy-gateway/values.schema.json index 2d66bee..e734015 100644 --- a/helm/alloy-gateway/values.schema.json +++ b/helm/alloy-gateway/values.schema.json @@ -3,10 +3,10 @@ "type": "object", "properties": { "alloy": { - "type": "string" + "type": "object" }, "networkPolicy": { - "type": "string" + "type": "object" } } } diff --git a/helm/alloy-gateway/values.yaml b/helm/alloy-gateway/values.yaml index beb1384..47ee041 100644 --- a/helm/alloy-gateway/values.yaml +++ b/helm/alloy-gateway/values.yaml @@ -2,5 +2,5 @@ ## We need to put the whole configuration in a single string. ## This will allow us to replace this alloy gateway app with the use of the alloy-app. ## This is waiting for https://github.com/giantswarm/roadmap/issues/3682 to be fixed -alloy: "" -networkPolicy: "" +alloy: {} +networkPolicy: {}