Skip to content

Commit

Permalink
Merge pull request #53 from colearendt/update-generic
Browse files Browse the repository at this point in the history
update generic chart to fix a few issues
  • Loading branch information
colearendt authored May 30, 2023
2 parents 23cdac7 + 99faed4 commit 89a2416
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/chart-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- uses: r-lib/actions/pr-fetch@master
- uses: r-lib/actions/pr-fetch@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -40,7 +40,6 @@ jobs:
git config --local user.name "GitHub Actions"
git commit charts/*/README.md -m 'Update helm-docs and README.md' || echo "No changes to commit"
- uses: r-lib/actions/pr-push@master
- uses: r-lib/actions/pr-push@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: generic
description: A generic Helm chart for Kubernetes

type: application
version: 0.2.5
version: 0.2.6
appVersion: latest
maintainers:
- name: colearendt
Expand Down
7 changes: 7 additions & 0 deletions charts/generic/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.2.6

- Fix issue with `NOTES.txt` displaying ingress wrong
- Fix issue with volume mounts of `mountConfig` configuration
- Add a `checksum/config` and `checksum/secret` label to force deployment rollover when config changes
- Also include a `includeMountLabel` toggle to turn this behavior off (it is on / `true` by default)

# 0.2.5

- Fix bug in `rbac` `RoleBinding` creation
Expand Down
7 changes: 4 additions & 3 deletions charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# generic

![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

## Installing the Chart

To install the chart with the release name `my-release` at version 0.2.5:
To install the chart with the release name `my-release` at version 0.2.6:

```bash
helm repo add colearendt https://colearendt.github.io/helm
helm install my-release colearendt/generic --version=0.2.5
helm install my-release colearendt/generic --version=0.2.6
```

#### _A generic Helm chart for Kubernetes_
Expand All @@ -30,6 +30,7 @@ helm install my-release colearendt/generic --version=0.2.5
| image.repository | string | `"nginx"` | |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | |
| includeMountLabel | bool | `true` | whether to include the checksum/config and checksum/secret mount labels that automatically force pod rollover on config change |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
Expand Down
4 changes: 2 additions & 2 deletions charts/generic/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- range $host.paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
Expand Down
10 changes: 8 additions & 2 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ spec:
{{- with .Values.pod.labels }}
{{- toYaml . | nindent 8}}
{{- end }}
{{- if .Values.includeMountLabel }}
{{- if .Values.mountConfig }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
{{- end }}
{{- if .Values.mountSecret }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum | trunc 63 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -108,7 +116,6 @@ spec:
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.pod.volumes .Values.storage.create }}
volumes:
{{- if .Values.mountConfig }}
- name: config-volume
Expand All @@ -130,7 +137,6 @@ spec:
{{- with .Values.pod.volumes }}
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# -- whether to include the checksum/config and checksum/secret mount labels that automatically force pod rollover on
# config change
includeMountLabel: true

# -- an array of name, mountPath, and content keys that will be used to create configMap entries
# and mount them as files into the pod. Strings evaluated as a template
mountConfig: []
Expand Down

0 comments on commit 89a2416

Please sign in to comment.