Skip to content

Commit

Permalink
Simplify observability configuration for customers
Browse files Browse the repository at this point in the history
Signed-off-by: QuentinBisson <quentin@giantswarm.io>
  • Loading branch information
QuentinBisson committed Oct 18, 2023
1 parent 1ded944 commit 4d8dbad
Show file tree
Hide file tree
Showing 8 changed files with 294 additions and 185 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- *!Breaking change*: Simplify configuration for the bundled apps
- Move all user configs from under `apps.appName.userConfig` from string to regular helm values to `appName.userConfig`
- Rename `prometheus-operator-app` to `kube-prometheus-stack`
- Rename `promtail-app` to `promtail`
- Enforce `Cilium Network Policy` by default.
- Enforce `Pod Security Standard` by default.

## [0.8.8] - 2023-10-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion helm/observability-bundle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://github.com/giantswarm/observability-bundle
kubeVersion: ">=1.19.0-0"
sources:
- https://github.com/giantswarm/observability-bundle
version: 0.8.8
version: 1.0.1
annotations:
application.giantswarm.io/app-type: bundle
application.giantswarm.io/in-cluster-app: "true"
Expand Down
44 changes: 24 additions & 20 deletions helm/observability-bundle/templates/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ metadata:
{{- end }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .appName }}
{{- include "labels.common" $ | nindent 4 }}
name: {{ $appName }}
namespace: {{ $.Release.Namespace }}
Expand All @@ -30,7 +29,7 @@ spec:
namespace: {{ $.Release.Namespace }}
{{- end }}
install:
skipCRDs: {{.skipCRDs | default false }}
skipCRDs: {{ .skipCRDs | default false }}
timeout: 10m
upgrade:
timeout: 10m
Expand All @@ -51,57 +50,62 @@ spec:
version: {{ .version }}
{{- if .extraConfigs }}
extraConfigs:
{{- range $extraConfig := .extraConfigs }}
- kind: {{ $extraConfig.kind }}
name: {{ tpl $extraConfig.name $ }}
namespace: {{ tpl $extraConfig.namespace $ }}
{{- if $extraConfig.priority }}
priority: {{ $extraConfig.priority }}
{{- range $extraConfig := .extraConfigs }}
- kind: {{ $extraConfig.kind }}
name: {{ tpl $extraConfig.name $ }}
namespace: {{ tpl $extraConfig.namespace $ }}
{{- if $extraConfig.priority }}
priority: {{ $extraConfig.priority }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .userConfig }}
{{- if or .userConfig.configMap .userConfig.secret }}
{{- if $.Values.userConfig }}
{{- with (get $.Values.userConfig $key) }}
{{- if or .configMap .secret }}
userConfig:
{{- if .userConfig.configMap }}
{{- if .configMap }}
configMap:
name: {{ $appName }}-user-values
namespace: {{ $.Release.Namespace }}
{{- end }}
{{- if .userConfig.secret }}
{{- if .secret }}
secret:
name: {{ $appName }}-user-secrets
namespace: {{ $.Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .userConfig }}
{{- if .userConfig.configMap }}

{{- if $.Values.userConfig }}
{{- with (get $.Values.userConfig $key) }}
{{- if ((.configMap).values) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: {{ .appName }}
{{- include "labels.common" $ | nindent 4 }}
name: {{ $appName }}-user-values
namespace: {{ $.Release.Namespace }}
data:
{{- (tpl (.userConfig.configMap | toYaml | toString) $) | nindent 2 }}
values: |
{{- (tpl (.configMap.values | toYaml | toString) $) | nindent 4 }}
{{- end }}
{{- if .userConfig.secret }}
{{- if ((.secret).values) }}
---
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/name: {{ .appName }}
{{- include "labels.common" $ | nindent 4 }}
name: {{ $appName }}-user-secrets
namespace: {{ $.Release.Namespace }}
stringData:
{{- (tpl (.userConfig.secret | toYaml | toString) $) | nindent 2 }}
values: |
{{- (tpl (.secret.values | toYaml | toString) $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions helm/observability-bundle/templates/promtail-extraconfig.yaml

This file was deleted.

Loading

0 comments on commit 4d8dbad

Please sign in to comment.