Skip to content

Commit

Permalink
Remove logPersistence as it can be achieved with existing values (vol…
Browse files Browse the repository at this point in the history
…umeMounts & extraVolumeClaimTemplates)

Signed-off-by: Adrian Berger <[email protected]>
  • Loading branch information
adberger committed Feb 9, 2023
1 parent 17cf323 commit b38a02e
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 79 deletions.
7 changes: 2 additions & 5 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
13 changes: 9 additions & 4 deletions charts/common/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -14,6 +14,14 @@ Bedag's common Helm chart to use for creating other Helm charts

* <https://github.com/bedag/helm-charts/tree/master/charts/common>

# 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 |
Expand Down Expand Up @@ -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)
37 changes: 37 additions & 0 deletions charts/common/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -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" . }}
8 changes: 1 addition & 7 deletions charts/common/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
20 changes: 1 addition & 19 deletions charts/common/templates/_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
33 changes: 0 additions & 33 deletions charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
11 changes: 0 additions & 11 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b38a02e

Please sign in to comment.