Skip to content

Commit

Permalink
Merge pull request #177 from maykinmedia/feature/stable-release-objec…
Browse files Browse the repository at this point in the history
…ttypen

🔖 Stable release for objecttypen
  • Loading branch information
SilviaAmAm authored Feb 11, 2025
2 parents f65fd65 + e683560 commit c247839
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 40 deletions.
9 changes: 9 additions & 0 deletions charts/objecttypen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

## 1.3.0 (2025-01-31)

Stable release with support of [django-setup-configuration](https://github.com/maykinmedia/django-setup-configuration).

- Fixed the configuration-secrets.yaml template to render only if no existing secret is present in the cluster (needed for example if using sealed secrets).
- Added the possibility to add/use a secret with a custom name for the django-setup-configuration job.
- Removed these environment variables: `SITES_CONFIG_ENABLE`, `OBJECTTYPES_DOMAIN`, `OBJECTTYPES_ORGANIZATION`, `DEMO_CONFIG_ENABLE`, `DEMO_PERSON`, `DEMO_EMAIL`. These are no longer used in the application.
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.3.0-beta.3
appVersion: latest
version: 1.3.0
appVersion: 3.0.0

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

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

API om object definities te beheren

Expand All @@ -25,10 +25,6 @@ API om object definities te beheren
| 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` | |
Expand All @@ -38,12 +34,11 @@ API om object definities te beheren
| 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 | `""` | |
| configurationSecretsName | string | `""` | |
| existingConfigurationSecrets | string | `nil` | |
| 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 |
Expand Down
12 changes: 0 additions & 12 deletions charts/objecttypen/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ data:
{{- if .Values.settings.uwsgi.harakiri }}
UWSGI_HARAKIRI: {{ .Values.settings.uwsgi.harakiri | toString | quote }}
{{- end }}
{{ if and .Values.global.configuration.enabled .Values.configuration.enabled -}}
SITES_CONFIG_ENABLE: {{ if .Values.configuration.sites.enabled }}"True"{{ else }}"False"{{ end }}
{{- if .Values.configuration.sites.enabled }}
OBJECTTYPES_DOMAIN: {{ .Values.configuration.sites.domain | toString | quote }}
OBJECTTYPES_ORGANIZATION: {{ .Values.global.configuration.organization | default .Values.configuration.sites.organization | toString | quote }}
{{- end }}
DEMO_CONFIG_ENABLE: {{ if .Values.configuration.demo.enabled }}"True"{{ else }}"False"{{ end }}
{{ if .Values.configuration.demo.enabled }}
DEMO_PERSON: {{ .Values.configuration.demo.person | toString | quote }}
DEMO_EMAIL: {{ .Values.configuration.demo.email | toString | quote }}
{{- end }}
{{- end }}
{{ if .Values.configuration.superuser.username }}
OBJECTTYPE_SUPERUSER_USERNAME: {{ .Values.configuration.superuser.username | toString | quote }}
OBJECTTYPE_SUPERUSER_EMAIL: {{ .Values.configuration.superuser.email | toString | quote }}
Expand Down
4 changes: 2 additions & 2 deletions charts/objecttypen/templates/configuration-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if and .Values.global.configuration.enabled .Values.configuration.enabled}}
{{- if and (not .Values.existingConfigurationSecrets) .Values.global.configuration.enabled .Values.configuration.enabled}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "objecttypen.fullname" . }}-config-secrets
name: {{ .Values.configurationSecretsName | default (printf "%s-config-secrets" (include "objecttypen.fullname" .)) }}
labels:
{{- include "objecttypen.labels" . | nindent 4 }}
stringData:
Expand Down
2 changes: 1 addition & 1 deletion charts/objecttypen/templates/job-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- configMapRef:
name: {{ include "objecttypen.fullname" . }}
- secretRef:
name: {{ include "objecttypen.fullname" . }}-config-secrets
name: {{ if .Values.existingConfigurationSecrets }}{{ .Values.existingConfigurationSecrets }}{{ else }}{{ .Values.configurationSecretsName | default (printf "%s-config-secrets" (include "objecttypen.fullname" .)) }}{{ end }}
env:
{{- if .Values.extraEnvVars }}
{{- include "objecttypen.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
Expand Down
5 changes: 0 additions & 5 deletions charts/objecttypen/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ stringData:
ELASTIC_APM_SERVER_URL: {{ .Values.settings.elasticapm.url | toString | quote }}
ELASTIC_APM_SECRET_TOKEN: {{ .Values.settings.elasticapm.token | toString | quote }}
{{- end }}
{{ if and .Values.global.configuration.enabled .Values.configuration.enabled -}}
{{ if .Values.configuration.demo.enabled }}
DEMO_TOKEN: {{ .Values.configuration.demo.token | toString | quote }}
{{- end }}
{{- end }}
{{ if .Values.configuration.superuser.username }}
OBJECTTYPE_SUPERUSER_PASSWORD: {{ .Values.configuration.superuser.password | toString | quote }}
{{- end }}
Expand Down
14 changes: 4 additions & 10 deletions charts/objecttypen/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ configuration:
enabled: false
secrets: {}
overwrite: true
sites:
enabled: false
domain: ""
organization: ""
demo:
enabled: false
token:
person:
email:

superuser:
username: ""
password: ""
Expand Down Expand Up @@ -169,6 +159,10 @@ affinity: {}

# Existing Secret must be defined for AzureVaultSecret to work
existingSecret: null
# Reference to an existing secret with the values needed for django-setup-configuration
existingConfigurationSecrets: null
# If no secret already exists with the values needed for django-setup-configuration, create it with the following name
configurationSecretsName: ""

# This will create an AzureVaultSecret object in k8s, only Multi Key Value Secret are supported by this chart
# ref: https://akv2k8s.io/tutorials/sync/4-multi-key-value-secret/ https://learn.microsoft.com/en-us/azure/key-vault/secrets/multiline-secrets
Expand Down

0 comments on commit c247839

Please sign in to comment.