Skip to content

Commit

Permalink
Revert "Fixed Istio ingress gateways. Fixed Helm chart dependency bui…
Browse files Browse the repository at this point in the history
…lds. removed portal."
  • Loading branch information
lalithkota authored Jul 5, 2024
1 parent 2669037 commit b0ef143
Show file tree
Hide file tree
Showing 58 changed files with 1,408 additions and 48 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/push_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,12 @@ jobs:
echo "::warning::No Charts to publish";
echo "SKIP=TRUE" >> $GITHUB_ENV
else
for chartpath in charts/*/; do
if [ -f ${chartpath}Chart.yaml ]; then
helm dep up $chartpath
fi
done
RANCHER_CHARTS=()
while IFS= read -r chartpath; do
echo "chartpath: $chartpath"
chartname=$(basename "$chartpath")
echo "Chartname: $chartname"
helm dep up charts/$chartpath
helm package charts/$chartpath
is_rancher_chart=$(grep "$RANCHER_CHART_FILTER" charts/${chartpath%*/}/Chart.yaml || true)
if [ -n "$is_rancher_chart" ]; then
Expand Down
2 changes: 1 addition & 1 deletion charts/esignet/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charts/*.tgz
charts/
Chart.lock
22 changes: 12 additions & 10 deletions charts/esignet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@ dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.x.x
- name: mock-identity-system
repository: https://openg2p.github.io/openg2p-helm
version: 0.9.2
condition: mock-identity-system.enabled
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 15.x.x
condition: postgresql.enabled
- name: softhsm
repository: https://mosip.github.io/mosip-helm
version: 12.0.1-B2
condition: softhsm.enabled
- name: artifactory
repository: https://openg2p.github.io/openg2p-helm
version: 12.0.2
condition: artifactory.enabled
- name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 19.x.x
Expand All @@ -19,16 +31,6 @@ dependencies:
repository: oci://registry-1.docker.io/bitnamicharts
version: 29.x.x
condition: kafka.enabled
- name: softhsm
repository: https://mosip.github.io/mosip-helm
version: 12.0.1-B2
condition: softhsm.enabled
- name: artifactory
version: 12.0.2
condition: artifactory.enabled
- name: mock-identity-system
version: 0.9.2
condition: mock-identity-system.enabled
home: https://mosip.io
keywords:
- mosip
Expand Down
1 change: 0 additions & 1 deletion charts/esignet/charts/artifactory

This file was deleted.

1 change: 0 additions & 1 deletion charts/esignet/charts/mock-identity-system

This file was deleted.

2 changes: 1 addition & 1 deletion charts/keymanager/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charts/*.tgz
charts/
Chart.lock
1 change: 1 addition & 0 deletions charts/keymanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
version: 12.0.1-B2
condition: softhsm.enabled
- name: artifactory
repository: https://openg2p.github.io/openg2p-helm
version: 12.0.2
condition: artifactory.enabled
keywords:
Expand Down
1 change: 0 additions & 1 deletion charts/keymanager/charts/artifactory

This file was deleted.

2 changes: 1 addition & 1 deletion charts/mock-identity-system/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charts/*.tgz
charts/
Chart.lock
1 change: 1 addition & 0 deletions charts/mock-identity-system/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
version: 12.0.1-B2
condition: softhsm.enabled
- name: artifactory
repository: https://openg2p.github.io/openg2p-helm
version: 12.0.2
condition: artifactory.enabled
home: https://mosip.io
Expand Down
1 change: 0 additions & 1 deletion charts/mock-identity-system/charts/artifactory

This file was deleted.

2 changes: 1 addition & 1 deletion charts/odk-central/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charts/*.tgz
charts/
Chart.lock
3 changes: 3 additions & 0 deletions charts/odk-central/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ dependencies:
condition: postgresql.enabled
- name: mail
alias: odk-central-mail
repository: https://openg2p.github.io/openg2p-helm
version: "1.2.0"
condition: odk-central-mail.enabled
- name: odk-central-pyxform
repository: https://openg2p.github.io/openg2p-helm
version: "v2024.1.0"
condition: odk-central-pyxform.enabled
- name: odk-central-enketo
repository: https://openg2p.github.io/openg2p-helm
version: "v2024.1.0"
condition: odk-central-enketo.enabled
keywords:
Expand Down
1 change: 0 additions & 1 deletion charts/odk-central/charts/mail

This file was deleted.

1 change: 0 additions & 1 deletion charts/odk-central/charts/odk-central-enketo

This file was deleted.

1 change: 0 additions & 1 deletion charts/odk-central/charts/odk-central-pyxform

This file was deleted.

2 changes: 0 additions & 2 deletions charts/odk-central/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ postgresql:
odk-central-mail:
enabled: true
mailname: "openg2p.sandbox.net"

odk-central-pyxform:
enabled: true

odk-central-enketo:
enabled: true

Expand Down
23 changes: 23 additions & 0 deletions charts/openg2p-selfservice-api/.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/
6 changes: 6 additions & 0 deletions charts/openg2p-selfservice-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: openg2p-selfservice-api
description: A Helm chart for API backend of OpenG2P Self Service Portal
type: application
version: 0.1.0
appVersion: "0.1.0"
4 changes: 3 additions & 1 deletion charts/openg2p-selfservice-api/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This helm chart has been moved to [OpenG2P PBMS Deployment](https://github.com/openg2p/openg2p-pbms-deployment) repo.
# OpenG2P Beneficiary Portal API Helm Chart

- Refer to [Beneficiary Portal Deployment](https://docs.openg2p.org/deployment/openg2p-modules-deployment/openg2p-beneficiary-portal-deployment).
108 changes: 108 additions & 0 deletions charts/openg2p-selfservice-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "portal.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "portal.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "portal.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "portal.labels" -}}
helm.sh/chart: {{ include "portal.chart" . }}
{{ include "portal.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "portal.selectorLabels" -}}
app.kubernetes.io/name: {{ include "portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "portal.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "portal.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Render Env values section
*/}}
{{- define "portal.envVars" -}}
{{- range $k, $v := .Values.envVars }}
- name: {{ $k }}
value: {{ tpl $v $ | quote }}
{{- end }}
{{- range $k, $v := .Values.envVarsFrom }}
- name: {{ $k }}
valueFrom:
{{- if $v.configMapKeyRef }}
configMapKeyRef:
name: {{ tpl $v.configMapKeyRef.name $ | squote }}
key: {{ tpl $v.configMapKeyRef.key $ | squote }}
{{- else if $v.secretKeyRef }}
secretKeyRef:
name: {{ tpl $v.secretKeyRef.name $ | squote }}
key: {{ tpl $v.secretKeyRef.key $ | squote }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Render Postgres Init Env values
*/}}
{{- define "portal.postgresInitEnvVars" -}}
{{- range $k, $v := .Values.postgresInit.envVars }}
- name: {{ $k }}
value: {{ tpl $v $ | squote }}
{{- end }}
{{- range $k, $v := .Values.postgresInit.envVarsFrom }}
- name: {{ $k }}
valueFrom:
{{- if $v.configMapKeyRef }}
configMapKeyRef:
name: {{ tpl $v.configMapKeyRef.name $ | squote }}
key: {{ tpl $v.configMapKeyRef.key $ | squote }}
{{- else if $v.secretKeyRef }}
secretKeyRef:
name: {{ tpl $v.secretKeyRef.name $ | squote }}
key: {{ tpl $v.secretKeyRef.key $ | squote }}
{{- end }}
{{- end }}
{{- end }}
77 changes: 77 additions & 0 deletions charts/openg2p-selfservice-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "portal.fullname" . }}
labels:
{{- include "portal.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "portal.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "portal.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "portal.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: postgres-checker
image: jbergknoff/postgresql-client
command:
- 'sh'
- '-c'
- 'until pg_isready -U $PORTAL_DB_USERNAME -h $PORTAL_DB_HOSTNAME -p ${PORTAL_DB_PORT:-5432} -d ${PORTAL_DB_DBNAME:-openg2p}; do sleep 3; done'
env: {{ include "portal.envVars" . | nindent 10 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env: {{ include "portal.envVars" . | nindent 10 }}
ports:
- name: http
containerPort: {{ .Values.containerPort }}
protocol: TCP
readinessProbe:
httpGet:
path: /ping
port: {{ .Values.containerPort }}
failureThreshold: 20
periodSeconds: 30
timeoutSeconds: 10
initialDelaySeconds: 30
livenessProbe:
httpGet:
path: /ping
port: {{ .Values.containerPort }}
initialDelaySeconds: 15
periodSeconds: 60
failureThreshold: 5
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Loading

0 comments on commit b0ef143

Please sign in to comment.