Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop mosip 15265 #232

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4490d8b
[MOSIP-15265] Added changes for postgres and config-server
pramod444 Sep 23, 2022
ca41464
[MOSIP-15265] updated _overides.tpl for config-server file and values…
pramod444 Sep 30, 2022
9f22bcf
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Sep 30, 2022
37c9965
[MOSIP-15265] updated idp service details to postgres-init and config…
pramod444 Sep 30, 2022
135c33c
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 5, 2022
c3ed3cd
[MOSIP-15265] Updated postgres-init and config-server helm-charts and…
pramod444 Oct 11, 2022
c80bc03
[MOSIP-15265] Updated README.md file for db-password-gen.
pramod444 Oct 12, 2022
08dd9e4
[MOSIP-15265] Updated config-server helm-chart.
pramod444 Oct 12, 2022
68ee6df
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 12, 2022
6d9d8bb
[MOSIP-15265] updated postgres-init values.yaml.
pramod444 Oct 13, 2022
9fc4a06
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 13, 2022
4f581fc
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 19, 2022
2b24883
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 20, 2022
4992e41
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 27, 2022
91f52cd
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Oct 31, 2022
54ec184
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Nov 11, 2022
0eaee7e
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Dec 19, 2022
3c49a0f
Merge branch 'develop' of https://github.com/mosip/mosip-helm into de…
pramod444 Jan 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/config-server/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.13.0
digest: sha256:e83af41b39942278f8389623671732e624f28c6f1ad6ac2d937e210c5f354a18
generated: "2022-03-26T11:47:19.149601+05:30"
version: 1.17.1
digest: sha256:dacc73770a5640c011e067ff8840ddf89631fc19016c8d0a9e5ea160e7da8690
generated: "2022-09-22T17:43:44.902956972+05:30"
110 changes: 103 additions & 7 deletions charts/config-server/templates/_overides.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,113 @@ All env variables that are accessed from mosip config properties
name: {{ .Values.overrides.configmaps.global }}
key: mosip-compliance-host

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_IDP_HOST
- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_MASTER_PASSWORD
valueFrom:
configMapKeyRef:
name: {{ .Values.overrides.configmaps.global }}
key: mosip-idp-host
secretKeyRef:
name: db-mosip-master-secret
key: db-mosip-master-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_AUDIT_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-audit-secret
key: db-mosip-audit-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_KEYMGR_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-keymgr-secret
key: db-mosip-keymgr-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_KERNEL_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-kernel-secret
key: db-mosip-kernel-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_IDMAP_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-idmap-secret
key: db-mosip-idmap-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_PREREG_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-prereg-secret
key: db-mosip-prereg-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_IDREPO_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-idrepo-secret
key: db-mosip-idrepo-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_IDA_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-ida-secret
key: db-mosip-ida-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_CREDENTIAL_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-credential-secret
key: db-mosip-credential-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_REGPRC_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-regprc-secret
key: db-mosip-regprc-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_REGDEVICE_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-regdevice-secret
key: db-mosip-regdevice-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_AUTHDEVICE_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-authdevice-secret
key: db-mosip-authdevice-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_PMS_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-pms-secret
key: db-mosip-pms-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_HOTLIST_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-hotlist-secret
key: db-mosip-hotlist-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_RESIDENT_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-resident-secret
key: db-mosip-resident-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_TOOLKIT_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-toolkit-secret
key: db-mosip-toolkit-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_DIGITALCARD_PASSWORD
valueFrom:
secretKeyRef:
name: db-mosip-digitalcard-secret
key: db-mosip-digitalcard-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_DBUSER_PASSWORD
- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_DB_MOSIP_IDP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.overrides.secrets.db }}
key: db-dbuser-password
name: db-mosip-idp-secret
key: db-mosip-idp-password

- name: SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_KEYCLOAK_INTERNAL_URL
valueFrom:
Expand Down
19 changes: 18 additions & 1 deletion charts/config-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,24 @@ installedModules:
## Refer to instructions to install config-server helm chart in mosip-infra repo.
overrides:
secrets:
db: db-common-secrets
dbMosipAuditSecret: db-mosip-audit-secret
dbMosipAuthdeviceSecret: db-mosip-authdevice-secret
dbMosipCredentialSecret: db-mosip-credential-secret
dbMosipDigitalcardSecret: db-mosip-digitalcard-secret
dbMosipHotlistSecret: db-mosip-hotlist-secret
dbMosipIdaSecret: db-mosip-ida-secret
dbMosipIdmapSecret: db-mosip-idmap-secret
dbMosipIdpSecret: db-mosip-idp-secret
dbMosipIdrepoSecret: db-mosip-idrepo-secret
dbMosipKernelSecret: db-mosip-kernel-secret
dbMosipKeymgrSecret: db-mosip-keymgr-secret
dbMosipMasterSecret: db-mosip-master-secret
dbMosipPmsSecret: db-mosip-pms-secret
dbMosipPreregSecret: db-mosip-prereg-secret
dbMosipRegdeviceSecret: db-mosip-regdevice-secret
dbMosipRegprcSecret: db-mosip-regprc-secret
dbMosipResidentSecret: db-mosip-resident-secret
dbMosipToolkitSecret: db-mosip-toolkit-secret
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section can be removed. Since this is not being used by the helm chart anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sure, will remove the same.

keycloak: keycloak
keycloakClients: keycloak-client-secrets
softhsmKernel: softhsm-kernel
Expand Down
1 change: 1 addition & 0 deletions charts/db-password-gen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/
23 changes: 23 additions & 0 deletions charts/db-password-gen/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
20 changes: 20 additions & 0 deletions charts/db-password-gen/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
name: db-password-gen
description: A Helm chart for Kubernetes to generate passwords for postgres DBs.
type: application
version: 12.0.2
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x

home: https://mosip.io
keywords:
- postgres
- db-password-gen
- database
maintainers:
- email: [email protected]
name: MOSIP
14 changes: 14 additions & 0 deletions charts/db-password-gen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# db-password-gen

* Make sure Postgre server(s) are running
* Update all database parameters in `values.yaml`
* Add mosip helm repo
```
* Update helm dependencies using:
```
$ helm dependency update
```
* Run the helm chart
```
$ helm -n postgres install db-password-gen db-password-gen
```
29 changes: 29 additions & 0 deletions charts/db-password-gen/templates/db-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.databases }}
{{- range $key, $value := .Values.databases }}
{{- $key := $key | replace "_" "-" }}
---
apiVersion: v1
kind: Secret
metadata:
name: db-{{ $key }}-secret
namespace: {{ $.Release.Namespace }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: db-password-gen
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if $value.enabled }}
{{- if and $value.dbuser $value.dbuser.password }}
db-{{$key}}-password: {{ $value.dbuser.password | b64enc | quote}}
{{- else }}
db-{{$key}}-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
{{- end }}

{{- end }}
{{- end }}
91 changes: 91 additions & 0 deletions charts/db-password-gen/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
databases:
mosip_master:
enabled: true
dbuser:
password: ""

mosip_audit:
enabled: true
dbuser:
password: ""


mosip_keymgr:
enabled: true
dbuser:
password: ""

mosip_kernel:
enabled: true
dbuser:
password: ""

mosip_idmap:
enabled: true
dbuser:
password: ""

mosip_prereg:
enabled: true
dbuser:
password: ""

mosip_idrepo:
enabled: true
dbuser:
password: ""

mosip_ida:
enabled: true
dbuser:
password: ""

mosip_credential:
enabled: true
dbuser:
password: ""

mosip_regprc:
enabled: true
dbuser:
password: ""

mosip_regdevice:
enabled: true
dbuser:
password: ""

mosip_authdevice:
enabled: true
dbuser:
password: ""

mosip_pms:
enabled: true
dbuser:
password: ""

mosip_hotlist:
enabled: true
dbuser:
password: ""

mosip_resident:
enabled: true
dbuser:
password: ""

mosip_toolkit:
enabled: true
dbuser:
password: ""

mosip_digitalcard:
enabled: true
dbuser:
password: ""

mosip_idp:
enabled: true
dbuser:
password: ""
6 changes: 3 additions & 3 deletions charts/masterdata-loader/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.13.0
digest: sha256:e83af41b39942278f8389623671732e624f28c6f1ad6ac2d937e210c5f354a18
generated: "2022-03-26T11:50:47.463553+05:30"
version: 1.17.1
digest: sha256:dacc73770a5640c011e067ff8840ddf89631fc19016c8d0a9e5ea160e7da8690
generated: "2022-10-11T12:45:29.234004317+05:30"
4 changes: 2 additions & 2 deletions charts/masterdata-loader/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spec:
- name: DB_PWD
valueFrom:
secretKeyRef:
name: {{ .Values.db.secret.name }}
key: {{ .Values.db.secret.key }}
name: db-mosip-master-secret
key: db-mosip-master-password

envFrom:
- configMapRef:
Expand Down
4 changes: 2 additions & 2 deletions charts/masterdata-loader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ db:
port: 5432
user: masteruser
secret:
name: db-common-secrets
key: db-dbuser-password
name: db-mosip-master-secret
key: db-mosip-master-password

mosipDataGithubBranch: develop
6 changes: 3 additions & 3 deletions charts/postgres-init/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.13.0
digest: sha256:e83af41b39942278f8389623671732e624f28c6f1ad6ac2d937e210c5f354a18
generated: "2022-03-26T11:50:47.463553+05:30"
version: 1.17.1
digest: sha256:dacc73770a5640c011e067ff8840ddf89631fc19016c8d0a9e5ea160e7da8690
generated: "2022-09-22T12:57:36.060140563+05:30"
4 changes: 2 additions & 2 deletions charts/postgres-init/templates/audit-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ spec:
- name: DBUSER_PWD
valueFrom:
secretKeyRef:
name: db-common-secrets
key: db-dbuser-password
name: db-mosip-audit-secret
key: db-mosip-audit-password

envFrom:
- configMapRef:
Expand Down
Loading