Skip to content

Commit

Permalink
Merge branch 'main' into fix-app-template
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson committed Sep 25, 2024
2 parents 599a825 + 91a1ed5 commit 110960c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
17 changes: 3 additions & 14 deletions helm/alloy-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
13 changes: 10 additions & 3 deletions helm/alloy-gateway/templates/alloy-gateway-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 -}}
5 changes: 4 additions & 1 deletion helm/alloy-gateway/templates/alloy-gateway.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 -}}
4 changes: 2 additions & 2 deletions helm/alloy-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"type": "object",
"properties": {
"alloy": {
"type": "string"
"type": "object"
},
"networkPolicy": {
"type": "string"
"type": "object"
}
}
}
4 changes: 2 additions & 2 deletions helm/alloy-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

0 comments on commit 110960c

Please sign in to comment.