feat(wbo): add wbo (#3810)

* feat(wbo): add wbo

* Update charts/incubator/wbo/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* fix confmap

* update icon

* Update charts/incubator/wbo/questions.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/wbo/questions.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois
2022-09-19 11:17:16 +03:00
committed by GitHub
parent 7f8048392d
commit 54d3875813
9 changed files with 384 additions and 0 deletions
@@ -0,0 +1,47 @@
{{/* Define the configmap */}}
{{- define "wbo.config" -}}
{{- $configName := printf "%s-config" (include "tc.common.names.fullname" .) }}
---
{{/* This configmap are loaded on both main authentik container and worker */}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data:
PORT: {{ .Values.service.main.ports.main.port | quote }}
{{- if or .Values.wbo.save_interval (eq (int .Values.wbo.save_interval) 0) }}
SAVE_INTERVAL: {{ .Values.wbo.save_interval | quote }}
{{- end }}
{{- if or .Values.wbo.max_save_delay (eq (int .Values.wbo.max_save_delay) 0) }}
MAX_SAVE_DELAY: {{ .Values.wbo.max_save_delay | quote }}
{{- end }}
{{- if or .Values.wbo.max_item_count (eq (int .Values.wbo.max_item_count) 0) }}
MAX_ITEM_COUNT: {{ .Values.wbo.max_item_count | quote }}
{{- end }}
{{- if or .Values.wbo.max_children (eq (int .Values.wbo.max_children) 0) }}
MAX_CHILDREN: {{ .Values.wbo.max_children | quote }}
{{- end }}
{{- if or .Values.wbo.max_board_size (eq (int .Values.wbo.max_board_size) 0) }}
MAX_BOARD_SIZE: {{ .Values.wbo.max_board_size | quote }}
{{- end }}
{{- if or .Values.wbo.max_emit_count (eq (int .Values.wbo.max_emit_count) 0) }}
MAX_EMIT_COUNT: {{ .Values.wbo.max_emit_count | quote }}
{{- end }}
{{- if or .Values.wbo.max_emit_count_period (eq (int .Values.wbo.max_emit_count_period) 0) }}
MAX_EMIT_COUNT_PERIOD: {{ .Values.wbo.max_emit_count_period | quote }}
{{- end }}
{{- with .Values.wbo.auto_finger_whiteout }}
AUTO_FINGER_WHITEOUT: {{ ternary "enabled" "disabled" . }}
{{- end }}
{{- with .Values.wbo.blocked_tools }}
BLOCKED_TOOLS: {{ join "," . }}
{{- end }}
{{- with .Values.wbo.blocked_selection_buttons }}
BLOCKED_SELECTION_BUTTONS: {{ join "," . }}
{{- end }}
{{- end -}}
@@ -0,0 +1,21 @@
{{/* Define the secret */}}
{{- define "wbo.secret" -}}
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }}
---
{{/* This secrets are loaded on both main authentik container and worker */}}
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data:
{{- with .Values.wbo.auth_secret_key }}
AUTH_SECRET_KEY: {{ . | b64enc }}
{{- end }}
{{- end }}
@@ -0,0 +1,11 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{/* Render secret */}}
{{- include "wbo.secret" . }}
{{/* Render config */}}
{{- include "wbo.config" . }}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}