-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ckm007 <chandrakeshavmishra@gmail.com>
- Loading branch information
Showing
14 changed files
with
865 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
chart | ||
Charts.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v2 | ||
name: pmp-ui | ||
description: A Helm chart for MOSIP pmp UI module | ||
type: application | ||
version: 12.0.2-develop | ||
appVersion: "" | ||
dependencies: | ||
- name: common | ||
repository: https://charts.bitnami.com/bitnami | ||
tags: | ||
- bitnami-common | ||
version: 1.x.x | ||
home: https://mosip.io | ||
keywords: | ||
- mosip | ||
- pmp | ||
maintainers: | ||
- email: info@mosip.io | ||
name: MOSIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Authmanager | ||
|
||
Helm chart for installing MOSIP pmp UI module | ||
|
||
## TL;DR | ||
|
||
```console | ||
$ helm repo add mosip https://mosip.github.io | ||
$ helm install my-release mosip/pmp-ui | ||
``` | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.12+ | ||
- Helm 3.1.0 | ||
- PV provisioner support in the underlying infrastructure | ||
- ReadWriteMany volumes for deployment scaling | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `pmp-ui`. | ||
|
||
```console | ||
helm install my-release mosip/pmp-ui | ||
``` | ||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{/* | ||
Return the proper image name | ||
*/}} | ||
{{- define "pmp-ui.image" -}} | ||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the proper image name (for the init container volume-permissions image) | ||
*/}} | ||
{{- define "pmp-ui.volumePermissions.image" -}} | ||
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the proper Docker Image Registry Secret Names | ||
*/}} | ||
{{- define "pmp-ui.imagePullSecrets" -}} | ||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "pmp-ui.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (printf "%s-foo" (include "common.names.fullname" .)) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Compile all warnings into a single message. | ||
*/}} | ||
{{- define "pmp-ui.validateValues" -}} | ||
{{- $messages := list -}} | ||
{{- $messages := append $messages (include "pmp-ui.validateValues.foo" .) -}} | ||
{{- $messages := append $messages (include "pmp-ui.validateValues.bar" .) -}} | ||
{{- $messages := without $messages "" -}} | ||
{{- $message := join "\n" $messages -}} | ||
|
||
{{- if $message -}} | ||
{{- printf "\nVALUES VALIDATION:\n%s" $message -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return podAnnotations | ||
*/}} | ||
{{- define "pmp-ui.podAnnotations" -}} | ||
{{- if .Values.podAnnotations }} | ||
{{ include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) }} | ||
{{- end }} | ||
{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} | ||
{{ include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "common.names.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- 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 }} | ||
data: | ||
config.json: |- | ||
{"baseUrl": "{{ tpl .Values.pmp.apiUrl . }}", "pmpUrl" : "/", "primaryLangCode": "eng", "secondaryLangCode": "ara", "version": "/v1/"} | ||
default.conf: |- | ||
server { | ||
listen 8080; | ||
server_name localhost; | ||
add_header X-Frame-Options DENY; | ||
#charset koi8-r; | ||
#access_log /var/log/nginx/host.access.log main; | ||
#index index.html index.htm; | ||
location / { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
metadata: | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
name: {{ template "common.names.fullname" . }} | ||
annotations: | ||
{{- if .Values.commonAnnotations }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
{{- if .Values.updateStrategy }} | ||
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} | ||
{{- end }} | ||
selector: | ||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
annotations: | ||
{{- if or .Values.podAnnotations .Values.metrics.enabled }} | ||
{{- include "pmp-ui.podAnnotations" . | nindent 8 }} | ||
{{- end }} | ||
labels: {{- include "common.labels.standard" . | nindent 8 }} | ||
{{- if .Values.podLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ template "pmp-ui.serviceAccountName" . }} | ||
{{- include "pmp-ui.imagePullSecrets" . | nindent 6 }} | ||
{{- if .Values.hostAliases }} | ||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.affinity }} | ||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }} | ||
{{- else }} | ||
affinity: | ||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} | ||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} | ||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.nodeSelector }} | ||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.tolerations }} | ||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.priorityClassName }} | ||
priorityClassName: {{ .Values.priorityClassName | quote }} | ||
{{- end }} | ||
{{- if .Values.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
initContainers: | ||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} | ||
- name: volume-permissions | ||
image: {{ include "pmp-ui.volumePermissions.image" . }} | ||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} | ||
command: | ||
- %%commands%% | ||
securityContext: | ||
runAsUser: 0 | ||
{{- if .Values.volumePermissions.resources }} | ||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: foo | ||
mountPath: bar | ||
{{- end }} | ||
{{- if .Values.initContainers }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: pmp-ui | ||
image: {{ template "pmp-ui.image" . }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
{{- if .Values.lifecycleHooks }} | ||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.command }} | ||
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.args }} | ||
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }} | ||
{{- end }} | ||
env: | ||
- name: container_user | ||
value: {{ .Values.containerSecurityContext.runAsUser }} | ||
- name: JDK_JAVA_OPTIONS | ||
value: {{ .Values.additionalResources.javaOpts }} | ||
{{- if .Values.extraEnvVars }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} | ||
{{- end }} | ||
envFrom: | ||
{{- if .Values.extraEnvVarsCM }} | ||
{{- range .Values.extraEnvVarsCM }} | ||
- configMapRef: | ||
name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.extraEnvVarsSecret }} | ||
- secretRef: | ||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: ui-config | ||
mountPath: /usr/share/nginx/html/assets/config.json | ||
subPath: config.json | ||
- name: nginx-config | ||
mountPath: /etc/nginx/conf.d/default.conf | ||
subPath: default.conf | ||
ports: | ||
- name: spring-service | ||
containerPort: {{ .Values.springServicePort }} | ||
{{- if .Values.resources }} | ||
resources: {{- toYaml .Values.resources | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.startupProbe.enabled }} | ||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }} | ||
{{- else if .Values.customStartupProbe }} | ||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.livenessProbe.enabled }} | ||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} | ||
{{- else if .Values.customLivenessProbe }} | ||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.readinessProbe.enabled }} | ||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} | ||
{{- else if .Values.customReadinessProbe }} | ||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.sidecars }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: ui-config | ||
configMap: | ||
name: {{ template "common.names.fullname" . }} | ||
items: | ||
- key: config.json | ||
path: config.json | ||
- name: nginx-config | ||
configMap: | ||
name: {{ template "common.names.fullname" . }} | ||
items: | ||
- key: default.conf | ||
path: default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{- range .Values.extraDeploy }} | ||
--- | ||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- if .Values.istio.enabled }} | ||
apiVersion: networking.istio.io/v1alpha3 | ||
kind: Gateway | ||
metadata: | ||
{{- with (first .Values.istio.gateways) }} | ||
name: {{ .name }} | ||
{{- end }} | ||
spec: | ||
selector: | ||
istio: {{ .Values.istio.ingressController.name }} | ||
servers: | ||
- port: | ||
{{- with (first .Values.istio.gateways) }} | ||
number: {{ .port }} | ||
name: {{ .portName }} | ||
protocol: {{ .protocol }} | ||
{{- end }} | ||
hosts: | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.istio.hosts "context" $ ) | nindent 6 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
name: {{ template "pmp-ui.serviceAccountName" . }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
namespace: {{ .Release.Namespace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
name: {{ template "common.names.fullname" . }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} | ||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} | ||
{{- end }} | ||
{{ if eq .Values.service.type "LoadBalancer" }} | ||
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }} | ||
{{ end }} | ||
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }} | ||
loadBalancerIP: {{ .Values.service.loadBalancerIP }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.service.port }} | ||
protocol: TCP | ||
targetPort: {{ .Values.springServicePort }} | ||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} |
Oops, something went wrong.