Skip to content

Commit

Permalink
Merge pull request #156 from maykinmedia/feature/integration-setup-co…
Browse files Browse the repository at this point in the history
…nfig

Integration setup config for remaining charts
  • Loading branch information
sjoerdie authored Dec 18, 2024
2 parents 73cbc44 + 797958e commit 15bfca1
Show file tree
Hide file tree
Showing 45 changed files with 717 additions and 89 deletions.
4 changes: 2 additions & 2 deletions charts/objecten/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: objecten
description: API om objecten te beheren die behoren bij een bepaald objecttype

type: application
version: 2.5.1
appVersion: 2.4.4
version: 2.6.0-beta.1
appVersion: latest

dependencies:
- name: redis
Expand Down
18 changes: 7 additions & 11 deletions charts/objecten/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# objecten

![Version: 2.5.0](https://img.shields.io/badge/Version-2.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.4.4](https://img.shields.io/badge/AppVersion-2.4.4-informational?style=flat-square)
![Version: 2.6.0-beta.1](https://img.shields.io/badge/Version-2.6.0--beta.1-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)

API om objecten te beheren die behoren bij een bepaald objecttype

## TL;DR

```console
helm repo add my-repo https://maykinmedia.github.io/charts/
helm install my-release my-repo/objecten
```

## Requirements

| Repository | Name | Version |
Expand All @@ -31,21 +24,23 @@ helm install my-release my-repo/objecten
| azureVaultSecret.objectName | string | `""` | |
| azureVaultSecret.secretName | string | `"{{ .Values.existingSecret }}"` | |
| azureVaultSecret.vaultName | string | `nil` | |
| configuration.data | string | `""` | |
| configuration.demo.email | string | `nil` | |
| configuration.demo.enable | bool | `false` | |
| configuration.demo.enabled | bool | `false` | |
| configuration.demo.person | string | `nil` | |
| configuration.demo.token | string | `nil` | |
| configuration.enabled | bool | `false` | |
| configuration.initContainer.enabled | bool | `true` | Run the setup configuration command in a init container |
| configuration.initContainer.enabled | bool | `false` | Run the setup configuration command in a init container |
| configuration.job.backoffLimit | int | `6` | |
| configuration.job.enabled | bool | `true` | Run the setup configuration command as a job |
| configuration.job.resources | object | `{}` | |
| configuration.job.restartPolicy | string | `"OnFailure"` | |
| configuration.job.ttlSecondsAfterFinished | int | `0` | 0 Will clean the job after it is finished |
| configuration.objectTypes.ApiRoot | string | `""` | |
| configuration.objectTypes.enable | bool | `false` | |
| configuration.objectTypes.enabled | bool | `false` | |
| configuration.objectTypes.token | string | `""` | |
| configuration.overwrite | bool | `true` | |
| configuration.secrets | object | `{}` | |
| configuration.sites.domain | string | `""` | |
| configuration.sites.enabled | bool | `false` | |
| configuration.sites.organization | string | `""` | |
Expand Down Expand Up @@ -75,6 +70,7 @@ helm install my-release my-repo/objecten
| global.configuration.enabled | bool | `false` | |
| global.configuration.organization | string | `"Gemeente Example"` | |
| global.configuration.overwrite | bool | `true` | |
| global.configuration.secrets | object | `{}` | |
| global.settings.databaseHost | string | `""` | Global databasehost, overrides setting.database.host |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"maykinmedia/objects-api"` | |
Expand Down
14 changes: 14 additions & 0 deletions charts/objecten/templates/configuration-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if and .Values.global.configuration.enabled .Values.configuration.enabled}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "objecten.fullname" . }}-config-secrets
labels:
{{- include "objecten.labels" . | nindent 4 }}
stringData:
{{- if .Values.global.configuration.secrets }}
{{- include "objecten.tplvalues.render" ( dict "value" .Values.global.configuration.secrets "context" $ ) | nindent 4 }}
{{ else }}
{{- include "objecten.tplvalues.render" ( dict "value" .Values.configuration.secrets "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/objecten/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
name: {{ .Values.existingSecret | default (include "objecten.fullname" .) }}
- configMapRef:
name: {{ include "objecten.fullname" . }}
- secretRef:
name: {{ include "objecten.fullname" . }}-config-secrets
env:
{{- if .Values.extraEnvVars }}
{{- include "objecten.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 16 }}
Expand Down
18 changes: 13 additions & 5 deletions charts/objecten/templates/job-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ spec:
envFrom:
- secretRef:
name: {{ .Values.existingSecret | default (include "objecten.fullname" .) }}
- secretRef:
name: {{ include "objecten.fullname" . }}-config-secrets
- configMapRef:
name: {{ include "objecten.fullname" . }}
env:
Expand All @@ -49,17 +51,19 @@ spec:
- "/bin/bash"
- "-c"
args:
- |
/wait_for_db.sh
/app/src/manage.py migrate
/app/src/manage.py setup_configuration --no-selftest {{- if or .Values.global.configuration.overwrite .Values.configuration.overwrite }} --overwrite{{- end }}
- |
/usr/bin/envsubst < /app/configuration/configuration.yaml > /tmp/configuration.yaml &&
/app/src/manage.py setup_configuration --yaml-file /tmp/configuration.yaml
volumeMounts:
- name: media
mountPath: /app/private-media
subPath: {{ .Values.persistence.privateMediaMountSubpath | default "objecten/private_media" }}
- name: media
mountPath: /app/media
subPath: {{ .Values.persistence.mediaMountSubpath | default "objecten/media" }}
- name: configuration
mountPath: /app/configuration/
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{- include "objecten.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 16 }}
{{- end }}
Expand All @@ -71,6 +75,10 @@ spec:
{{- else }}
emptyDir: { }
{{- end }}
- name: configuration
configMap:
name: {{ include "objecten.fullname" . }}-configuration
defaultMode: 0755
{{- if .Values.extraVolumes }}
{{- include "objecten.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $ ) | nindent 12 }}
{{- end }}
Expand All @@ -86,4 +94,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/objecten/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
enabled: false
overwrite: true
organization: Gemeente Example
secrets: {}

settings:
# -- Global databasehost, overrides setting.database.host
Expand Down Expand Up @@ -31,10 +32,10 @@ configuration:
email: ""
initContainer:
# -- Run the setup configuration command in a init container
enabled: true
enabled: false
job:
# -- Run the setup configuration command as a job
enabled: false
enabled: true
backoffLimit: 6
# -- 0 Will clean the job after it is finished
ttlSecondsAfterFinished: 0
Expand All @@ -47,6 +48,8 @@ configuration:
# requests:
# cpu: 100m
# memory: 128Mi
secrets: {}
data: ""

tags:
redis: true
Expand Down
4 changes: 2 additions & 2 deletions charts/objecttypen/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: objecttypen
description: API om object definities te beheren

type: application
version: 1.2.0
appVersion: 2.2.2
version: 1.3.0-beta.1
appVersion: latest

dependencies:
- name: redis
Expand Down
33 changes: 25 additions & 8 deletions charts/objecttypen/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# objecttypen

![Version: 1.1.3](https://img.shields.io/badge/Version-1.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.1](https://img.shields.io/badge/AppVersion-2.2.1-informational?style=flat-square)
![Version: 1.3.0-beta.1](https://img.shields.io/badge/Version-1.3.0--beta.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.2](https://img.shields.io/badge/AppVersion-2.2.2-informational?style=flat-square)

API om object definities te beheren

## TL;DR

```console
helm repo add my-repo https://maykinmedia.github.io/charts/
helm install my-release my-repo/objecttypen
```

## Requirements

| Repository | Name | Version |
Expand All @@ -31,12 +24,36 @@ helm install my-release my-repo/objecttypen
| azureVaultSecret.objectName | string | `""` | |
| azureVaultSecret.secretName | string | `"{{ .Values.existingSecret }}"` | |
| azureVaultSecret.vaultName | string | `nil` | |
| configuration.data | string | `""` | |
| configuration.demo.email | string | `nil` | |
| configuration.demo.enabled | bool | `false` | |
| configuration.demo.person | string | `nil` | |
| configuration.demo.token | string | `nil` | |
| configuration.enabled | bool | `false` | |
| configuration.initContainer.enabled | bool | `true` | Run the setup configuration command in a init container |
| configuration.job.backoffLimit | int | `6` | |
| configuration.job.enabled | bool | `true` | Run the setup configuration command as a job |
| configuration.job.resources | object | `{}` | |
| configuration.job.restartPolicy | string | `"OnFailure"` | |
| configuration.job.ttlSecondsAfterFinished | int | `0` | 0 Will clean the job after it is finished |
| configuration.overwrite | bool | `true` | |
| configuration.secrets | object | `{}` | |
| configuration.sites.domain | string | `""` | |
| configuration.sites.enabled | bool | `false` | |
| configuration.sites.organization | string | `""` | |
| configuration.superuser.email | string | `""` | |
| configuration.superuser.password | string | `""` | |
| configuration.superuser.username | string | `""` | |
| existingSecret | string | `nil` | |
| extraEnvVars | list | `[]` | Array with extra environment variables to add |
| extraIngress | list | `[]` | Specify extra ingresses, for example if you have multiple ingress classes |
| extraVolumeMounts | list | `[]` | Optionally specify extra list of additional volumeMounts |
| extraVolumes | list | `[]` | Optionally specify extra list of additional volumes |
| fullnameOverride | string | `""` | |
| global.configuration.enabled | bool | `false` | |
| global.configuration.organization | string | `"Gemeente Example"` | |
| global.configuration.overwrite | bool | `true` | |
| global.configuration.secrets | object | `{}` | |
| global.settings.databaseHost | string | `""` | Global databasehost, overrides setting.database.host |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"maykinmedia/objecttypes-api"` | |
Expand Down
14 changes: 14 additions & 0 deletions charts/objecttypen/templates/configuration-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if and .Values.global.configuration.enabled .Values.configuration.enabled}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "objecttypen.fullname" . }}-config-secrets
labels:
{{- include "objecttypen.labels" . | nindent 4 }}
stringData:
{{- if .Values.global.configuration.secrets }}
{{- include "objecttypen.tplvalues.render" ( dict "value" .Values.global.configuration.secrets "context" $ ) | nindent 4 }}
{{ else }}
{{- include "objecttypen.tplvalues.render" ( dict "value" .Values.configuration.secrets "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/objecttypen/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
name: {{ .Values.existingSecret | default (include "objecttypen.fullname" .) }}
- configMapRef:
name: {{ include "objecttypen.fullname" . }}
- secretRef:
name: {{ include "objecttypen.fullname" . }}-config-secrets
env:
{{- if .Values.extraEnvVars }}
{{- include "objecttypen.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 16 }}
Expand Down
16 changes: 12 additions & 4 deletions charts/objecttypen/templates/job-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
name: {{ .Values.existingSecret | default (include "objecttypen.fullname" .) }}
- configMapRef:
name: {{ include "objecttypen.fullname" . }}
- secretRef:
name: {{ include "objecttypen.fullname" . }}-config-secrets
env:
{{- if .Values.extraEnvVars }}
{{- include "objecttypen.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
Expand All @@ -49,15 +51,21 @@ spec:
- "/bin/bash"
- "-c"
args:
- |
/wait_for_db.sh
/app/src/manage.py migrate
/app/src/manage.py setup_configuration --no-selftest {{- if or .Values.global.configuration.overwrite .Values.configuration.overwrite }} --overwrite{{- end }}
- |
/usr/bin/envsubst < /app/configuration/configuration.yaml > /tmp/configuration.yaml &&
/app/src/manage.py setup_configuration --yaml-file /tmp/configuration.yaml
volumeMounts:
- name: configuration
mountPath: /app/configuration/
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{- include "objecttypen.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 16 }}
{{- end }}
volumes:
- name: configuration
configMap:
name: {{ include "objecttypen.fullname" . }}-configuration
defaultMode: 0755
{{- if .Values.extraVolumes }}
{{- include "objecttypen.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $ ) | nindent 12 }}
{{- end }}
Expand Down
4 changes: 3 additions & 1 deletion charts/objecttypen/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
global:
configuration:
enabled: false
secrets: {}
overwrite: true
organization: Gemeente Example

Expand All @@ -10,6 +11,7 @@ global:

configuration:
enabled: false
secrets: {}
overwrite: true
sites:
enabled: false
Expand Down Expand Up @@ -37,13 +39,13 @@ configuration:
restartPolicy: OnFailure
# Note, this field is immutable
resources: {}

# limits:
# cpu: 200m
# memory: 256Mi
# requests:
# cpu: 100m
# memory: 128Mi
data: ""

tags:
redis: true
Expand Down
4 changes: 2 additions & 2 deletions charts/openarchiefbeheer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: openarchiefbeheer
description: Opstellen, beheren en uitvoeren van vernietigingslijsten, voor gebruik met Zaakgericht werken

type: application
version: 1.0.2
appVersion: 0.1.0-beta.12
version: 1.1.0-beta.1
appVersion: latest

dependencies:
- name: redis
Expand Down
20 changes: 12 additions & 8 deletions charts/openarchiefbeheer/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# openarchiefbeheer

![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-beta.12](https://img.shields.io/badge/AppVersion-0.1.0--beta.12-informational?style=flat-square)
![Version: 1.1.0-beta.1](https://img.shields.io/badge/Version-1.1.0--beta.1-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)

Opstellen, beheren en uitvoeren van vernietigingslijsten, voor gebruik met Zaakgericht werken

## TL;DR

```console
helm repo add my-repo https://maykinmedia.github.io/charts/
helm install my-release my-repo/openarchiefbeheer
```

## Requirements

| Repository | Name | Version |
Expand All @@ -37,6 +30,15 @@ helm install my-release my-repo/openarchiefbeheer
| beat.readinessProbe | object | `{}` | |
| beat.replicaCount | int | `1` | |
| beat.resources | object | `{}` | |
| configuration.data | string | `""` | |
| configuration.enabled | bool | `false` | |
| configuration.initContainer.enabled | bool | `false` | Run the setup configuration command in a init container |
| configuration.job.backoffLimit | int | `6` | |
| configuration.job.enabled | bool | `true` | Run the setup configuration command as a job |
| configuration.job.resources | object | `{}` | |
| configuration.job.restartPolicy | string | `"OnFailure"` | |
| configuration.job.ttlSecondsAfterFinished | int | `0` | 0 Will clean the job after it is finished |
| configuration.secrets | object | `{}` | |
| existingSecret | string | `nil` | |
| extraEnvVars | list | `[]` | |
| extraIngress | list | `[]` | |
Expand All @@ -51,6 +53,8 @@ helm install my-release my-repo/openarchiefbeheer
| flower.service.port | int | `80` | |
| flower.service.type | string | `"ClusterIP"` | |
| fullnameOverride | string | `""` | |
| global.configuration.enabled | bool | `false` | |
| global.configuration.secrets | object | `{}` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"maykinmedia/open-archiefbeheer"` | |
| image.tag | string | `""` | |
Expand Down
Loading

0 comments on commit 15bfca1

Please sign in to comment.