-
Notifications
You must be signed in to change notification settings - Fork 11
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: Lalith Kota <[email protected]>
- Loading branch information
1 parent
7e61fdb
commit 48a3a70
Showing
26 changed files
with
1,416 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
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
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 @@ | ||
charts/*.tgz | ||
Chart.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,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/ |
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,22 @@ | ||
apiVersion: v2 | ||
name: websub | ||
description: A Helm chart for WebSub | ||
type: application | ||
version: 12.0.1 | ||
dependencies: | ||
- name: common | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 2.x.x | ||
- name: kafka | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 29.x.x | ||
condition: kafka.enabled | ||
keywords: | ||
- mosip | ||
- websub | ||
maintainers: | ||
- email: [email protected] | ||
name: OpenG2P | ||
icon: https://openg2p.github.io/openg2p-helm/openg2p-logo.png | ||
annotations: | ||
catalog.cattle.io/display-name: "WebSub" |
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,3 @@ | ||
# WebSub | ||
|
||
Helm chart for installing WebSub module. |
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 @@ | ||
WebSub Installation. |
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,10 @@ | ||
questions: | ||
- variable: hostname | ||
description: Hostname under which WebSub should be accessible | ||
type: string | ||
label: WebSub Hostname | ||
|
||
- variable: global.keycloakBaseUrl | ||
description: Required for API auth validation. | ||
type: string | ||
label: Keycloak Base URL |
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,101 @@ | ||
{{/* | ||
Return the proper image name | ||
*/}} | ||
{{- define "websub.image" -}} | ||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} | ||
{{- end -}} | ||
|
||
{{- define "websub.consolidator.image" -}} | ||
{{ include "common.images.image" (dict "imageRoot" .Values.consolidator.image "global" .Values.global) }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the proper Docker Image Registry Secret Names | ||
*/}} | ||
{{- define "websub.imagePullSecrets" -}} | ||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.consolidator.image) "global" .Values.global) -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "websub.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (printf "%s" (include "common.names.fullname" .)) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return podAnnotations | ||
*/}} | ||
{{- define "websub.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 -}} | ||
|
||
{{- define "websub.consolidator.podAnnotations" -}} | ||
{{- if .Values.consolidator.podAnnotations }} | ||
{{ include "common.tplvalues.render" (dict "value" .Values.consolidator.podAnnotations "context" $) }} | ||
{{- end }} | ||
{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} | ||
{{ include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Render Env values section | ||
*/}} | ||
{{- define "websub.baseEnvVars" -}} | ||
{{- $context := .context -}} | ||
{{- range $k, $v := .envVars }} | ||
- name: {{ $k }} | ||
{{- if or (kindIs "int64" $v) (kindIs "float64" $v) (kindIs "bool" $v) }} | ||
value: {{ $v | quote }} | ||
{{- else if kindIs "string" $v }} | ||
value: {{ include "common.tplvalues.render" ( dict "value" $v "context" $context ) | squote }} | ||
{{- else }} | ||
valueFrom: {{- include "common.tplvalues.render" ( dict "value" $v "context" $context ) | nindent 4}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- define "websub.envVars" -}} | ||
{{- $envVars := merge (deepCopy .Values.envVars) (deepCopy .Values.envVarsFrom) -}} | ||
{{- include "websub.baseEnvVars" (dict "envVars" $envVars "context" $) }} | ||
{{- end -}} | ||
|
||
{{- define "websub.consolidator.envVars" -}} | ||
{{- $envVars := merge (deepCopy .Values.consolidator.envVars) (deepCopy .Values.consolidator.envVarsFrom) -}} | ||
{{- include "websub.baseEnvVars" (dict "envVars" $envVars "context" $) }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return command | ||
*/}} | ||
{{- define "websub.commandBase" -}} | ||
{{- if or .command .args }} | ||
{{- if .command }} | ||
command: {{- include "common.tplvalues.render" (dict "value" .command "context" .context) }} | ||
{{- end }} | ||
{{- if .args }} | ||
args: {{- include "common.tplvalues.render" (dict "value" .args "context" .context) }} | ||
{{- end }} | ||
{{- else if .startUpCommand }} | ||
command: ["/startup.sh"] | ||
args: [] | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- define "websub.command" -}} | ||
{{- include "websub.commandBase" (dict "command" .Values.command "args" .Values.args "startUpCommand" .Values.startUpCommand "context" $) }} | ||
{{- end -}} | ||
|
||
{{- define "websub.consolidator.command" -}} | ||
{{- include "websub.commandBase" (dict "command" .Values.consolidator.command "args" .Values.consolidator.args "startUpCommand" .Values.consolidator.startUpCommand "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,13 @@ | ||
{{- if .Values.configToml }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-config | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.toml: |- | ||
{{- include "common.tplvalues.render" (dict "value" .Values.configToml "context" $) | nindent 4 }} | ||
{{- 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,13 @@ | ||
{{- if and .Values.startUpCommand (not (or .Values.command .Values.args)) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-startup | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
startup.sh: |- | ||
{{- include "common.tplvalues.render" (dict "value" .Values.startUpCommand "context" $) | nindent 4 }} | ||
{{- end }} |
13 changes: 13 additions & 0 deletions
13
charts/websub/templates/consolidator/configmap-config.yaml
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,13 @@ | ||
{{- if .Values.consolidator.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-consolidator-config | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.toml: |- | ||
{{- include "common.tplvalues.render" (dict "value" .Values.consolidator.configToml "context" $) | nindent 4 }} | ||
{{- end }} |
13 changes: 13 additions & 0 deletions
13
charts/websub/templates/consolidator/configmap-startup.yaml
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,13 @@ | ||
{{- if and .Values.consolidator.startUpCommand (not (or .Values.consolidator.command .Values.consolidator.args)) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-consolidator-startup | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
startup.sh: |- | ||
{{- include "common.tplvalues.render" (dict "value" .Values.consolidator.startUpCommand "context" $) | nindent 4 }} | ||
{{- 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,113 @@ | ||
{{- if .Values.consolidator.enabled }} | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-consolidator | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: {{ .Values.consolidator.replicaCount }} | ||
{{- if .Values.consolidator.updateStrategy }} | ||
strategy: {{- toYaml .Values.consolidator.updateStrategy | nindent 4 }} | ||
{{- end }} | ||
selector: | ||
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.consolidator.podLabels "context" $) | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- if or .Values.consolidator.podAnnotations .Values.metrics.enabled }} | ||
annotations: {{- include "websub.consolidator.podAnnotations" . | nindent 8 }} | ||
{{- end }} | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.consolidator.podLabels "context" $) | nindent 8 }} | ||
spec: | ||
serviceAccountName: {{ template "websub.serviceAccountName" . }} | ||
{{- include "websub.imagePullSecrets" . | nindent 6 }} | ||
{{- if .Values.consolidator.hostAliases }} | ||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.consolidator.hostAliases "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.affinity }} | ||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.consolidator.affinity "context" $) | nindent 8 }} | ||
{{- else }} | ||
affinity: | ||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.consolidator.podAffinityPreset "context" $) | nindent 10 }} | ||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.consolidator.podAntiAffinityPreset "context" $) | nindent 10 }} | ||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.consolidator.nodeAffinityPreset.type "key" .Values.consolidator.nodeAffinityPreset.key "values" .Values.consolidator.nodeAffinityPreset.values) | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.nodeSelector }} | ||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.consolidator.nodeSelector "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.tolerations }} | ||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.consolidator.tolerations "context" .) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.priorityClassName }} | ||
priorityClassName: {{ .Values.consolidator.priorityClassName | quote }} | ||
{{- end }} | ||
{{- if .Values.consolidator.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.consolidator.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.initContainers }} | ||
initContainers: | ||
{{- include "common.tplvalues.render" (dict "value" .Values.consolidator.initContainers "context" $) | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: websub-consolidator | ||
image: {{ template "websub.consolidator.image" . }} | ||
imagePullPolicy: {{ .Values.consolidator.image.pullPolicy }} | ||
{{- if .Values.consolidator.lifecycleHooks }} | ||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.consolidator.lifecycleHooks "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.consolidator.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
{{- include "websub.consolidator.command" . | nindent 10 }} | ||
env: | ||
{{- include "websub.consolidator.envVars" . | nindent 12 }} | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.consolidator.containerPort }} | ||
{{- if .Values.consolidator.resources }} | ||
resources: {{- toYaml .Values.consolidator.resources | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.startupProbe.enabled }} | ||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.consolidator.startupProbe "enabled") "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.livenessProbe.enabled }} | ||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.consolidator.livenessProbe "enabled") "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.readinessProbe.enabled }} | ||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.consolidator.readinessProbe "enabled") "context" $) | nindent 12 }} | ||
{{- end }} | ||
volumeMounts: | ||
{{- if and .Values.consolidator.startUpCommand (not (or .Values.consolidator.command .Values.consolidator.args)) }} | ||
- name: startup-command | ||
mountPath: /startup.sh | ||
subPath: startup.sh | ||
{{- end }} | ||
{{- if .Values.consolidator.configToml }} | ||
- name: config-toml | ||
mountPath: {{ include "common.tplvalues.render" (dict "value" .Values.consolidator.configTomlMountPath "context" $) }} | ||
subPath: config.toml | ||
{{- end }} | ||
{{- if .Values.consolidator.extraVolumeMounts }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.consolidator.extraVolumeMounts "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.consolidator.sidecars }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.consolidator.sidecars "context" $) | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
{{- if and .Values.consolidator.startUpCommand (not (or .Values.consolidator.command .Values.consolidator.args)) }} | ||
- name: startup-command | ||
configMap: | ||
name: {{ include "common.names.fullname" . }}-consolidator-startup | ||
defaultMode: 0755 | ||
{{- end }} | ||
{{- if .Values.consolidator.configToml }} | ||
- name: config-toml | ||
configMap: | ||
name: {{ include "common.names.fullname" . }}-consolidator-config | ||
{{- end }} | ||
{{- if .Values.consolidator.extraVolumes }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.consolidator.extraVolumes "context" $) | nindent 8 }} | ||
{{- 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,40 @@ | ||
{{- if .Values.consolidator.enabled }} | ||
{{- if .Values.consolidator.istio.enabled }} | ||
{{- if .Values.consolidator.istio.gateway.enabled }} | ||
apiVersion: networking.istio.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-consolidator | ||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
selector: | ||
{{ toYaml .Values.consolidator.istio.gateway.ingressController | nindent 4 }} | ||
servers: | ||
{{- if .Values.consolidator.istio.gateway.httpEnabled }} | ||
- port: | ||
name: http2 | ||
number: 8080 | ||
protocol: HTTP2 | ||
hosts: | ||
- {{ default .Values.hostname .Values.consolidator.istio.gateway.host | quote }} | ||
{{- if .Values.consolidator.istio.gateway.httpTlsRedirect }} | ||
tls: | ||
httpsRedirect: true | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.consolidator.istio.gateway.httpsEnabled }} | ||
- port: | ||
name: https | ||
number: 8443 | ||
protocol: HTTPS | ||
hosts: | ||
- {{ default .Values.hostname .Values.consolidator.istio.gateway.host | quote }} | ||
tls: | ||
{{ toYaml (omit .Values.consolidator.istio.gateway.tls "enabled") | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.