(feat) Dynamically set PGID, GID and GROUP_ID (#1091)
* base PGID on fsGroup * also remove PGID from questions.yaml * remove mistake * small fix * fix first test * fix linting * always set PUID to 568 * use quotes for env vars (obviously)
This commit is contained in:
@@ -15,4 +15,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 8.1.1
|
version: 8.2.0
|
||||||
|
|||||||
@@ -3,12 +3,7 @@ This template serves as the blueprint for the mountPermissions job that is run
|
|||||||
before chart installation.
|
before chart installation.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "common.controller.autopermissions" -}}
|
{{- define "common.controller.autopermissions" -}}
|
||||||
|
{{- $group := .Values.podSecurityContext.fsGroup -}}
|
||||||
{{- $group := 568 -}}
|
|
||||||
{{- if .Values.env -}}
|
|
||||||
{{- $group = dig "PGID" $group .Values.env -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- $group = dig "fsGroup" $group .Values.podSecurityContext -}}
|
|
||||||
{{- $hostPathMounts := dict -}}
|
{{- $hostPathMounts := dict -}}
|
||||||
{{- range $name, $mount := .Values.persistence -}}
|
{{- range $name, $mount := .Values.persistence -}}
|
||||||
{{- if and $mount.enabled $mount.setPermissions -}}
|
{{- if and $mount.enabled $mount.setPermissions -}}
|
||||||
|
|||||||
@@ -35,6 +35,12 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
- name: PGID
|
||||||
|
value: {{ .Values.podSecurityContext.fsGroup | quote }}
|
||||||
|
- name: GROUP_ID
|
||||||
|
value: {{ .Values.podSecurityContext.fsGroup | quote }}
|
||||||
|
- name: GID
|
||||||
|
value: {{ .Values.podSecurityContext.fsGroup | quote }}
|
||||||
{{- if or ( .Values.securityContext.readOnlyRootFilesystem ) ( .Values.securityContext.runAsNonRoot ) }}
|
{{- if or ( .Values.securityContext.readOnlyRootFilesystem ) ( .Values.securityContext.runAsNonRoot ) }}
|
||||||
- name: S6_READ_ONLY_ROOT
|
- name: S6_READ_ONLY_ROOT
|
||||||
value: "1"
|
value: "1"
|
||||||
|
|||||||
@@ -85,12 +85,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
# -- Used to set the base path for reverse proxies eg. /booksonic, /books, etc.
|
# -- Used to set the base path for reverse proxies eg. /booksonic, /books, etc.
|
||||||
CONTEXT_PATH: # "url-base"
|
CONTEXT_PATH: # "url-base"
|
||||||
# -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes.
|
# -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "568"
|
|
||||||
# -- Used to set the base path for reverse proxies eg. /booksonic, /books, etc.
|
# -- Used to set the base path for reverse proxies eg. /booksonic, /books, etc.
|
||||||
# CONTEXT_PATH=url-base
|
# CONTEXT_PATH=url-base
|
||||||
|
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ:
|
# TZ:
|
||||||
# PUID:
|
# PUID:
|
||||||
# PGID:
|
|
||||||
# UMASK:
|
# UMASK:
|
||||||
# DOCKER_MODS:
|
# DOCKER_MODS:
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
# -- Username for the calibre gui
|
# -- Username for the calibre gui
|
||||||
GUAC_USER:
|
GUAC_USER:
|
||||||
# -- Password's md5 hash for the calibre gui
|
# -- Password's md5 hash for the calibre gui
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ serviceList:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ image:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
##
|
##
|
||||||
# Most other defaults are set in questions.yaml
|
# Most other defaults are set in questions.yaml
|
||||||
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
||||||
|
|||||||
@@ -86,12 +86,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ podSecurityContext:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
PGID: "568"
|
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
VISION-FACE: "True"
|
VISION-FACE: "True"
|
||||||
VISION-DETECTION: "True"
|
VISION-DETECTION: "True"
|
||||||
|
|||||||
@@ -85,12 +85,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: 1001
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: 1001
|
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
# -- Configures service settings for the chart.
|
||||||
# @default -- See values.yaml
|
# @default -- See values.yaml
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1000"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1000"
|
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
# -- Configures service settings for the chart.
|
||||||
# @default -- See values.yaml
|
# @default -- See values.yaml
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ:
|
# TZ:
|
||||||
# PUID:
|
# PUID:
|
||||||
# PGID:
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ image:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
##
|
##
|
||||||
# Most other defaults are set in questions.yaml
|
# Most other defaults are set in questions.yaml
|
||||||
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
||||||
|
|||||||
@@ -85,12 +85,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ service:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
PGID: "568"
|
|
||||||
# General Settings
|
# General Settings
|
||||||
KEEP_APP_RUNNING: "0"
|
KEEP_APP_RUNNING: "0"
|
||||||
CLEAN_TMP_DIR: "1"
|
CLEAN_TMP_DIR: "1"
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ:
|
# TZ:
|
||||||
# PUID:
|
# PUID:
|
||||||
# PGID:
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
startup:
|
startup:
|
||||||
|
|||||||
@@ -100,12 +100,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
# -- Configures service settings for the chart.
|
||||||
# @default -- See values.yaml
|
# @default -- See values.yaml
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ probes:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ image:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Most other defaults are set in questions.yaml
|
# Most other defaults are set in questions.yaml
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ service:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
USER_ID: "{{ .Values.env.PUID }}"
|
USER_ID: "{{ .Values.env.PUID }}"
|
||||||
GROUP_ID: "{{ .Values.env.PGID }}"
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
PGID: "568"
|
|
||||||
# General Settings
|
# General Settings
|
||||||
KEEP_APP_RUNNING: "0"
|
KEEP_APP_RUNNING: "0"
|
||||||
CLEAN_TMP_DIR: "1"
|
CLEAN_TMP_DIR: "1"
|
||||||
|
|||||||
@@ -76,12 +76,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
# PASSWORD:
|
# PASSWORD:
|
||||||
# CUSTOM_RESULTS:
|
# CUSTOM_RESULTS:
|
||||||
# DB_TYPE:
|
# DB_TYPE:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# PHP_TZ: UTC
|
# PHP_TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1000"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1000"
|
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
# -- Configures service settings for the chart.
|
||||||
# @default -- See values.yaml
|
# @default -- See values.yaml
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -10,14 +10,11 @@ securityContext:
|
|||||||
|
|
||||||
podSecurityContext:
|
podSecurityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 20
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
# currently needed for working with /dev/ttyXYZ devices
|
|
||||||
# see: https://github.com/linuxserver/docker-oscam/issues/21
|
|
||||||
PGID: "20"
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
# -- Configures service settings for the chart.
|
||||||
# @default -- See values.yaml
|
# @default -- See values.yaml
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ securityContext:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
# UMASK: 022
|
# UMASK: 022
|
||||||
|
|
||||||
service:
|
service:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ env:
|
|||||||
# -- Set the container timezone
|
# -- Set the container timezone
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
# -- Specify the user ID the application will run as
|
# -- Specify the user ID the application will run as
|
||||||
PUID: "1001"
|
PUID: 568
|
||||||
# -- Specify the group ID the application will run as
|
|
||||||
PGID: "1001"
|
|
||||||
# -- Sets default UMASK
|
# -- Sets default UMASK
|
||||||
UMASK: # 022
|
UMASK: # 022
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
# TRANSMISSION_ALT_SPEED_DOWN: 50
|
# TRANSMISSION_ALT_SPEED_DOWN: 50
|
||||||
# TRANSMISSION_ALT_SPEED_ENABLED: false
|
# TRANSMISSION_ALT_SPEED_ENABLED: false
|
||||||
# TRANSMISSION_ALT_SPEED_TIME_BEGIN: 540
|
# TRANSMISSION_ALT_SPEED_TIME_BEGIN: 540
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ service:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ podSecurityContext:
|
|||||||
# See https://github.com/linuxserver/docker-tvheadend#parameters
|
# See https://github.com/linuxserver/docker-tvheadend#parameters
|
||||||
env: {}
|
env: {}
|
||||||
# PUID: 1000
|
# PUID: 1000
|
||||||
# PGID: 1000
|
|
||||||
# TZ: Europe/London
|
# TZ: Europe/London
|
||||||
# RUN_OPTS: <run options here>
|
# RUN_OPTS: <run options here>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ image:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
UNIFI_GID: "{{ .Values.env.PUID }}"
|
UNIFI_GID: "{{ .Values.env.PUID }}"
|
||||||
UNIFI_UID: "{{ .Values.env.PGID }}"
|
UNIFI_UID: "{{ .Values.podSecurityContext.fsGroup }}"
|
||||||
##
|
##
|
||||||
# Most other defaults are set in questions.yaml
|
# Most other defaults are set in questions.yaml
|
||||||
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
||||||
|
|||||||
@@ -84,12 +84,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
- variable: PGID
|
|
||||||
label: "PGID"
|
|
||||||
description: "Sets the PGID env var for LinuxServer.io (compatible) containers"
|
|
||||||
schema:
|
|
||||||
type: int
|
|
||||||
default: 568
|
|
||||||
- variable: UMASK
|
- variable: UMASK
|
||||||
label: "UMASK"
|
label: "UMASK"
|
||||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ image:
|
|||||||
envTpl:
|
envTpl:
|
||||||
# Permissions Settings
|
# Permissions Settings
|
||||||
UNIFI_GID: "{{ .Values.env.PUID }}"
|
UNIFI_GID: "{{ .Values.env.PUID }}"
|
||||||
UNIFI_UID: "{{ .Values.env.PGID }}"
|
UNIFI_UID: "{{ .Values.podSecurityContext.fsGroup }}"
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
@@ -64,8 +64,8 @@ podSecurityContext:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# TZ:
|
# TZ:
|
||||||
PUID: "568"
|
PUID: 568
|
||||||
PGID: "568"
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ portal:
|
|||||||
env: {}
|
env: {}
|
||||||
# TZ: UTC
|
# TZ: UTC
|
||||||
# PUID: 1001
|
# PUID: 1001
|
||||||
# PGID: 1001
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
|
|||||||
@@ -283,37 +283,6 @@ class Test < ChartTest
|
|||||||
initContainer = deployment["spec"]["template"]["spec"]["initContainers"][0]
|
initContainer = deployment["spec"]["template"]["spec"]["initContainers"][0]
|
||||||
assert_equal(results[:command], initContainer["command"])
|
assert_equal(results[:command], initContainer["command"])
|
||||||
end
|
end
|
||||||
it 'outputs PUID AND PGID permissions for multiple volumes when both are set' do
|
|
||||||
results= {
|
|
||||||
command: ["/bin/sh", "-c", "echo 'Automatically correcting permissions...';chown -R :568 '/configlist'; chmod -R g+w '/configlist';chown -R :568 '/data'; chmod -R g+w '/data';"]
|
|
||||||
}
|
|
||||||
values = {
|
|
||||||
env: {
|
|
||||||
PGID: 666,
|
|
||||||
PUID: 999
|
|
||||||
},
|
|
||||||
persistenceList: [
|
|
||||||
{
|
|
||||||
name: "data",
|
|
||||||
enabled: true,
|
|
||||||
setPermissions: true,
|
|
||||||
mountPath: "/data",
|
|
||||||
hostPath: "/tmp1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "configlist",
|
|
||||||
enabled: true,
|
|
||||||
setPermissions: true,
|
|
||||||
mountPath: "/configlist",
|
|
||||||
hostPath: "/tmp2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
chart.value values
|
|
||||||
deployment = chart.resources(kind: "Deployment").first
|
|
||||||
initContainer = deployment["spec"]["template"]["spec"]["initContainers"][0]
|
|
||||||
assert_equal(results[:command], initContainer["command"])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_nil(mainContainer["env"])
|
assert_nil(mainContainer["env"][4])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set static "k/v pair style" environment variables' do
|
it 'set static "k/v pair style" environment variables' do
|
||||||
@@ -101,14 +101,14 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal(values[:env].values[0].to_s, mainContainer["env"][1]["value"])
|
assert_equal(values[:env].values[0].to_s, mainContainer["env"][4]["value"])
|
||||||
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][2]["name"])
|
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][5]["name"])
|
||||||
assert_equal(values[:env].values[1].to_s, mainContainer["env"][2]["value"])
|
assert_equal(values[:env].values[1].to_s, mainContainer["env"][5]["value"])
|
||||||
assert_equal(values[:env].keys[2].to_s, mainContainer["env"][3]["name"])
|
assert_equal(values[:env].keys[2].to_s, mainContainer["env"][6]["name"])
|
||||||
assert_equal(values[:env].values[2].to_s, mainContainer["env"][3]["value"])
|
assert_equal(values[:env].values[2].to_s, mainContainer["env"][6]["value"])
|
||||||
assert_equal(values[:env].keys[3].to_s, mainContainer["env"][4]["name"])
|
assert_equal(values[:env].keys[3].to_s, mainContainer["env"][7]["name"])
|
||||||
assert_equal(values[:env].values[3].to_s, mainContainer["env"][4]["value"])
|
assert_equal(values[:env].values[3].to_s, mainContainer["env"][7]["value"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set list of static "kubernetes style" environment variables' do
|
it 'set list of static "kubernetes style" environment variables' do
|
||||||
@@ -124,8 +124,8 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:envList][0][:name].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:envList][0][:name].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal(values[:envList][0][:value].to_s, mainContainer["env"][1]["value"])
|
assert_equal(values[:envList][0][:value].to_s, mainContainer["env"][4]["value"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set both static "k/v pair style" and static "k/valueFrom style" environment variables' do
|
it 'set both static "k/v pair style" and static "k/valueFrom style" environment variables' do
|
||||||
@@ -145,10 +145,10 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal(values[:env].values[0].to_s, mainContainer["env"][1]["value"])
|
assert_equal(values[:env].values[0].to_s, mainContainer["env"][4]["value"])
|
||||||
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][2]["name"])
|
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][5]["name"])
|
||||||
assert_equal(values[:env].values[1][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][2]["valueFrom"]["fieldRef"]["fieldPath"])
|
assert_equal(values[:env].values[1][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][5]["valueFrom"]["fieldRef"]["fieldPath"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set static "k/explicitValueFrom pair style" environment variables' do
|
it 'set static "k/explicitValueFrom pair style" environment variables' do
|
||||||
@@ -167,8 +167,8 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal(values[:env].values[0][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][1]["valueFrom"]["fieldRef"]["fieldPath"])
|
assert_equal(values[:env].values[0][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][4]["valueFrom"]["fieldRef"]["fieldPath"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set static "k/implicitValueFrom pair style" environment variables' do
|
it 'set static "k/implicitValueFrom pair style" environment variables' do
|
||||||
@@ -185,8 +185,8 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal(values[:env].values[0][:fieldRef][:fieldPath], mainContainer["env"][1]["valueFrom"]["fieldRef"]["fieldPath"])
|
assert_equal(values[:env].values[0][:fieldRef][:fieldPath], mainContainer["env"][4]["valueFrom"]["fieldRef"]["fieldPath"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set both static "k/v pair style" and templated "k/v pair style" environment variables' do
|
it 'set both static "k/v pair style" and templated "k/v pair style" environment variables' do
|
||||||
@@ -200,10 +200,10 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal("common-test-admin", mainContainer["env"][1]["value"])
|
assert_equal("common-test-admin", mainContainer["env"][4]["value"])
|
||||||
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][2]["name"])
|
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][5]["name"])
|
||||||
assert_equal(values[:env].values[1].to_s, mainContainer["env"][2]["value"])
|
assert_equal(values[:env].values[1].to_s, mainContainer["env"][5]["value"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set templated "k/v pair style" environment variables' do
|
it 'set templated "k/v pair style" environment variables' do
|
||||||
@@ -216,8 +216,8 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal("common-test-admin", mainContainer["env"][1]["value"])
|
assert_equal("common-test-admin", mainContainer["env"][4]["value"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set static "k/v pair style", templated "k/v pair style", static "k/explicitValueFrom pair style", and static "k/implicitValueFrom pair style" environment variables' do
|
it 'set static "k/v pair style", templated "k/v pair style", static "k/explicitValueFrom pair style", and static "k/implicitValueFrom pair style" environment variables' do
|
||||||
@@ -243,14 +243,14 @@ class Test < ChartTest
|
|||||||
deployment = chart.resources(kind: "Deployment").first
|
deployment = chart.resources(kind: "Deployment").first
|
||||||
containers = deployment["spec"]["template"]["spec"]["containers"]
|
containers = deployment["spec"]["template"]["spec"]["containers"]
|
||||||
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
mainContainer = containers.find{ |c| c["name"] == "common-test" }
|
||||||
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][1]["name"])
|
assert_equal(values[:env].keys[0].to_s, mainContainer["env"][4]["name"])
|
||||||
assert_equal("common-test-admin", mainContainer["env"][1]["value"])
|
assert_equal("common-test-admin", mainContainer["env"][4]["value"])
|
||||||
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][2]["name"])
|
assert_equal(values[:env].keys[1].to_s, mainContainer["env"][5]["name"])
|
||||||
assert_equal(values[:env].values[1].to_s, mainContainer["env"][2]["value"])
|
assert_equal(values[:env].values[1].to_s, mainContainer["env"][5]["value"])
|
||||||
assert_equal(values[:env].keys[2].to_s, mainContainer["env"][3]["name"])
|
assert_equal(values[:env].keys[2].to_s, mainContainer["env"][6]["name"])
|
||||||
assert_equal(values[:env].values[2][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][3]["valueFrom"]["fieldRef"]["fieldPath"])
|
assert_equal(values[:env].values[2][:valueFrom][:fieldRef][:fieldPath], mainContainer["env"][6]["valueFrom"]["fieldRef"]["fieldPath"])
|
||||||
assert_equal(values[:env].keys[3].to_s, mainContainer["env"][4]["name"])
|
assert_equal(values[:env].keys[3].to_s, mainContainer["env"][7]["name"])
|
||||||
assert_equal(values[:env].values[3][:fieldRef][:fieldPath], mainContainer["env"][4]["valueFrom"]["fieldRef"]["fieldPath"])
|
assert_equal(values[:env].values[3][:fieldRef][:fieldPath], mainContainer["env"][7]["valueFrom"]["fieldRef"]["fieldPath"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'set "static" secret variables' do
|
it 'set "static" secret variables' do
|
||||||
|
|||||||
Reference in New Issue
Block a user