Skip to content

Commit

Permalink
Merge pull request #98 from maykinmedia/feature/objecten-2.3
Browse files Browse the repository at this point in the history
Support objecten version 2.3.x
  • Loading branch information
sjoerdie authored Mar 22, 2024
2 parents 25ad79c + f14df87 commit d504b1c
Show file tree
Hide file tree
Showing 8 changed files with 400 additions and 13 deletions.
6 changes: 6 additions & 0 deletions charts/objecten/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.3.14
digest: sha256:9a575d102b6aa617223725968198a70072cee90595377df08ae62cef7c32cf4a
generated: "2024-03-21T14:04:32.877514186+01:00"
11 changes: 9 additions & 2 deletions charts/objecten/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@ name: objecten
description: API om objecten te beheren die behoren bij een bepaald objecttype

type: application
version: 1.1.0
appVersion: 2.2.1
version: 2.3.1
appVersion: 2.3.1

dependencies:
- name: redis
version: 17.3.14
repository: https://charts.bitnami.com/bitnami
tags:
- redis
48 changes: 45 additions & 3 deletions charts/objecten/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# objecten

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

API om objecten te beheren die behoren bij een bepaald objecttype

Expand All @@ -11,6 +11,12 @@ helm repo add my-repo https://maykinmedia.github.io/charts/
helm install my-release my-repo/objecten
```

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | redis | 17.3.14 |

## Values

| Key | Type | Default | Description |
Expand All @@ -30,6 +36,20 @@ helm install my-release my-repo/objecten
| 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 |
| flower.enabled | bool | `true` | |
| flower.livenessProbe.failureThreshold | int | `6` | |
| flower.livenessProbe.initialDelaySeconds | int | `60` | |
| flower.livenessProbe.periodSeconds | int | `10` | |
| flower.livenessProbe.successThreshold | int | `1` | |
| flower.livenessProbe.timeoutSeconds | int | `5` | |
| flower.podLabels | object | `{}` | |
| flower.readinessProbe.failureThreshold | int | `6` | |
| flower.readinessProbe.initialDelaySeconds | int | `30` | |
| flower.readinessProbe.periodSeconds | int | `10` | |
| flower.readinessProbe.successThreshold | int | `1` | |
| flower.readinessProbe.timeoutSeconds | int | `5` | |
| flower.replicaCount | int | `1` | |
| flower.resources | object | `{}` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"maykinmedia/objects-api"` | |
Expand Down Expand Up @@ -63,6 +83,11 @@ helm install my-release my-repo/objecten
| readinessProbe.periodSeconds | int | `10` | |
| readinessProbe.successThreshold | int | `1` | |
| readinessProbe.timeoutSeconds | int | `5` | |
| redis.architecture | string | `"standalone"` | |
| redis.auth.enabled | bool | `false` | |
| redis.master.persistence.enabled | bool | `false` | |
| redis.master.resources.requests.cpu | string | `"10m"` | |
| redis.master.resources.requests.memory | string | `"20Mi"` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
Expand All @@ -76,13 +101,20 @@ helm install my-release my-repo/objecten
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| settings.allowedHosts | string | `""` | |
| settings.cache.axes | string | `""` | |
| settings.cache.default | string | `""` | |
| settings.cache.oidc | string | `""` | |
| settings.celery.brokerUrl | string | `""` | |
| settings.celery.logLevel | string | `"debug"` | |
| settings.celery.resultBackend | string | `""` | |
| settings.database.host | string | `""` | |
| settings.database.name | string | `""` | |
| settings.database.password | string | `""` | |
| settings.database.port | int | `5432` | |
| settings.database.sslmode | string | `"prefer"` | |
| settings.database.username | string | `""` | |
| settings.debug | bool | `false` | |
| settings.disable2fa | bool | `false` | Disable two factor authentication |
| settings.djangoSettingsModule | string | `"objects.conf.docker"` | |
| settings.elasticapm.serviceName | string | `""` | |
| settings.elasticapm.token | string | `""` | |
Expand All @@ -96,13 +128,23 @@ helm install my-release my-repo/objecten
| settings.isHttps | bool | `true` | |
| settings.secretKey | string | `""` | Generate secret key at https://djecrety.ir/ |
| settings.sentry.dsn | string | `""` | |
| settings.twoFactorAuthentication.forceOtpAdmin | bool | `true` | Enforce 2 Factor Authentication in the admin or not. Default True. You'll probably want to disable this when using OIDC. |
| settings.twoFactorAuthentication.patchAdmin | bool | `true` | Whether to use the 2 Factor Authentication login flow for the admin or not. Default True. You'll probably want to disable this when using OIDC. |
| settings.useXForwardedHost | bool | `false` | |
| settings.uwsgi.harakiri | string | `""` | |
| settings.uwsgi.master | string | `""` | |
| settings.uwsgi.maxRequests | string | `""` | |
| settings.uwsgi.processes | string | `""` | |
| settings.uwsgi.threads | string | `""` | |
| tags.redis | bool | `true` | |
| tolerations | list | `[]` | |
| worker.autoscaling.enabled | bool | `false` | |
| worker.autoscaling.maxReplicas | int | `100` | |
| worker.autoscaling.minReplicas | int | `1` | |
| worker.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| worker.autoscaling.targetMemoryUtilizationPercentage | int | `80` | |
| worker.concurrency | int | `4` | |
| worker.livenessProbe | object | `{}` | |
| worker.maxWorkerLivenessDelta | string | `""` | |
| worker.podLabels | object | `{}` | |
| worker.replicaCount | int | `1` | |
| worker.resources | object | `{}` | |

Binary file added charts/objecten/charts/redis-17.3.14.tgz
Binary file not shown.
62 changes: 62 additions & 0 deletions charts/objecten/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,68 @@ Selector labels
app.kubernetes.io/name: {{ include "objecten.name" . }}
{{- end }}

{{/*
Create a name for the worker
We truncate at 56 chars in order to provide space for the "-worker" suffix
*/}}
{{- define "objecten.workerName" -}}
{{ include "objecten.name" . | trunc 56 | trimSuffix "-" }}-worker
{{- end }}

{{/*
Create a default fully qualified name for the worker.
We truncate at 56 chars in order to provide space for the "-worker" suffix
*/}}
{{- define "objecten.workerFullname" -}}
{{ include "objecten.fullname" . | trunc 56 | trimSuffix "-" }}-worker
{{- end }}

{{/*
Worker labels
*/}}
{{- define "objecten.workerLabels" -}}
{{ include "objecten.commonLabels" . }}
{{ include "objecten.workerSelectorLabels" . }}
{{- end }}

{{/*
Worker selector labels
*/}}
{{- define "objecten.workerSelectorLabels" -}}
app.kubernetes.io/name: {{ include "objecten.workerName" . }}
{{- end }}

{{/*
Create a name for Flower
We truncate at 56 chars in order to provide space for the "-flower" suffix
*/}}
{{- define "objecten.flowerName" -}}
{{ include "objecten.name" . | trunc 56 | trimSuffix "-" }}-flower
{{- end }}

{{/*
Create a default fully qualified name for Flower.
We truncate at 56 chars in order to provide space for the "-flower" suffix
*/}}
{{- define "objecten.flowerFullname" -}}
{{ include "objecten.fullname" . | trunc 56 | trimSuffix "-" }}-flower
{{- end }}

{{/*
Flower labels
*/}}
{{- define "objecten.flowerLabels" -}}
{{ include "objecten.commonLabels" . }}
{{ include "objecten.flowerSelectorLabels" . }}
{{- end }}

{{/*
Flower selector labels
*/}}
{{- define "objecten.flowerSelectorLabels" -}}
app.kubernetes.io/name: {{ include "objecten.flowerName" . }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
22 changes: 20 additions & 2 deletions charts/objecten/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ data:
{{- end }}
ENVIRONMENT: {{ .Values.settings.environment | default (include "objecten.fullname" .) }}
ALLOWED_HOSTS: "{{ include "objecten.fullname" . }},{{ include "objecten.fullname" . }}.{{ .Release.Namespace }},{{ .Values.settings.allowedHosts | replace " " "" | toString }}"
{{- if .Values.tags.redis }}
CACHE_DEFAULT: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }}
CACHE_AXES: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }}
CACHE_OIDC: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }}
CELERY_BROKER_URL: {{ printf "redis://%s-master.%s:6379/1" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }}
CELERY_RESULT_BACKEND: {{ printf "redis://%s-master.%s:6379/1" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }}
{{ else }}
CACHE_DEFAULT: {{ .Values.settings.cache.default | toString | quote }}
CACHE_AXES: {{ .Values.settings.cache.axes | toString | quote }}
CACHE_OIDC: {{ .Values.settings.cache.oidc | toString | quote }}
CELERY_BROKER_URL: {{ .Values.settings.celery.brokerUrl | toString | quote }}
CELERY_RESULT_BACKEND: {{ .Values.settings.celery.resultBackendl | toString | quote }}
{{- end }}
CELERY_LOGLEVEL: {{ .Values.settings.celery.logLevel | upper | toString | quote }}
{{ if .Values.worker.maxWorkerLivenessDelta }}
MAX_WORKER_LIVENESS_DELTA: {{ .Values.worker.maxWorkerLivenessDelta | toString | quote }}
{{- end }}
DB_NAME: {{ .Values.settings.database.name | toString | quote }}
DB_HOST: {{ .Values.settings.database.host | toString | quote }}
DB_USER: {{ .Values.settings.database.username | toString | quote }}
Expand All @@ -19,8 +36,9 @@ data:
{{ if .Values.settings.debug }}
DEBUG: "True"
{{- end }}
TWO_FACTOR_FORCE_OTP_ADMIN: {{ if .Values.settings.twoFactorAuthentication.forceOtpAdmin }}"True"{{ else }}"False"{{ end }}
TWO_FACTOR_PATCH_ADMIN: {{ if .Values.settings.twoFactorAuthentication.patchAdmin }}"True"{{ else }}"False"{{ end }}
{{ if .Values.settings.disable2fa }}
DISABLE_2FA: "True"
{{- end }}
IS_HTTPS: {{ if .Values.settings.isHttps }}"True"{{ else }}"False"{{ end }}
EMAIL_HOST: {{ .Values.settings.email.host | toString | quote }}
EMAIL_PORT: {{ .Values.settings.email.port | toString | quote }}
Expand Down
Loading

0 comments on commit d504b1c

Please sign in to comment.