From f487b5ff5cedd805d9a1a5a541016d7fe1b6c573 Mon Sep 17 00:00:00 2001 From: Keny Villela Date: Mon, 12 Sep 2022 15:24:02 -0300 Subject: [PATCH 1/4] SIGI helm v0.1.3 test --- charts/sigi/v0/Chart.yaml | 2 +- charts/sigi/v0/questions.yaml | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/charts/sigi/v0/Chart.yaml b/charts/sigi/v0/Chart.yaml index 69e5704..df711fc 100644 --- a/charts/sigi/v0/Chart.yaml +++ b/charts/sigi/v0/Chart.yaml @@ -8,7 +8,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sigi/v0/questions.yaml b/charts/sigi/v0/questions.yaml index 42e8eec..04ba651 100644 --- a/charts/sigi/v0/questions.yaml +++ b/charts/sigi/v0/questions.yaml @@ -13,7 +13,23 @@ questions: type: string group: Básico required: true - + +# Informações Autenticação +- variable: sigi.auth.ldap.userAttrMap + default: {"first_name": "givenName", "last_name": "sn", "email": "userPrincipalName", 'is_staff': "cn",} + description: "Mapa atributos usuário LDAP" + label: Mapa atributos usuário LDAP" + type: string + group: Autenticação + required: true +- variable: sigi.auth.ldap.profileAttrMap + default: {"nome_completo": "cn"} + description: "Mapa de atributos profile LDAP" + label: Mapa atributos profile LDAP" + type: string + group: Autenticação + required: true + # Ingress - variable: ingress.tls.enabled From 2a8e465e30171831cb9c8164ef13063852c28039 Mon Sep 17 00:00:00 2001 From: Keny Villela Date: Mon, 12 Sep 2022 19:36:01 -0300 Subject: [PATCH 2/4] SIGI helm v0.1.4 test --- charts/sigi/v0/Chart.yaml | 2 +- charts/sigi/v0/questions.yaml | 16 ---------------- charts/sigi/v0/templates/deployment.yaml | 10 ++++++++-- charts/sigi/v0/values.yaml | 4 ---- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/charts/sigi/v0/Chart.yaml b/charts/sigi/v0/Chart.yaml index df711fc..ac02ab4 100644 --- a/charts/sigi/v0/Chart.yaml +++ b/charts/sigi/v0/Chart.yaml @@ -8,7 +8,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.3 +version: 0.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sigi/v0/questions.yaml b/charts/sigi/v0/questions.yaml index 04ba651..500ca2b 100644 --- a/charts/sigi/v0/questions.yaml +++ b/charts/sigi/v0/questions.yaml @@ -14,22 +14,6 @@ questions: group: Básico required: true -# Informações Autenticação -- variable: sigi.auth.ldap.userAttrMap - default: {"first_name": "givenName", "last_name": "sn", "email": "userPrincipalName", 'is_staff': "cn",} - description: "Mapa atributos usuário LDAP" - label: Mapa atributos usuário LDAP" - type: string - group: Autenticação - required: true -- variable: sigi.auth.ldap.profileAttrMap - default: {"nome_completo": "cn"} - description: "Mapa de atributos profile LDAP" - label: Mapa atributos profile LDAP" - type: string - group: Autenticação - required: true - # Ingress - variable: ingress.tls.enabled diff --git a/charts/sigi/v0/templates/deployment.yaml b/charts/sigi/v0/templates/deployment.yaml index b4e0f1b..39c703e 100644 --- a/charts/sigi/v0/templates/deployment.yaml +++ b/charts/sigi/v0/templates/deployment.yaml @@ -68,9 +68,15 @@ spec: - name: AUTH_LDAP_GROUP_TYPE_STRING value: "{{ .Values.sigi.auth.ldap.groupTypeString }}" - name: AUTH_LDAP_USER_ATTR_MAP - value: "{{ .Values.sigi.auth.ldap.userAttrMap }}" + valueFrom: + configMapKeyRef: + name: auth-ldap + key: AUTH_LDAP_USER_ATTR_MAP - name: AUTH_LDAP_PROFILE_ATTR_MAP - value: "{{ .Values.sigi.auth.ldap.profileAttrMap }}" + valueFrom: + configMapKeyRef: + name: auth-ldap + key: AUTH_LDAP_PROFILE_ATTR_MAP - name: AUTH_LDAP_FIND_GROUP_PERMS value: "{{ .Values.sigi.auth.ldap.findGroupPerms }}" - name: AUTH_LDAP_MIRROR_GROUPS diff --git a/charts/sigi/v0/values.yaml b/charts/sigi/v0/values.yaml index ce760fb..c876025 100644 --- a/charts/sigi/v0/values.yaml +++ b/charts/sigi/v0/values.yaml @@ -65,10 +65,6 @@ sigi: group: 'OU=GruposAutomaticosOU,DC=senado,DC=gov,DC=br' groupSearchString: '(objectClass=Group)' groupTypeString: 'cn' -# userAttrMap: {"first_name": "givenName", "last_name": "sn", "email": "userPrincipalName", 'is_staff': "cn",} - userAttrMap: '' -# profileAttrMap: {"nome_completo": "cn"} - profileAttrMap: '' findGroupPerms: True mirrorGroups: True cacheGroups: True From 543773eb5764122e85c1b27a7877c15d5a7fa849 Mon Sep 17 00:00:00 2001 From: Keny Villela Date: Tue, 13 Sep 2022 11:07:28 -0300 Subject: [PATCH 3/4] SIGI helm v0.1.5 --- charts/sigi/v0/Chart.yaml | 2 +- charts/sigi/v0/templates/deployment.yaml | 84 ++++++++++++++++++------ 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/charts/sigi/v0/Chart.yaml b/charts/sigi/v0/Chart.yaml index ac02ab4..f9e026b 100644 --- a/charts/sigi/v0/Chart.yaml +++ b/charts/sigi/v0/Chart.yaml @@ -8,7 +8,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.4 +version: 0.1.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sigi/v0/templates/deployment.yaml b/charts/sigi/v0/templates/deployment.yaml index 39c703e..3b2f17b 100644 --- a/charts/sigi/v0/templates/deployment.yaml +++ b/charts/sigi/v0/templates/deployment.yaml @@ -46,47 +46,93 @@ spec: - name: DATABASE_URL value: {{ printf "postgresql://%s:%s@%s:5432/%s" .Values.postgresql.auth.username .Values.postgresql.auth.password (include "postgresql.fullname" .) .Values.postgresql.auth.database| quote }} - name: EMAIL_PORT - value: "{{ .Values.sigi.emailPort }}" + configMapKeyRef: + name: sigi-email + key: EMAIL_PORT - name: EMAIL_HOST - value: "{{ .Values.sigi.emailHost }}" + configMapKeyRef: + name: sigi-email + key: EMAIL_HOST - name: DEFAULT_FROM_EMAIL - value: "{{ .Values.sigi.defaultFromEmail }}" + configMapKeyRef: + name: sigi-email + key: DEFAULT_FROM_EMAIL - name: AUTH_LDAP_SERVER_URI - value: "{{ .Values.sigi.auth.ldap.serverURI }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_SERVER_URI - name: AUTH_LDAP_BIND_DN - value: "{{ .Values.sigi.auth.ldap.bindDN }}" - - name: AUTH_LDAP_BIND_PASSWORD - value: "{{ .Values.sigi.auth.ldap.bindPwd }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_BIND_DN - name: AUTH_LDAP_USER - value: "{{ .Values.sigi.auth.ldap.user }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_USER - name: AUTH_LDAP_USER_SEARCH_STRING - value: "{{ .Values.sigi.auth.ldap.userSearchString }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_USER_SEARCH_STRING - name: AUTH_LDAP_GROUP - value: "{{ .Values.sigi.auth.ldap.group }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_GROUP - name: AUTH_LDAP_GROUP_SEARCH_STRING - value: "{{ .Values.sigi.auth.ldap.groupSearchString }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_GROUP_SEARCH_STRING - name: AUTH_LDAP_GROUP_TYPE_STRING - value: "{{ .Values.sigi.auth.ldap.groupTypeString }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_GROUP_TYPE_STRING - name: AUTH_LDAP_USER_ATTR_MAP valueFrom: configMapKeyRef: - name: auth-ldap + name: sigi-auth-ldap key: AUTH_LDAP_USER_ATTR_MAP - name: AUTH_LDAP_PROFILE_ATTR_MAP valueFrom: configMapKeyRef: - name: auth-ldap + name: sigi-auth-ldap key: AUTH_LDAP_PROFILE_ATTR_MAP - name: AUTH_LDAP_FIND_GROUP_PERMS - value: "{{ .Values.sigi.auth.ldap.findGroupPerms }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_FIND_GROUP_PERMS - name: AUTH_LDAP_MIRROR_GROUPS - value: "{{ .Values.sigi.auth.ldap.mirrorGroups }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_MIRROR_GROUPS - name: AUTH_LDAP_CACHE_GROUPS - value: "{{ .Values.sigi.auth.ldap.cacheGroups }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_CACHE_GROUPS - name: AUTH_LDAP_GROUP_CACHE_TIMEOUT - value: "{{ .Values.sigi.auth.ldap.groupCacheTimeout }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_LDAP_GROUP_CACHE_TIMEOUT - name: AUTH_PROFILE_MODULE - value: "{{ .Values.sigi.auth.profileModule }}" + valueFrom: + configMapKeyRef: + name: sigi-auth-ldap + key: AUTH_PROFILE_MODULE + - name: AUTH_LDAP_BIND_PASSWORD + valueFrom: + # Secret Key + secretKeyRef: + name: sigi-auth-ldap-key + key: AUTH_LDAP_BIND_PASSWORD volumeMounts: # - mountPath: /var/interlegis/sigi/data # name: data From 9752d27816546b8c9397fedb93556d0d860b9645 Mon Sep 17 00:00:00 2001 From: Keny Villela Date: Tue, 13 Sep 2022 11:13:30 -0300 Subject: [PATCH 4/4] SIGI helm v0.1.5 minor corretion --- charts/sigi/v0/templates/deployment.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/sigi/v0/templates/deployment.yaml b/charts/sigi/v0/templates/deployment.yaml index 3b2f17b..b19e329 100644 --- a/charts/sigi/v0/templates/deployment.yaml +++ b/charts/sigi/v0/templates/deployment.yaml @@ -46,14 +46,17 @@ spec: - name: DATABASE_URL value: {{ printf "postgresql://%s:%s@%s:5432/%s" .Values.postgresql.auth.username .Values.postgresql.auth.password (include "postgresql.fullname" .) .Values.postgresql.auth.database| quote }} - name: EMAIL_PORT + valueFrom: configMapKeyRef: name: sigi-email key: EMAIL_PORT - name: EMAIL_HOST + valueFrom: configMapKeyRef: name: sigi-email key: EMAIL_HOST - name: DEFAULT_FROM_EMAIL + valueFrom: configMapKeyRef: name: sigi-email key: DEFAULT_FROM_EMAIL