diff --git a/charts/stable/guacamole-client/Chart.yaml b/charts/stable/guacamole-client/Chart.yaml index a89f449029f..768ee58a356 100644 --- a/charts/stable/guacamole-client/Chart.yaml +++ b/charts/stable/guacamole-client/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://hub.docker.com/r/guacamole/guacamole - http://guacamole.incubator.apache.org/doc/gug/introduction.html type: application -version: 4.0.26 +version: 4.0.27 annotations: truecharts.org/catagories: | - utilities diff --git a/charts/stable/guacamole-client/questions.yaml b/charts/stable/guacamole-client/questions.yaml index a16461122e2..baf5c416dce 100644 --- a/charts/stable/guacamole-client/questions.yaml +++ b/charts/stable/guacamole-client/questions.yaml @@ -98,7 +98,6 @@ questions: required: true default: 4822 -# Include{containerConfig} - variable: general group: "App Configuration" label: "General Configuration" @@ -720,7 +719,41 @@ questions: schema: type: string default: "" - + - variable: proxy + group: "App Configuration" + label: "Proxy Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: REMOTE_IP_VALVE_ENABLED + label: "Enable Proxy" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: PROXY_BY_HEADER + label: "Proxy by Header (Leave empty for default)" + schema: + type: string + default: "" + - variable: PROXY_PROTOCOL_HEADER + label: "Proxy Protocol Header (Leave empty for default)" + schema: + type: string + default: "" + - variable: PROXY_IP_HEADER + label: "Proxy IP Header (Leave empty for default)" + schema: + type: string + default: "" + - variable: PROXY_ALLOWED_IPS_REGEX + label: "Proxy Allowed IP Regex (Leave empty for default)" + schema: + type: string + default: "" +# Include{containerConfig} - variable: service group: "Networking and Services" label: "Configure Service(s)" diff --git a/charts/stable/guacamole-client/templates/_configmap.tpl b/charts/stable/guacamole-client/templates/_configmap.tpl index 6806fcc90ad..e877c003822 100644 --- a/charts/stable/guacamole-client/templates/_configmap.tpl +++ b/charts/stable/guacamole-client/templates/_configmap.tpl @@ -220,4 +220,23 @@ data: SAML_GROUP_ATTRIBUTE: {{ .Values.saml.SAML_GROUP_ATTRIBUTE | quote }} {{- end }} {{- end }} + {{/* PROXY */}} + {{- if .Values.proxy.REMOTE_IP_VALVE_ENABLED }} + REMOTE_IP_VALVE_ENABLED: {{ .Values.proxy.REMOTE_IP_VALVE_ENABLED | quote }} + {{- if .Values.proxy.PROXY_BY_HEADER }} + PROXY_BY_HEADER: {{ .Values.proxy.PROXY_BY_HEADER | quote }} + {{- end }} + {{- if .Values.proxy.PROXY_PROTOCOL_HEADER }} + PROXY_PROTOCOL_HEADER: {{ .Values.proxy.PROXY_PROTOCOL_HEADER | quote }} + {{- end }} + {{- if .Values.proxy.PROXY_PROTOCOL_HEADER }} + PROXY_PROTOCOL_HEADER: {{ .Values.proxy.PROXY_PROTOCOL_HEADER | quote }} + {{- end }} + {{- if .Values.proxy.PROXY_IP_HEADER }} + PROXY_IP_HEADER: {{ .Values.proxy.PROXY_IP_HEADER | quote }} + {{- end }} + {{- if .Values.proxy.PROXY_ALLOWED_IPS_REGEX }} + PROXY_ALLOWED_IPS_REGEX: {{ .Values.proxy.PROXY_ALLOWED_IPS_REGEX | quote }} + {{- end }} + {{- end }} {{- end -}} diff --git a/charts/stable/guacamole-client/values.yaml b/charts/stable/guacamole-client/values.yaml index 20aeddeb116..a33f1ae315f 100644 --- a/charts/stable/guacamole-client/values.yaml +++ b/charts/stable/guacamole-client/values.yaml @@ -18,11 +18,10 @@ service: targetPort: 8080 env: + # Will probably be removed on 1.5.0 (https://github.com/apache/guacamole-client/pull/717) POSTGRES_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}" POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}" POSTGRES_PORT: 5432 - GUACD_HOSTNAME: "localhost" - GUACD_PORT: 4822 POSTGRES_HOSTNAME: secretKeyRef: name: dbcreds @@ -31,6 +30,20 @@ env: secretKeyRef: name: dbcreds key: postgresql-password + # New format + POSTGRESQL_PASSWORD: + secretKeyRef: + name: dbcreds + key: postgresql-password + POSTGRESQL_HOSTNAME: + secretKeyRef: + name: dbcreds + key: plainhost + POSTGRESQL_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}" + POSTGRESQL_USER: "{{ .Values.postgresql.postgresqlUsername }}" + POSTGRESQL_PORT: 5432 + GUACD_HOSTNAME: "localhost" + GUACD_PORT: 4822 envFrom: - configMapRef: @@ -140,6 +153,14 @@ saml: # SAML_COMPRESS_RESPONSE: # SAML_GROUP_ATTRIBUTE: +proxy: + {} + # REMOTE_IP_VALVE_ENABLED: false + # PROXY_BY_HEADER: "" + # PROXY_PROTOCOL_HEADER: "" + # PROXY_IP_HEADER: "" + # PROXY_ALLOWED_IPS_REGEX: "" + postgresql: enabled: true existingSecret: "dbcreds" @@ -188,13 +209,13 @@ initContainers: 2-initdb: image: "{{ .Values.multiinitImage.repository }}:{{ .Values.multiinitImage.tag }}" env: - - name: POSTGRES_DATABASE + - name: POSTGRESQL_DATABASE value: "{{ .Values.postgresql.postgresqlDatabase }}" - - name: POSTGRES_USER + - name: POSTGRESQL_USER value: "{{ .Values.postgresql.postgresqlUsername }}" - - name: POSTGRES_PORT + - name: POSTGRESQL_PORT value: "5432" - - name: POSTGRES_HOSTNAME + - name: POSTGRESQL_HOSTNAME valueFrom: secretKeyRef: name: dbcreds @@ -210,12 +231,12 @@ initContainers: command: ["/bin/sh", "-c"] args: - |- - psql -h "$POSTGRES_HOSTNAME" -d "$POSTGRES_DATABASE" -U "$POSTGRES_USER" -p "$POSTGRES_PORT" -o '/dev/null' -c 'SELECT * FROM public.guacamole_user' + psql -h "$POSTGRESQL_HOSTNAME" -d "$POSTGRESQL_DATABASE" -U "$POSTGRESQL_USER" -p "$POSTGRESQL_PORT" -o '/dev/null' -c 'SELECT * FROM public.guacamole_user' if [ $? -eq 0 ]; then echo "DB already initialized. Skipping..." else echo "Initializing DB's schema..." - psql -h "$POSTGRES_HOSTNAME" -d "$POSTGRES_DATABASE" -U "$POSTGRES_USER" -p "$POSTGRES_PORT" -a -w -f /initdbdata/initdb.sql + psql -h "$POSTGRESQL_HOSTNAME" -d "$POSTGRESQL_DATABASE" -U "$POSTGRESQL_USER" -p "$POSTGRESQL_PORT" -a -w -f /initdbdata/initdb.sql if [ $? -eq 0 ]; then echo "DB's schema initialized successfully!" exit 0