From b38a02e1fe4bea896bd98decf3dde28d09b605d5 Mon Sep 17 00:00:00 2001 From: Adrian Berger Date: Wed, 8 Feb 2023 10:07:03 +0100 Subject: [PATCH] Remove logPersistence as it can be achieved with existing values (volumeMounts & extraVolumeClaimTemplates) Signed-off-by: Adrian Berger --- charts/common/Chart.yaml | 7 ++--- charts/common/README.md | 13 +++++--- charts/common/README.md.gotmpl | 37 +++++++++++++++++++++++ charts/common/templates/_container.yaml | 8 +---- charts/common/templates/_statefulset.yaml | 20 +----------- charts/common/values.schema.json | 33 -------------------- charts/common/values.yaml | 11 ------- 7 files changed, 50 insertions(+), 79 deletions(-) create mode 100644 charts/common/README.md.gotmpl diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index cd53d1db..d9430952 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: common description: "Bedag's common Helm chart to use for creating other Helm charts" -version: 7.1.0 +version: 8.0.0 # A chart can be either an 'application' or a 'library' chart. # # Application charts are a collection of templates that can be packaged into versioned archives @@ -27,7 +27,4 @@ annotations: artifacthub.io/prerelease: "false" artifacthub.io/license: Apache-2.0 artifacthub.io/changes: | - - "[Changed]: Networkpolicy disabled by default" - - "[Changed]: Improve json schema" - - "[Changed]: Housekeeping CI values" - - "[Removed]: Unused helm labels" + - "[Removed]: logPersistence" diff --git a/charts/common/README.md b/charts/common/README.md index 997f72e2..fe2d34ae 100644 --- a/charts/common/README.md +++ b/charts/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 7.1.0](https://img.shields.io/badge/Version-7.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 8.0.0](https://img.shields.io/badge/Version-8.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Bedag's common Helm chart to use for creating other Helm charts @@ -14,6 +14,14 @@ Bedag's common Helm chart to use for creating other Helm charts * +# Major Changes + +Major Changes to functions are documented with the version affected. **Before upgrading the dependency version, check this section out!** + +| **Change** | **Chart Version** | **Description** | **Commits/PRs** | +| :----------- | :---------------- | :--------------------- | :-------------- | +|logPersistence removed|8.0.0|Removes logPersistence functionality as it can be achieved with volumeMounts & extraVolumeClaimTemplates and is buggy anyway.|https://github.com/bedag/helm-charts/pull/68| + ## Values | Key | Type | Default | Description | @@ -64,6 +72,3 @@ Bedag's common Helm chart to use for creating other Helm charts | servicemonitor.basicAuth.userKey | string | `"username"` | | | servicemonitor.deploy | bool | `false` | | | servicemonitor.endpoints | object | `{}` | | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/common/README.md.gotmpl b/charts/common/README.md.gotmpl new file mode 100644 index 00000000..33ad101d --- /dev/null +++ b/charts/common/README.md.gotmpl @@ -0,0 +1,37 @@ +# common + +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{/* + Chart Maintainers +*/}} +{{ template "chart.maintainersSection" . }} + +{{/* + Chart Requirements +*/}} +{{ template "chart.requirementsSection" . }} + +{{/* + Chart Sources +*/}} +{{ template "chart.sourcesSection" . }} + +# Major Changes + +Major Changes to functions are documented with the version affected. **Before upgrading the dependency version, check this section out!** + +| **Change** | **Chart Version** | **Description** | **Commits/PRs** | +| :----------- | :---------------- | :--------------------- | :-------------- | +|logPersistence removed|8.0.0|Removes logPersistence functionality as it can be achieved with volumeMounts & extraVolumeClaimTemplates and is buggy anyway.|https://github.com/bedag/helm-charts/pull/68| + +{{/* + Chart Values +*/}} +{{ template "chart.valuesSection" . }} diff --git a/charts/common/templates/_container.yaml b/charts/common/templates/_container.yaml index 4d7c4464..f07c0a1e 100644 --- a/charts/common/templates/_container.yaml +++ b/charts/common/templates/_container.yaml @@ -36,14 +36,8 @@ securityContext: {{- omit $containerValues.containerSecurityContext "enabled" | toYaml | nindent 4 }} {{- end }} {{- end }} - {{- if or $containerValues.logPersistence $containerValues.volumeMounts $containerValues.configFiles $containerValues.binaryFiles }} + {{- if or $containerValues.volumeMounts $containerValues.configFiles $containerValues.binaryFiles }} volumeMounts: - {{- if $containerValues.logPersistence }} - {{- if $containerValues.logPersistence.enabled }} - - name: log - mountPath: {{ $containerValues.logPersistence.logMountpoint | quote }} - {{- end }} - {{- end }} {{- if $containerValues.volumeMounts }} {{- range $containerValues.volumeMounts }} {{- if .clearNamePrefix }} diff --git a/charts/common/templates/_statefulset.yaml b/charts/common/templates/_statefulset.yaml index 433ee0d6..ab651f09 100644 --- a/charts/common/templates/_statefulset.yaml +++ b/charts/common/templates/_statefulset.yaml @@ -70,26 +70,8 @@ spec: {{- end }} spec: {{- include "common.pod" (dict "root" $root "controller" $statefulset "name" $name) | indent 6 }} -{{- if or $statefulset.logPersistence $statefulset.extraVolumeClaimTemplates }} +{{- if $statefulset.extraVolumeClaimTemplates }} volumeClaimTemplates: - {{- if $statefulset.logPersistence }} - {{- if $statefulset.logPersistence.enabled }} - - metadata: - name: log - labels: -{{ include "library.labels.stable" $root | indent 8 }} - app.kubernetes.io/component: {{ $name }} - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ $statefulset.logPersistence.size | quote }} - {{- if $statefulset.logPersistence.storageClass }} - storageClassName: "{{ $statefulset.logPersistence.storageClass }}" - {{- end }} - {{- end }} - {{- end }} {{- if $statefulset.extraVolumeClaimTemplates }} {{- with $statefulset.extraVolumeClaimTemplates }} {{- toYaml . | nindent 2 }} diff --git a/charts/common/values.schema.json b/charts/common/values.schema.json index 73f47103..38a51ead 100644 --- a/charts/common/values.schema.json +++ b/charts/common/values.schema.json @@ -175,39 +175,6 @@ } } }, - "logPersistence": { - "type": "object", - "required": [ - "enabled" - ], - "if": { - "properties": { - "enabled": { - "const": true - } - } - }, - "then": { - "required": [ - "size", - "logMountpoint" - ] - }, - "properties": { - "enabled": { - "type": "boolean" - }, - "storageClass": { - "type": "string" - }, - "size": { - "type": "string" - }, - "logMountpoint": { - "type": "string" - } - } - }, "resources": { "type": "object" }, diff --git a/charts/common/values.yaml b/charts/common/values.yaml index fb2cdfe0..35040f89 100644 --- a/charts/common/values.yaml +++ b/charts/common/values.yaml @@ -544,17 +544,6 @@ components: # port: 80 # END ONLY TCPSOCKET - # logPersistence is a dictionary for specifying properties about a log directory to persist. Global values .Values.logPersistence can be overriden here - #logPersistence: - # enabled when set to 'true', adds volume for this component writing log files to - #enabled: false - # storageClass to use when claming persistence volume - #storageClass: "" - # size for persistence volume to claim - #size: 1Gi - # directory to mount the persistence volume claim into - #logMountpoint: /var/log/nginx - #resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little