diff --git a/charts/incubator/mealie/Chart.yaml b/charts/incubator/mealie/Chart.yaml index 4cf0613cd79..ca634f1bc49 100644 --- a/charts/incubator/mealie/Chart.yaml +++ b/charts/incubator/mealie/Chart.yaml @@ -3,11 +3,7 @@ appVersion: "1.0.0beta" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 - - condition: postgresql.enabled - name: postgresql - repository: https://deps.truecharts.org/ - version: 11.0.31 + version: 13.2.0 description: Mealie is a self hosted recipe manager and meal planner with a RestAPI backend home: https://truecharts.org/charts/incubator/mealie icon: https://truecharts.org/img/hotlink-ok/chart-icons/mealie.png @@ -22,7 +18,7 @@ name: mealie sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/mealie - https://github.com/hay-kot/mealie -version: 15.0.0 +version: 16.0.0 annotations: truecharts.org/catagories: | - utilities diff --git a/charts/incubator/mealie/ci/test-values.yaml b/charts/incubator/mealie/ci/test-values.yaml new file mode 100644 index 00000000000..c7f1000e6ce --- /dev/null +++ b/charts/incubator/mealie/ci/test-values.yaml @@ -0,0 +1,4 @@ +mealie: + api: + general: + base_url: http://localhost:10018 diff --git a/charts/incubator/mealie/questions.yaml b/charts/incubator/mealie/questions.yaml index 8793c31fb9a..b80e6a73773 100644 --- a/charts/incubator/mealie/questions.yaml +++ b/charts/incubator/mealie/questions.yaml @@ -6,299 +6,371 @@ questions: # Include{global} # Include{workload} # Include{workloadDeployment} - # Include{replicas1} # Include{podSpec} # Include{containerMain} # Include{containerBasic} # Include{containerAdvanced} - - - variable: mealie_frontend + - variable: mealie group: App Configuration - label: Mealie Frontend Configuration + label: Mealie Configuration schema: additional_attrs: true type: dict attrs: - - variable: theme - label: Theme + - variable: frontend + label: Mealie Frontend Configuration schema: additional_attrs: true type: dict attrs: - - variable: light_primary - label: Light Primary - description: Light Theme Config Variable + - variable: theme + label: Theme schema: - type: string - default: "#E58325" - - variable: light_accent - label: Light Accent - description: Light Theme Config Variable - schema: - type: string - default: "#007A99" - - variable: light_secondary - label: Light Secondary - description: Light Theme Config Variable - schema: - type: string - default: "#973542" - - variable: light_success - label: Light Success - description: Light Theme Config Variable - schema: - type: string - default: "#43A047" - - variable: light_info - label: Light Info - description: Light Theme Config Variable - schema: - type: string - default: "#1976D2" - - variable: light_warning - label: Light Warning - description: Light Theme Config Variable - schema: - type: string - default: "#FF6D00" - - variable: light_error - label: Light Error - description: Light Theme Config Variable - schema: - type: string - default: "#EF5350" - - variable: dark_primary - label: Dark Primary - description: Dark Theme Config Variable - schema: - type: string - default: "#E58325" - - variable: dark_accent - label: Dark Accent - description: Dark Theme Config Variable - schema: - type: string - default: "#007A99" - - variable: dark_secondary - label: Dark Secondary - description: Dark Theme Config Variable - schema: - type: string - default: "#973542" - - variable: dark_success - label: Dark Success - description: Dark Theme Config Variable - schema: - type: string - default: "#43A047" - - variable: dark_info - label: Dark Info - description: Dark Theme Config Variable - schema: - type: string - default: "#1976D2" - - variable: dark_warning - label: Dark Warning - description: Dark Theme Config Variable - schema: - type: string - default: "#FF6D00" - - variable: dark_error - label: Dark Error - description: Dark Theme Config Variable - schema: - type: string - default: "#EF5350" - - variable: mealie_backend - group: App Configuration - label: Mealie Backend Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: general - label: General + additional_attrs: true + type: dict + attrs: + - variable: light_primary + label: Light Primary + description: Light Theme Config Variable + schema: + type: string + default: "#E58325" + required: true + - variable: light_accent + label: Light Accent + description: Light Theme Config Variable + schema: + type: string + default: "#007A99" + required: true + - variable: light_secondary + label: Light Secondary + description: Light Theme Config Variable + schema: + type: string + default: "#973542" + required: true + - variable: light_success + label: Light Success + description: Light Theme Config Variable + schema: + type: string + default: "#43A047" + required: true + - variable: light_info + label: Light Info + description: Light Theme Config Variable + schema: + type: string + default: "#1976D2" + required: true + - variable: light_warning + label: Light Warning + description: Light Theme Config Variable + schema: + type: string + default: "#FF6D00" + required: true + - variable: light_error + label: Light Error + description: Light Theme Config Variable + schema: + type: string + default: "#EF5350" + required: true + - variable: dark_primary + label: Dark Primary + description: Dark Theme Config Variable + schema: + type: string + default: "#E58325" + required: true + - variable: dark_accent + label: Dark Accent + description: Dark Theme Config Variable + schema: + type: string + default: "#007A99" + required: true + - variable: dark_secondary + label: Dark Secondary + description: Dark Theme Config Variable + schema: + type: string + default: "#973542" + required: true + - variable: dark_success + label: Dark Success + description: Dark Theme Config Variable + schema: + type: string + default: "#43A047" + required: true + - variable: dark_info + label: Dark Info + description: Dark Theme Config Variable + schema: + type: string + default: "#1976D2" + required: true + - variable: dark_warning + label: Dark Warning + description: Dark Theme Config Variable + schema: + type: string + default: "#FF6D00" + required: true + - variable: dark_error + label: Dark Error + description: Dark Theme Config Variable + schema: + type: string + default: "#EF5350" + required: true + - variable: api + label: Mealie API Configuration schema: additional_attrs: true type: dict attrs: - - variable: allow_signup - label: Allow Sign up - description: Allow user sign-up without token + - variable: general + label: General schema: - type: boolean - default: true - - variable: default_group - label: Default Group - description: The default group for users + additional_attrs: true + type: dict + attrs: + - variable: base_url + label: Base URL + description: Used for Notifications + schema: + type: string + default: "" + - variable: allow_signup + label: Allow Sign up + description: Allow user sign-up without token + schema: + type: boolean + default: true + - variable: default_group + label: Default Group + description: The default group for users + schema: + type: string + default: Home + required: true + - variable: default_email + label: Default Email + description: The default username for the superuser + schema: + type: string + default: changeme@email.com + required: true + - variable: token_time + label: Token Time + description: The time in hours that a login/auth token is valid + schema: + type: int + default: 48 + required: true + - variable: security + label: Security schema: - type: string - default: Home - - variable: default_email - label: Default Email - description: The default username for the superuser + additional_attrs: true + type: dict + attrs: + - variable: max_login_attempts + label: Max Login Attempts + description: Maximum times a user can provide an invalid password before their account is locked + schema: + type: int + default: 5 + required: true + - variable: user_lockout_time + label: User Lockout Time + description: Time in hours for how long a users account is locked + schema: + type: int + default: 24 + required: true + - variable: webworkers + label: Web Workers schema: - type: string - default: changeme@email.com - - variable: base_url - label: Base URL - description: Used for Notifications + additional_attrs: true + type: dict + attrs: + - variable: workers_per_core + label: Workers Per Core + description: Set the number of workers to the number of CPU cores multiplied by this value. + schema: + type: int + default: 1 + required: true + - variable: max_workers + label: Max Workers + description: Set the maximum number of workers to use. Default is not set meaning unlimited. + schema: + type: int + default: 1 + required: true + - variable: web_concurrency + label: Web Concurrency + description: Override the automatic definition of number of workers. + schema: + type: int + default: 1 + required: true + - variable: smtp + label: SMTP schema: - type: string - default: "" - - variable: token_time - label: Token Time - description: The time in hours that a login/auth token is valid + additional_attrs: true + type: dict + attrs: + - variable: host + label: Host + description: Mail Host + schema: + type: string + default: "" + - variable: port + label: Port + description: Mail Port + schema: + type: int + show_if: [["host", "!=", ""]] + default: 587 + required: true + - variable: user + label: User + description: Mail User + schema: + type: string + show_if: [["host", "!=", ""]] + required: true + default: "" + - variable: password + label: Password + description: Mail Password + schema: + type: string + show_if: [["host", "!=", ""]] + private: true + required: true + default: "" + - variable: from_name + label: From Name + description: Mail From Name + schema: + type: string + show_if: [["host", "!=", ""]] + required: true + default: Mealie + - variable: from_email + label: From Email + description: Mail From Email + schema: + type: string + required: true + default: "" + - variable: auth_strategy + label: Auth Strategy + description: Mail Auth Strategy + schema: + type: string + show_if: [["host", "!=", ""]] + required: true + default: "TLS" + enum: + - value: TLS + description: TLS + - value: SSL + description: SSL + - value: NONE + description: NONE + - variable: ldap + label: LDAP schema: - type: int - default: 48 - - variable: security - label: Security - schema: - additional_attrs: true - type: dict - attrs: - - variable: max_login_attempts - label: Max Login Attempts - description: Maximum times a user can provide an invalid password before their account is locked - schema: - type: int - default: 5 - - variable: user_lockout_time - label: User Lockout Time - description: Time in hours for how long a users account is locked - schema: - type: int - default: 24 - - variable: webworkers - label: Web Workers - schema: - additional_attrs: true - type: dict - attrs: - - variable: workers_per_core - label: Workers Per Core - description: Set the number of workers to the number of CPU cores multiplied by this value. - schema: - type: int - default: 1 - - variable: max_workers - label: Max Workers - description: Set the maximum number of workers to use. Default is not set meaning unlimited. - schema: - type: int - default: 1 - - variable: web_concurrency - label: Web Concurrency - description: Override the automatic definition of number of workers. - schema: - type: int - default: 1 - - variable: smtp - label: SMTP - schema: - additional_attrs: true - type: dict - attrs: - - variable: user - label: User - description: Mail User - schema: - type: string - default: "" - - variable: password - label: Password - description: Mail Password - schema: - type: string - private: true - default: "" - - variable: host - label: Host - description: Mail Host - schema: - type: string - default: "" - - variable: port - label: Port - description: Mail Port - schema: - type: int - default: 587 - - variable: from_name - label: From Name - description: Mail From Name - schema: - type: string - default: Mealie - - variable: from_email - label: From Email - description: Mail From Email - schema: - type: string - default: "" - - variable: auth_strategy - label: Auth Strategy - description: Mail Auth Strategy - schema: - type: string - default: "TLS" - enum: - - value: TLS - description: TLS - - value: SSL - description: SSL - - value: NONE - description: NONE - - variable: ldap - label: LDAP - schema: - additional_attrs: true - type: dict - attrs: - - variable: auth_enabled - label: Auth Enabled - description: Authenticate via an external LDAP server in addition to built-in Mealie auth - schema: - type: boolean - default: false - - variable: server_url - label: Server URL - description: LDAP server URL - schema: - type: string - default: "" - - variable: tls_insecure - label: TLS Insecure - description: Do not verify server certificate when using secure LDAP - schema: - type: boolean - default: false - - variable: tls_cacertfile - label: TLS CA Cert File - description: File path to Certificate Authority used to verify server certificate - schema: - type: string - default: "" - - variable: bind_template - label: Bind Template - description: Templated DN for users, {} will be replaced with the username. - schema: - type: string - default: "" - - variable: base_dn - label: Base DN - description: Starting point when searching for users authentication. - schema: - type: string - default: "" - - variable: admin_filter - label: Admin Filter - description: Optional LDAP filter, which tells Mealie the LDAP user .is an admin - schema: - type: string - default: "" + additional_attrs: true + type: dict + attrs: + - variable: auth_enabled + label: Auth Enabled + description: Authenticate via an external LDAP server in addition to built-in Mealie auth + schema: + type: boolean + default: false + - variable: server_url + label: Server URL + description: LDAP server URL + schema: + type: string + default: "" + - variable: tls_insecure + label: TLS Insecure + description: Do not verify server certificate when using secure LDAP + schema: + type: boolean + default: false + - variable: enable_starttls + label: Enable StartTLS + description: Use STARTTLS to connect to the server + schema: + type: boolean + default: false + - variable: tls_cacertfile + label: TLS CA Cert File + description: File path to Certificate Authority used to verify server certificate + schema: + type: string + default: "" + - variable: base_dn + label: Base DN + description: Starting point when searching for users authentication. + schema: + type: string + default: "" + - variable: query_bind + label: Query Bind + description: Optional bind user for LDAP search queries + schema: + type: string + default: "" + - variable: query_password + label: Query Password + description: Optional password for the bind user used + schema: + type: string + default: "" + - variable: user_filter + label: User Filter + description: Optional LDAP filter to narrow down eligible users + schema: + type: string + default: "" + - variable: admin_filter + label: Admin Filter + description: Optional LDAP filter, which tells Mealie the LDAP user is an admin + schema: + type: string + default: "" + - variable: id_attribute + label: ID Attribute + description: The LDAP attribute that maps to the user's id + schema: + type: string + default: uid + - variable: user_attribute + label: User Attribute + description: The LDAP attribute that maps to the user's name + schema: + type: string + default: name + - variable: mail_attribute + label: Mail Attribute + description: The LDAP attribute that maps to the user's email + schema: + type: string + default: mail # Include{containerConfig} # Include{podOptions} diff --git a/charts/incubator/mealie/templates/NOTES.txt b/charts/incubator/mealie/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/mealie/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/mealie/templates/_api.tpl b/charts/incubator/mealie/templates/_api.tpl deleted file mode 100644 index d8909fdfdc9..00000000000 --- a/charts/incubator/mealie/templates/_api.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "mealie.api" -}} -image: {{ .Values.apiImage.repository }}:{{ .Values.apiImage.tag }} -imagePullPolicy: {{ .Values.apiImage.pullPolicy }} -securityContext: - runAsUser: {{ .Values.podSecurityContext.runAsUser }} - runAsGroup: {{ .Values.podSecurityContext.runAsGroup }} - readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }} - runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }} -envFrom: - - secretRef: - name: '{{ include "tc.common.names.fullname" . }}-api-secret' - - configMapRef: - name: '{{ include "tc.common.names.fullname" . }}-api-config' -volumeMounts: - - name: data - mountPath: "/app/data" -readinessProbe: - httpGet: - path: /docs - port: {{ .Values.service.api.ports.api.port }} - initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }} - timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }} - periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }} - failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }} -livenessProbe: - httpGet: - path: /docs - port: {{ .Values.service.api.ports.api.port }} - initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }} - timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }} - periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }} - failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }} -startupProbe: - httpGet: - path: /docs - port: {{ .Values.service.api.ports.api.port }} - initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }} - timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }} - periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }} - failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }} -{{- end -}} diff --git a/charts/incubator/mealie/templates/_configmap.tpl b/charts/incubator/mealie/templates/_configmap.tpl deleted file mode 100644 index 5cf8dd9dfb3..00000000000 --- a/charts/incubator/mealie/templates/_configmap.tpl +++ /dev/null @@ -1,131 +0,0 @@ -{{/* Define the configmap */}} -{{- define "mealie.config" -}} - -{{- $frontendConfigName := printf "%s-frontend-config" (include "tc.common.names.fullname" .) }} -{{- $apiConfigName := printf "%s-api-config" (include "tc.common.names.fullname" .) }} - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $frontendConfigName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: - API_URL: http://localhost:{{ .Values.service.api.ports.api.port }} - THEME_LIGHT_PRIMARY: {{ .Values.mealie_frontend.theme.light_primary | default "#E58325" | quote }} - THEME_LIGHT_ACCENT: {{ .Values.mealie_frontend.theme.light_accent | default "#007A99" | quote }} - THEME_LIGHT_SECONDARY: {{ .Values.mealie_frontend.theme.light_secondary | default "#973542" | quote }} - THEME_LIGHT_SUCCESS: {{ .Values.mealie_frontend.theme.light_success | default "#43A047" | quote }} - THEME_LIGHT_INFO: {{ .Values.mealie_frontend.theme.light_info | default "#1976D2" | quote }} - THEME_LIGHT_WARNING: {{ .Values.mealie_frontend.theme.light_warning | default "#FF6D00" | quote }} - THEME_LIGHT_ERROR: {{ .Values.mealie_frontend.theme.light_error | default "#EF5350" | quote }} - THEME_DARK_PRIMARY: {{ .Values.mealie_frontend.theme.dark_primary | default "#E58325" | quote }} - THEME_DARK_ACCENT: {{ .Values.mealie_frontend.theme.dark_accent | default "#007A99" | quote }} - THEME_DARK_SECONDARY: {{ .Values.mealie_frontend.theme.dark_secondary | default "#973542" | quote }} - THEME_DARK_SUCCESS: {{ .Values.mealie_frontend.theme.dark_success | default "#43A047" | quote }} - THEME_DARK_INFO: {{ .Values.mealie_frontend.theme.dark_info | default "#1976D2" | quote }} - THEME_DARK_WARNING: {{ .Values.mealie_frontend.theme.dark_warning | default "#FF6D00" | quote }} - THEME_DARK_ERROR: {{ .Values.mealie_frontend.theme.dark_error | default "#EF5350" | quote }} - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $apiConfigName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: - PUID: {{ .Values.security.PUID | quote }} - PGID: {{ .Values.podSecurityContext.fsGroup | quote }} - TZ: {{ .Values.TZ }} - DB_ENGINE: "postgres" - POSTGRES_PORT: "5432" - POSTGRES_USER: {{ .Values.postgresql.postgresqlUsername }} - POSTGRES_DB: {{ .Values.postgresql.postgresqlDatabase }} - POSTGRES_SERVER: {{ printf "%v-%v" .Release.Name "postgresql" }} - API_PORT: {{ .Values.service.api.ports.api.port | quote }} - {{/* User Defined */}} - {{/* General */}} - ALLOW_SIGNUP: {{ .Values.mealie_backend.general.allow_signup | quote }} - API_DOCS: "true" - {{- with .Values.mealie_backend.general.default_group }} - DEFAULT_GROUP: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.general.default_email }} - DEFAULT_EMAIL: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.general.base_url }} - BASE_URL: {{ . }} - {{- end }} - {{- if hasKey .Values.mealie_backend.general "token_time" }} - {{- if or .Values.mealie_backend.general.token_time (eq 0 (int .Values.mealie_backend.general.token_time)) }} - TOKEN_TIME: {{ .Values.mealie_backend.general.token_time | quote }} - {{- end }} - {{- end }} - {{/* Security */}} - {{- if hasKey .Values.mealie_backend.security "max_login_attempts" }} - {{- if or .Values.mealie_backend.security.max_login_attempts (eq 0 (int .Values.mealie_backend.security.max_login_attempts)) }} - SECURITY_MAX_LOGIN_ATTEMPTS: {{ .Values.mealie_backend.security.max_login_attempts | quote }} - {{- end }} - {{- end }} - {{- if hasKey .Values.mealie_backend.security "user_lockout_time" }} - {{- if or .Values.mealie_backend.security.user_lockout_time (eq 0 (int .Values.mealie_backend.security.user_lockout_time)) }} - SECURITY_USER_LOCKOUT_TIME: {{ .Values.mealie_backend.security.user_lockout_time | quote }} - {{- end }} - {{- end }} - {{/* Security */}} - {{- if hasKey .Values.mealie_backend.webworkers "workers_per_core" }} - {{- if or .Values.mealie_backend.webworkers.workers_per_core (eq 0 (int .Values.mealie_backend.webworkers.workers_per_core)) }} - WORKERS_PER_CORE: {{ .Values.mealie_backend.webworkers.workers_per_core | quote }} - {{- end }} - {{- end }} - {{- if hasKey .Values.mealie_backend.webworkers "max_workers" }} - {{- if or .Values.mealie_backend.webworkers.max_workers (eq 0 (int .Values.mealie_backend.webworkers.max_workers)) }} - MAX_WORKERS: {{ .Values.mealie_backend.webworkers.max_workers | quote }} - {{- end }} - {{- end }} - {{- if hasKey .Values.mealie_backend.webworkers "web_concurrency" }} - {{- if or .Values.mealie_backend.webworkers.web_concurrency (eq 0 (int .Values.mealie_backend.webworkers.web_concurrency)) }} - WEB_CONCURRENCY: {{ .Values.mealie_backend.webworkers.web_concurrency | quote }} - {{- end }} - {{- end }} - {{/* SMTP */}} - {{- if hasKey .Values.mealie_backend.smtp "port" }} - {{- if or .Values.mealie_backend.smtp.port (eq 0 (int .Values.mealie_backend.smtp.port)) }} - SMTP_PORT: {{ .Values.mealie_backend.smtp.port | quote }} - {{- end }} - {{- end }} - {{- with .Values.mealie_backend.smtp.host }} - SMTP_HOST: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.smtp.from_name }} - SMTP_FROM_NAME: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.smtp.auth_strategy }} - SMTP_AUTH_STRATEGY: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.smtp.from_email }} - SMTP_FROM_EMAIL: {{ . }} - {{- end }} - {{/* SMTP */}} - LDAP_AUTH_ENABLED: {{ .Values.mealie_backend.ldap.auth_enabled | quote }} - LDAP_TLS_INSECURE: {{ .Values.mealie_backend.ldap.tls_insecure | quote }} - {{- with .Values.mealie_backend.ldap.server_url }} - LDAP_SERVER_URL: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.ldap.tls_cacertfile }} - LDAP_TLS_CACERTFILE: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.ldap.bind_template }} - LDAP_BIND_TEMPLATE: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.ldap.base_dn }} - LDAP_BASE_DN: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.ldap.admin_filter }} - LDAP_ADMIN_FILTER: {{ . }} - {{- end }} -{{- end -}} diff --git a/charts/incubator/mealie/templates/_secret.tpl b/charts/incubator/mealie/templates/_secret.tpl deleted file mode 100644 index a4b535c9079..00000000000 --- a/charts/incubator/mealie/templates/_secret.tpl +++ /dev/null @@ -1,24 +0,0 @@ -{{/* Define the secret */}} -{{- define "mealie.secret" -}} - -{{- $apiSecretName := printf "%s-api-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: {{ $apiSecretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: - POSTGRES_PASSWORD: {{ .Values.postgresql.postgresqlPassword | trimAll "\"" | b64enc }} - {{- with .Values.mealie_backend.smtp.user | b64enc }} - SMTP_USER: {{ . }} - {{- end }} - {{- with .Values.mealie_backend.smtp.password | b64enc }} - SMTP_PASSWORD: {{ . }} - {{- end }} -{{- end }} diff --git a/charts/incubator/mealie/templates/_secrets.tpl b/charts/incubator/mealie/templates/_secrets.tpl new file mode 100644 index 00000000000..425552b890f --- /dev/null +++ b/charts/incubator/mealie/templates/_secrets.tpl @@ -0,0 +1,99 @@ +{{/* Define the secrets */}} +{{- define "mealie.secrets" -}} +{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}} +{{- $api := .Values.mealie.api -}} +{{- $frontend := .Values.mealie.frontend }} + +frontend: + enabled: true + data: + {{/* Frontend */}} + API_URL: {{ printf "http://%v-api:%v" $fullname .Values.service.api.ports.api.port }} + THEME_LIGHT_PRIMARY: {{ $frontend.theme.light_primary | default "#E58325" | quote }} + THEME_LIGHT_ACCENT: {{ $frontend.theme.light_accent | default "#007A99" | quote }} + THEME_LIGHT_SECONDARY: {{ $frontend.theme.light_secondary | default "#973542" | quote }} + THEME_LIGHT_SUCCESS: {{ $frontend.theme.light_success | default "#43A047" | quote }} + THEME_LIGHT_INFO: {{ $frontend.theme.light_info | default "#1976D2" | quote }} + THEME_LIGHT_WARNING: {{ $frontend.theme.light_warning | default "#FF6D00" | quote }} + THEME_LIGHT_ERROR: {{ $frontend.theme.light_error | default "#EF5350" | quote }} + THEME_DARK_PRIMARY: {{ $frontend.theme.dark_primary | default "#E58325" | quote }} + THEME_DARK_ACCENT: {{ $frontend.theme.dark_accent | default "#007A99" | quote }} + THEME_DARK_SECONDARY: {{ $frontend.theme.dark_secondary | default "#973542" | quote }} + THEME_DARK_SUCCESS: {{ $frontend.theme.dark_success | default "#43A047" | quote }} + THEME_DARK_INFO: {{ $frontend.theme.dark_info | default "#1976D2" | quote }} + THEME_DARK_WARNING: {{ $frontend.theme.dark_warning | default "#FF6D00" | quote }} + THEME_DARK_ERROR: {{ $frontend.theme.dark_error | default "#EF5350" | quote }} + +api: + enabled: true + data: + API_PORT: {{ .Values.service.api.ports.api.port | quote }} + API_DOCS: "true" + {{/* Database */}} + DB_ENGINE: "postgres" + POSTGRES_PORT: "5432" + POSTGRES_USER: {{ .Values.cnpg.main.user }} + POSTGRES_PASSWORD: {{ .Values.cnpg.main.creds.password | trimAll "\"" }} + POSTGRES_DB: {{ .Values.cnpg.main.database }} + POSTGRES_SERVER: {{ .Values.cnpg.main.creds.host }} + {{/* User Defined */}} + {{/* General */}} + ALLOW_SIGNUP: {{ $api.general.allow_signup | quote }} + DEFAULT_GROUP: {{ $api.general.default_group }} + DEFAULT_EMAIL: {{ $api.general.default_email }} + BASE_URL: {{ $api.general.base_url }} + TOKEN_TIME: {{ $api.general.token_time | quote }} + {{/* Security */}} + SECURITY_MAX_LOGIN_ATTEMPTS: {{ $api.security.max_login_attempts | quote }} + SECURITY_USER_LOCKOUT_TIME: {{ $api.security.user_lockout_time | quote }} + {{/* SMTP */}} + {{- if $api.smtp.host }} + SMTP_PORT: {{ $api.smtp.port | quote }} + SMTP_HOST: {{ $api.smtp.host | quote }} + SMTP_USER: {{ $api.smtp.user | quote }} + SMTP_PASSWORD: {{ $api.smtp.password | quote }} + SMTP_FROM_NAME: {{ $api.smtp.from_name | quote }} + SMTP_AUTH_STRATEGY: {{ $api.smtp.auth_strategy | quote }} + SMTP_FROM_EMAIL: {{ $api.smtp.from_email | quote }} + {{- end }} + {{/* Workers */}} + WORKERS_PER_CORE: {{ $api.webworkers.workers_per_core | quote }} + MAX_WORKERS: {{ $api.webworkers.max_workers | quote }} + WEB_CONCURRENCY: {{ $api.webworkers.web_concurrency | quote }} + {{/* LDAP */}} + {{- if $api.ldap.auth_enabled }} + LDAP_AUTH_ENABLED: {{ $api.ldap.auth_enabled | quote }} + {{- with $api.ldap.server_url }} + LDAP_SERVER_URL: {{ . }} + {{- end }} + LDAP_TLS_INSECURE: {{ $api.ldap.tls_insecure | quote }} + LDAP_ENABLE_STARTTLS: {{ $api.ldap.enable_starttls | quote }} + {{- with $api.ldap.tls_cacertfile }} + LDAP_TLS_CACERTFILE: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.base_dn }} + LDAP_BASE_DN: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.query_bind }} + LDAP_QUERY_BIND: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.query_password }} + LDAP_QUERY_PASSWORD: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.user_filter }} + LDAP_USER_FILTER: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.admin_filter }} + LDAP_ADMIN_FILTER: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.id_attribute }} + LDAP_ID_ATTRIBUTE: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.name_attribute }} + LDAP_NAME_ATTRIBUTE: {{ . | quote }} + {{- end -}} + {{- with $api.ldap.mail_attribute }} + LDAP_MAIL_ATTRIBUTE: {{ . | quote }} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/charts/incubator/mealie/templates/common.yaml b/charts/incubator/mealie/templates/common.yaml index bd88d41c606..fda2cdae013 100644 --- a/charts/incubator/mealie/templates/common.yaml +++ b/charts/incubator/mealie/templates/common.yaml @@ -1,13 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . }} -{{/* Render secret */}} -{{- include "mealie.secret" . }} - -{{/* Render config */}} -{{- include "mealie.config" . }} - -{{- $_ := set .Values.additionalContainers "api" (include "mealie.api" . | fromYaml) -}} +{{/* Render secrets for mealie */}} +{{- $secrets := include "mealie.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := mustMergeOverwrite .Values.secret $secrets -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/mealie/values.yaml b/charts/incubator/mealie/values.yaml index 16e5c6f53c3..cf5c5c42914 100644 --- a/charts/incubator/mealie/values.yaml +++ b/charts/incubator/mealie/values.yaml @@ -1,111 +1,159 @@ image: repository: tccr.io/truecharts/mealie-frontend - tag: v1.0.0beta@sha256:4158c31d037c2ece8931d2e2b120654b6f658b020f9273e8a2cc289d9e715552 + tag: latest@sha256:545440da5702172f8aa53c98f7136e39e6143ab18299a5aeccc404748ddd1245 pullPolicy: IfNotPresent - apiImage: repository: tccr.io/truecharts/mealie-api - tag: v1.0.0beta@sha256:1a3b047474f908ae97a78d0f679892aa0f1bbea1e97abaf57c115df1b33d398a + tag: latest@sha256:75250abbd9641bdc044961c58aa1f297245be450c3e5abd25aceac38b12ad72c pullPolicy: IfNotPresent +mealie: + frontend: + theme: + light_primary: "#E58325" + light_accent: "#007A99" + light_secondary: "#973542" + light_success: "#43A047" + light_info: "#1976D2" + light_warning: "#FF6D00" + light_error: "#EF5350" + dark_primary: "#E58325" + dark_accent: "#007A99" + dark_secondary: "#973542" + dark_success: "#43A047" + dark_info: "#1976D2" + dark_warning: "#FF6D00" + dark_error: "#EF5350" + api: + general: + allow_signup: true + default_group: Home + default_email: changeme@email.com + base_url: "" + token_time: 48 + security: + max_login_attempts: 5 + user_lockout_time: 24 + smtp: + user: "" + password: "" + host: "" + port: 587 + from_name: Mealie + from_email: "" + # TLS | SSL | NONE + auth_strategy: TLS + webworkers: + workers_per_core: 1 + max_workers: 1 + web_concurrency: 1 + ldap: + auth_enabled: false + server_url: "" + tls_insecure: false + enable_starttls: false + tls_cacertfile: "" + base_dn: "" + query_bind: "" + query_password: "" + user_filter: "" + admin_filter: "" + id_attribute: uid + user_attribute: name + mail_attribute: mail + +workload: + main: + podSpec: + containers: + main: + securityContext: + capabilities: + add: + - NET_BIND_SERVICE + probes: + liveness: + path: "/" + type: http + readiness: + path: "/" + type: http + startup: + path: "/" + type: http + envFrom: + - secretRef: + name: frontend + api: + enabled: true + type: Deployment + strategy: RollingUpdate + replicas: 1 + podSpec: + containers: + api: + primary: true + enabled: true + imageSelector: apiImage + probes: + liveness: + path: /api/app/about + type: http + port: "{{ .Values.service.api.ports.api.port }}" + readiness: + path: /api/app/about + type: http + port: "{{ .Values.service.api.ports.api.port }}" + startup: + type: tcp + port: "{{ .Values.service.api.ports.api.port }}" + envFrom: + - secretRef: + name: api + securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -mealie_frontend: - theme: - light_primary: "#E58325" - light_accent: "#007A99" - light_secondary: "#973542" - light_success: "#43A047" - light_info: "#1976D2" - light_warning: "#FF6D00" - light_error: "#EF5350" - dark_primary: "#E58325" - dark_accent: "#007A99" - dark_secondary: "#973542" - dark_success: "#43A047" - dark_info: "#1976D2" - dark_warning: "#FF6D00" - dark_error: "#EF5350" - -mealie_backend: - general: - allow_signup: true - default_group: Home - default_email: changeme@email.com - base_url: "" - token_time: 48 - security: - max_login_attempts: 5 - user_lockout_time: 24 - webworkers: - workers_per_core: 1 - max_workers: 1 - web_concurrency: 1 - smtp: - user: "" - password: "" - host: "" - port: 587 - from_name: Mealie - from_email: "" - # TLS | SSL | NONE - auth_strategy: TLS - ldap: - auth_enabled: false - server_url: "" - tls_insecure: false - tls_cacertfile: "" - bind_template: "" - base_dn: "" - admin_filter: "" - -envFrom: - - configMapRef: - name: '{{ include "tc.common.names.fullname" . }}-frontend-config' - -probes: - liveness: - type: HTTP - path: / - readiness: - type: HTTP - path: / - startup: - type: HTTP - path: / + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 service: main: ports: main: port: 10018 - protocol: HTTP + protocol: http targetPort: 3000 api: enabled: true type: ClusterIP + targetSelector: api ports: api: enabled: true - protocol: HTTP + protocol: http port: 10019 + targetSelector: api persistence: data: enabled: true - mountPath: /app/data + targetSelector: + main: + main: + mountPath: /app/data + readOnly: true + api: + api: + mountPath: /app/data -postgresql: - enabled: true - existingSecret: dbcreds - postgresqlUsername: mealie - postgresqlDatabase: mealie +cnpg: + main: + enabled: true + user: mealie + database: mealie portal: - enabled: true + open: + enabled: true