Skip to content

Commit

Permalink
Merge pull request #35 from colearendt/add-extra-objects
Browse files Browse the repository at this point in the history
Add extra objects
  • Loading branch information
colearendt authored Apr 19, 2022
2 parents 132a3d9 + e8ba40c commit 9d7de45
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/postgrest/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: postgrest
description: A Helm chart for deploying Postgrest to Kubernetes
type: application
version: 0.3.0
version: 0.3.1
appVersion: v8.0.0
icon: https://avatars.githubusercontent.com/u/15115011?s=200&v=4
maintainers:
Expand Down
4 changes: 4 additions & 0 deletions charts/postgrest/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.3.1

- Add `extraObjects` value for deploying other kubernetes objects.

# 0.3.0

- Fix issue with `strategy` being defined at the wrong scope ([#28](https://github.com/colearendt/helm/issues/28))
Expand Down
7 changes: 4 additions & 3 deletions charts/postgrest/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# postgrest

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v8.0.0](https://img.shields.io/badge/AppVersion-v8.0.0-informational?style=flat-square)
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v8.0.0](https://img.shields.io/badge/AppVersion-v8.0.0-informational?style=flat-square)

## Installing the Chart

To install the chart with the release name `my-release` at version 0.3.0:
To install the chart with the release name `my-release` at version 0.3.1:

```bash
helm repo add colearendt https://colearendt.github.io/helm
helm install my-release colearendt/postgrest --version=0.3.0
helm install my-release colearendt/postgrest --version=0.3.1
```

#### _A Helm chart for deploying Postgrest to Kubernetes_
Expand All @@ -24,6 +24,7 @@ helm install my-release colearendt/postgrest --version=0.3.0
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| command | list | `[]` | |
| extraObjects | list | `[]` | Extra kubernetes objects to deploy (value evaluted as a template) |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"postgrest/postgrest"` | |
Expand Down
14 changes: 14 additions & 0 deletions charts/postgrest/ci/complex-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: "test"
data:
something: fun
- |
apiVersion: v1
kind: ConfigMap
metadata:
name: "test2"
data:
something: {{ printf "fun2" }}
14 changes: 14 additions & 0 deletions charts/postgrest/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/* thanks to https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_tplvalues.tpl */}}
{{/*
Renders a value that contains template.
Usage:
{{ include "postgrest.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "postgrest.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/postgrest/templates/extra-objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ include "postgrest.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/postgrest/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

# -- Extra kubernetes objects to deploy (value evaluted as a template)
extraObjects: []

imagePullSecrets: []

nameOverride: ""
Expand Down
2 changes: 1 addition & 1 deletion charts/traefik-forward-auth/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: traefik-forward-auth
description: Deploy traefik-forward-auth
version: 0.0.6
version: 0.0.7
apiVersion: v1
sources:
- https://github.com/thomseddon/traefik-forward-auth
Expand Down
4 changes: 4 additions & 0 deletions charts/traefik-forward-auth/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.0.7

- Add `extraObjects` value for deploying other kubernetes objects.

# 0.0.6

- Update maintainer
Expand Down
7 changes: 4 additions & 3 deletions charts/traefik-forward-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# traefik-forward-auth

![Version: 0.0.6](https://img.shields.io/badge/Version-0.0.6-informational?style=flat-square)
![Version: 0.0.7](https://img.shields.io/badge/Version-0.0.7-informational?style=flat-square)

## Installing the Chart

To install the chart with the release name `my-release` at version 0.0.6:
To install the chart with the release name `my-release` at version 0.0.7:

```bash
helm repo add colearendt https://colearendt.github.io/helm
helm install my-release colearendt/traefik-forward-auth --version=0.0.6
helm install my-release colearendt/traefik-forward-auth --version=0.0.7
```

#### _Deploy traefik-forward-auth_
Expand All @@ -22,6 +22,7 @@ helm install my-release colearendt/traefik-forward-auth --version=0.0.6
| config.default-provider | string | `"oidc"` | |
| config.insecure-cookie | bool | `false` | |
| config.log-level | string | `"warn"` | |
| extraObjects | list | `[]` | Extra kubernetes objects to deploy (value evaluted as a template) |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"thomseddon/traefik-forward-auth"` | |
| image.tag | int | `2` | |
Expand Down
15 changes: 15 additions & 0 deletions charts/traefik-forward-auth/ci/all-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ resources: {}
livenessProbe: {}
startupProbe: {}
readinessProbe: {}

extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: "test"
data:
something: fun
- |
apiVersion: v1
kind: ConfigMap
metadata:
name: "test2"
data:
something: {{ printf "fun2" }}
14 changes: 14 additions & 0 deletions charts/traefik-forward-auth/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end -}}

{{/* thanks to https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_tplvalues.tpl */}}
{{/*
Renders a value that contains template.
Usage:
{{ include "traefik-forward-auth.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "traefik-forward-auth.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/traefik-forward-auth/templates/extra-objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ include "traefik-forward-auth.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/traefik-forward-auth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ image:
tag: 2
pullPolicy: IfNotPresent

# -- Extra kubernetes objects to deploy (value evaluted as a template)
extraObjects: []

pod:
env: {}
command:
Expand Down

0 comments on commit 9d7de45

Please sign in to comment.