diff --git a/charts/backend2/Chart.yaml b/charts/backend2/Chart.yaml new file mode 100755 index 0000000..bc725f3 --- /dev/null +++ b/charts/backend2/Chart.yaml @@ -0,0 +1,149 @@ +apiVersion: v2 +name: backend +description: Umbrella chart for all backend k8s applications +type: application +version: "0.1.0" +appVersion: "1.0.0" + +dependencies: + - name: admin-app + version: "0.1.0" + repository: file://charts/admin-app-k8s + - name: android-app + version: "0.1.0" + repository: file://charts/android-app-k8s + - name: auth-app + version: "0.1.0" + repository: file://charts/auth-app-k8s + - name: auth-event-handler-app + version: "0.1.0" + repository: file://charts/auth-event-handler-app-k8s + - name: bff-admin-app + version: "0.1.0" + repository: file://charts/bff-admin-app-k8s + - name: bff-app + version: "0.1.0" + repository: file://charts/bff-app-k8s + - name: bff-external-app + version: "0.1.0" + repository: file://charts/bff-external-app-k8s + - name: bff-vcs-app + version: "0.1.0" + repository: file://charts/bff-vcs-app-k8s + - name: big-chat-splitter-app + version: "0.1.0" + repository: file://charts/big-chat-splitter-app-k8s + - name: call-app + version: "0.1.0" + repository: file://charts/call-app-k8s + - name: call-event-handler-app + version: "0.1.0" + repository: file://charts/call-event-handler-app-k8s + - name: call-realtime-app + version: "0.1.0" + repository: file://charts/call-realtime-app-k8s + - name: chat-app + version: "0.1.0" + repository: file://charts/chat-app-k8s + - name: chat-event-handler-app + version: "0.1.0" + repository: file://charts/chat-event-handler-app-k8s + - name: deeplink-app + version: "0.1.0" + repository: file://charts/deeplink-app-k8s + - name: gem-call-app + version: "0.1.0" + repository: file://charts/gem-call-app-k8s + - name: gem-call-events-handler-app + version: "0.1.0" + repository: file://charts/gem-call-events-handler-app-k8s + - name: huawei-app + version: "0.1.0" + repository: file://charts/huawei-app-k8s + - name: ios-app + version: "0.1.0" + repository: file://charts/ios-app-k8s + - name: livekit-webhook-handler-app + version: "0.1.0" + repository: file://charts/livekit-webhook-handler-app-k8s + - name: message-app + version: "0.1.0" + repository: file://charts/message-app-k8s + - name: message-call-event-handler-app + version: "0.1.0" + repository: file://charts/message-call-event-handler-app-k8s + - name: message-chat-event-handler-app + version: "0.1.0" + repository: file://charts/message-chat-event-handler-app-k8s + - name: message-event-handler-app + version: "0.1.0" + repository: file://charts/message-event-handler-app-k8s + - name: message-link-preview-handler-app + version: "0.1.0" + repository: file://charts/message-link-preview-handler-app-k8s + - name: message-user-event-handler-app + version: "0.1.0" + repository: file://charts/message-user-event-handler-app-k8s + - name: notification-app + version: "0.1.0" + repository: file://charts/notification-app-k8s + - name: notification-event-handler-app + version: "0.1.0" + repository: file://charts/notification-event-handler-app-k8s + - name: realtime-app + version: "0.1.0" + repository: file://charts/realtime-app-k8s + - name: regular-chat-splitter-app + version: "0.1.0" + repository: file://charts/regular-chat-splitter-app-k8s + - name: search-app + version: "0.1.0" + repository: file://charts/search-app-k8s + - name: search-event-handler-app + version: "0.1.0" + repository: file://charts/search-event-handler-app-k8s + - name: sticker-app + version: "0.1.0" + repository: file://charts/sticker-app-k8s + - name: unregister-tokens-app + version: "0.1.0" + repository: file://charts/unregister-tokens-app-k8s + - name: upload-app + version: "0.1.0" + repository: file://charts/upload-app-k8s + - name: user-app + version: "0.1.0" + repository: file://charts/user-app-k8s + - name: voip-splitter-app + version: "0.1.0" + repository: file://charts/voip-splitter-app-k8s + - name: web-sender-app + version: "0.1.0" + repository: file://charts/web-sender-app-k8s + - name: workspace-app + version: "0.1.0" + repository: file://charts/workspace-app-k8s + - name: workspace-event-handler-app + version: "0.1.0" + repository: file://charts/workspace-event-handler-app-k8s + - name: device-app + version: "0.1.0" + repository: file://charts/device-app-k8s + - name: license-app + version: "0.1.0" + repository: file://charts/license-app-k8s + - name: dictionary-app + version: "0.1.0" + repository: file://charts/dictionary-app-k8s + - name: calendar-app + version: "0.1.0" + repository: file://charts/calendar-app-k8s + - name: admin-ui-app + version: "0.1.0" + repository: file://charts/admin-ui-app-k8s + - name: config-app + version: "0.1.0" + repository: file://charts/config-app-k8s + - name: cw-common + version: "0.1.0" + repository: file://charts/cw-common diff --git a/charts/backend2/charts/admin-app-k8s/.helmignore b/charts/backend2/charts/admin-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/admin-app-k8s/Chart.yaml b/charts/backend2/charts/admin-app-k8s/Chart.yaml new file mode 100755 index 0000000..48d93bc --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: admin-app +description: Helm chart for Admin app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/admin-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/admin-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..739a018 --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "admin-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "admin-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "admin-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "admin-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "admin-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/admin-app-k8s/templates/deployment.yaml b/charts/backend2/charts/admin-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..21884e7 --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/templates/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "admin-app.fullname" . }} + labels: + {{- include "admin-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "admin-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "admin-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "admin-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/admin-app-k8s/templates/pdb.yaml b/charts/backend2/charts/admin-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..166e29e --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "admin-app.fullname" . }} + labels: + {{- include "admin-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "admin-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/admin-app-k8s/templates/service.yaml b/charts/backend2/charts/admin-app-k8s/templates/service.yaml new file mode 100755 index 0000000..7d219e3 --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "admin-app.fullname" . }} + labels: + {{- include "admin-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "admin-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/admin-app-k8s/values.yaml b/charts/backend2/charts/admin-app-k8s/values.yaml new file mode 100755 index 0000000..f2506d2 --- /dev/null +++ b/charts/backend2/charts/admin-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 9090 + targetPort: 9090 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/admin-ui-app-k8s/.helmignore b/charts/backend2/charts/admin-ui-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/admin-ui-app-k8s/Chart.yaml b/charts/backend2/charts/admin-ui-app-k8s/Chart.yaml new file mode 100755 index 0000000..a90294b --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: admin-ui-app +description: Helm chart for Admin ui app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/admin-ui-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/admin-ui-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..9556f9e --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "admin-ui-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "admin-ui-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "admin-ui-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "admin-ui-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "admin-ui-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/admin-ui-app-k8s/templates/deployment.yaml b/charts/backend2/charts/admin-ui-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..2ad1b2f --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/templates/deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "admin-ui-app.fullname" . }} + labels: + {{- include "admin-ui-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "admin-ui-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "admin-ui-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ include "admin-ui-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/admin-ui-app-k8s/templates/ingress.yaml b/charts/backend2/charts/admin-ui-app-k8s/templates/ingress.yaml new file mode 100755 index 0000000..7cbc09d --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/templates/ingress.yaml @@ -0,0 +1,37 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "admin-ui-app.fullname" . }}-ingress + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName | quote }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "admin-ui-app.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/backend2/charts/admin-ui-app-k8s/templates/pdb.yaml b/charts/backend2/charts/admin-ui-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..a5c9fd2 --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "admin-ui-app.fullname" . }} + labels: + {{- include "admin-ui-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "admin-ui-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/admin-ui-app-k8s/templates/service.yaml b/charts/backend2/charts/admin-ui-app-k8s/templates/service.yaml new file mode 100755 index 0000000..9850cf1 --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "admin-ui-app.fullname" . }} + labels: + {{- include "admin-ui-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "admin-ui-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/admin-ui-app-k8s/values.yaml b/charts/backend2/charts/admin-ui-app-k8s/values.yaml new file mode 100755 index 0000000..c4b7959 --- /dev/null +++ b/charts/backend2/charts/admin-ui-app-k8s/values.yaml @@ -0,0 +1,35 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +service: + type: ClusterIP + port: 9090 + targetPort: 80 +ingress: + enabled: true + className: nginx + name: admin-ui-ingress + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: 'true' + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' + nginx.ingress.kubernetes.io/backend-protocol: HTTP + hosts: + - host: admin-ui.cw.ngcloud.ru + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - admin-ui.cw.ngcloud.ru + secretName: co-work-secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/android-app-k8s/.helmignore b/charts/backend2/charts/android-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/android-app-k8s/Chart.yaml b/charts/backend2/charts/android-app-k8s/Chart.yaml new file mode 100755 index 0000000..0232dfd --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: android-app +description: Helm chart for Android Sender Application +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/android-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/android-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..06150fc --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "android-sender-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "android-sender-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "android-sender-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "android-sender-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "android-sender-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/android-app-k8s/templates/deployment.yaml b/charts/backend2/charts/android-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..432fcc7 --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "android-sender-app.fullname" . }} + labels: + {{- include "android-sender-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "android-sender-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "android-sender-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "android-sender-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/android-app-k8s/templates/pdb.yaml b/charts/backend2/charts/android-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..3db02e1 --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "android-sender-app.fullname" . }} + labels: + {{- include "android-sender-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "android-sender-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/android-app-k8s/values.yaml b/charts/backend2/charts/android-app-k8s/values.yaml new file mode 100755 index 0000000..7ee3c8b --- /dev/null +++ b/charts/backend2/charts/android-app-k8s/values.yaml @@ -0,0 +1,24 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + android_firebase_config: cowork-prod-firebase-adminsdk-l136z-648992e82d.json + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + firebaseSecret: android-firebase-config +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/auth-app-k8s/.helmignore b/charts/backend2/charts/auth-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/auth-app-k8s/Chart.yaml b/charts/backend2/charts/auth-app-k8s/Chart.yaml new file mode 100755 index 0000000..3c39308 --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: auth-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/auth-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/auth-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..cb1c9ea --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "auth-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "auth-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "auth-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "auth-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "auth-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/auth-app-k8s/templates/deployment.yaml b/charts/backend2/charts/auth-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..ed5baf2 --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "auth-app-k8s.fullname" . }} + labels: + {{- include "auth-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "auth-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "auth-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "auth-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/auth-app-k8s/templates/pdb.yaml b/charts/backend2/charts/auth-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..014a977 --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "auth-app-k8s.fullname" . }} + labels: + {{- include "auth-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "auth-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/auth-app-k8s/templates/service.yaml b/charts/backend2/charts/auth-app-k8s/templates/service.yaml new file mode 100755 index 0000000..02c4fdf --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "auth-app-k8s.fullname" . }} + labels: + {{- include "auth-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "auth-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/auth-app-k8s/templates/tests/test-connection.yaml b/charts/backend2/charts/auth-app-k8s/templates/tests/test-connection.yaml new file mode 100755 index 0000000..345e5ce --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "auth-app-k8s.fullname" . }}-test-connection" + labels: + {{- include "auth-app-k8s.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "auth-app-k8s.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/backend2/charts/auth-app-k8s/values.yaml b/charts/backend2/charts/auth-app-k8s/values.yaml new file mode 100755 index 0000000..4126554 --- /dev/null +++ b/charts/backend2/charts/auth-app-k8s/values.yaml @@ -0,0 +1,30 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 9090 + targetPort: 9090 +secrets: + adminPassword: + name: auth-secrets + key: admin-password + clientSecret: + name: auth-secrets + key: client-secret +resources: {} +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/.helmignore b/charts/backend2/charts/auth-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/auth-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..ac6cb38 --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: auth-event-handler-app +description: Authentication Event Handler +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/auth-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..ad454c7 --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "auth-event-handler-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "auth-event-handler-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "auth-event-handler-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "auth-event-handler-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "auth-event-handler-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/auth-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..d0ea859 --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "auth-event-handler-app-k8s.fullname" . }} + labels: + {{- include "auth-event-handler-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "auth-event-handler-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "auth-event-handler-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "auth-event-handler-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/auth-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..9cb96cc --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "auth-event-handler-app-k8s.fullname" . }} + labels: + {{- include "auth-event-handler-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "auth-event-handler-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/auth-event-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..59271b2 --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "auth-event-handler-app-k8s.fullname" . }} + labels: + {{- include "auth-event-handler-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "auth-event-handler-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/auth-event-handler-app-k8s/values.yaml b/charts/backend2/charts/auth-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..f814bd1 --- /dev/null +++ b/charts/backend2/charts/auth-event-handler-app-k8s/values.yaml @@ -0,0 +1,34 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 8094 + targetPort: 9090 +secrets: + kafka: + name: kafka-password + passwordKey: client-passwords + username: admin + adminPassword: + name: auth-secrets + key: admin-password + clientSecret: + name: auth-secrets + key: client-secret +resources: {} +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/bff-admin-app-k8s/.helmignore b/charts/backend2/charts/bff-admin-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/bff-admin-app-k8s/Chart.yaml b/charts/backend2/charts/bff-admin-app-k8s/Chart.yaml new file mode 100755 index 0000000..4271892 --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: bff-admin-app +description: Helm chart for bff-admin-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/bff-admin-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/bff-admin-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..1e05039 --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "bff-admin-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "bff-admin-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "bff-admin-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "bff-admin-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "bff-admin-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/bff-admin-app-k8s/templates/deployment.yaml b/charts/backend2/charts/bff-admin-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4ec4233 --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/templates/deployment.yaml @@ -0,0 +1,79 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "bff-admin-app.fullname" . }} + labels: + {{- include "bff-admin-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "bff-admin-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "bff-admin-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "bff-admin-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + containerPort: {{ .targetPort }} + protocol: TCP + {{- end }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/bff-admin-app-k8s/templates/ingress.yaml b/charts/backend2/charts/bff-admin-app-k8s/templates/ingress.yaml new file mode 100644 index 0000000..238eb6f --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/templates/ingress.yaml @@ -0,0 +1,37 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "bff-admin-app.fullname" . }}-ingress + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName | quote }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "bff-admin-app.fullname" $ }} + port: + number: {{ $.Values.service.httpPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/backend2/charts/bff-admin-app-k8s/templates/pdb.yaml b/charts/backend2/charts/bff-admin-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..c96db1f --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "bff-admin-app.fullname" . }} + labels: + {{- include "bff-admin-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "bff-admin-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/bff-admin-app-k8s/templates/service.yaml b/charts/backend2/charts/bff-admin-app-k8s/templates/service.yaml new file mode 100755 index 0000000..a477eb3 --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "bff-admin-app.fullname" . }} + labels: + {{- include "bff-admin-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + protocol: TCP + {{- end }} + selector: + {{- include "bff-admin-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/bff-admin-app-k8s/values.yaml b/charts/backend2/charts/bff-admin-app-k8s/values.yaml new file mode 100755 index 0000000..42fa004 --- /dev/null +++ b/charts/backend2/charts/bff-admin-app-k8s/values.yaml @@ -0,0 +1,47 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] + app_name: bff-admin-app +service: + type: ClusterIP + httpPort: 8100 + grpcPort: 8101 + ports: + - name: http + port: 8100 + targetPort: 8080 + - name: grpc + port: 8101 + targetPort: 9090 +ingress: + enabled: true + className: nginx + name: bff-admin-ingress + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: 'true' + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' + nginx.ingress.kubernetes.io/backend-protocol: HTTP + hosts: + - host: admin-ui.cw.ngcloud.ru + paths: + - path: /bff-admin + pathType: Prefix + tls: + - hosts: + - admin-ui.cw.ngcloud.ru + secretName: co-work-secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/bff-app-k8s/.helmignore b/charts/backend2/charts/bff-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/bff-app-k8s/Chart.yaml b/charts/backend2/charts/bff-app-k8s/Chart.yaml new file mode 100755 index 0000000..e052b87 --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: bff-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/bff-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/bff-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..507c182 --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "bff-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "bff-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "bff-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "bff-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "bff-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/bff-app-k8s/templates/deployment.yaml b/charts/backend2/charts/bff-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..03b2cfd --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/templates/deployment.yaml @@ -0,0 +1,70 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "bff-app-k8s.fullname" . }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "bff-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "bff-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $envName, $serviceKey := .Values.env.grpcClients }} + - name: {{ $envName }} + value: {{ include "global.serviceUrl" (index $.Values.global.services $serviceKey) | quote }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/bff-app-k8s/templates/ingress.yaml b/charts/backend2/charts/bff-app-k8s/templates/ingress.yaml new file mode 100755 index 0000000..875979a --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/templates/ingress.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "bff-app-k8s.fullname" . }}-ingress + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + tls: + - hosts: + - {{ .Values.ingress.host | quote }} + secretName: {{ .Values.ingress.tlsSecret | quote }} + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: {{ .Values.ingress.path }} + pathType: {{ .Values.ingress.pathType }} + backend: + service: + name: {{ include "bff-app-k8s.fullname" . }} + port: + number: {{ .Values.service.port }} +{{- end }} diff --git a/charts/backend2/charts/bff-app-k8s/templates/pdb.yaml b/charts/backend2/charts/bff-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..9efdfad --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "bff-app-k8s.fullname" . }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "bff-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/bff-app-k8s/templates/service.yaml b/charts/backend2/charts/bff-app-k8s/templates/service.yaml new file mode 100755 index 0000000..d34140d --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "bff-app-k8s.fullname" . }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "bff-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/bff-app-k8s/values.yaml b/charts/backend2/charts/bff-app-k8s/values.yaml new file mode 100755 index 0000000..77860be --- /dev/null +++ b/charts/backend2/charts/bff-app-k8s/values.yaml @@ -0,0 +1,36 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +service: + type: ClusterIP + port: 8081 + targetPort: 8080 +ingress: + enabled: true + className: nginx + name: bff-app-ingress + host: api-p003.cw.ngcloud.ru + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: 'true' + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' + nginx.ingress.kubernetes.io/backend-protocol: HTTP + path: / + pathType: Prefix + tlsSecret: co-work-secret +env: + grpcClients: {} + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +resources: {} +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/bff-external-app-k8s/.helmignore b/charts/backend2/charts/bff-external-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/bff-external-app-k8s/Chart.yaml b/charts/backend2/charts/bff-external-app-k8s/Chart.yaml new file mode 100755 index 0000000..c80493e --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: bff-external-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/bff-external-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/bff-external-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..014582c --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "bff-external-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "bff-external-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "bff-external-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "bff-external-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "bff-external-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/bff-external-app-k8s/templates/deployment.yaml b/charts/backend2/charts/bff-external-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4526ab2 --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "bff-external-app-k8s.fullname" . }} + labels: + {{- include "bff-external-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "bff-external-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "bff-external-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "bff-external-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/bff-external-app-k8s/templates/ingress.yaml b/charts/backend2/charts/bff-external-app-k8s/templates/ingress.yaml new file mode 100755 index 0000000..2ebc289 --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/templates/ingress.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "bff-external-app-k8s.fullname" . }}-ingress + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + tls: + - hosts: + - {{ .Values.ingress.host | quote }} + secretName: {{ .Values.ingress.tlsSecret | quote }} + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: {{ .Values.ingress.path }} + pathType: {{ .Values.ingress.pathType }} + backend: + service: + name: {{ include "bff-external-app-k8s.fullname" . }} + port: + number: {{ .Values.service.port }} +{{- end }} diff --git a/charts/backend2/charts/bff-external-app-k8s/templates/pdb.yaml b/charts/backend2/charts/bff-external-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..9efdfad --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "bff-app-k8s.fullname" . }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "bff-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/bff-external-app-k8s/templates/service.yaml b/charts/backend2/charts/bff-external-app-k8s/templates/service.yaml new file mode 100755 index 0000000..d34140d --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "bff-app-k8s.fullname" . }} + labels: + {{- include "bff-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "bff-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/bff-external-app-k8s/values.yaml b/charts/backend2/charts/bff-external-app-k8s/values.yaml new file mode 100755 index 0000000..e12fcbb --- /dev/null +++ b/charts/backend2/charts/bff-external-app-k8s/values.yaml @@ -0,0 +1,37 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +service: + type: ClusterIP + port: 8080 + targetPort: 8080 +ingress: + enabled: true + className: nginx + name: bff-external-app-ingress + host: api-p003.cw.ngcloud.ru + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: 'true' + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' + nginx.ingress.kubernetes.io/backend-protocol: HTTP + path: /bff-external + pathType: Prefix + tlsSecret: co-work-secret +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] + services: + calendar_url: http://calendar-app:9090 +resources: {} +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/bff-vcs-app-k8s/.helmignore b/charts/backend2/charts/bff-vcs-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/bff-vcs-app-k8s/Chart.yaml b/charts/backend2/charts/bff-vcs-app-k8s/Chart.yaml new file mode 100755 index 0000000..fe1260b --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: bff-vcs-app +description: Helm chart for bff-vcs-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/bff-vcs-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/bff-vcs-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..5ce3356 --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "bff-vcs-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "bff-vcs-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "bff-vcs-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "bff-vcs-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "bff-vcs-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/bff-vcs-app-k8s/templates/deployment.yaml b/charts/backend2/charts/bff-vcs-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..6f22d0a --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/templates/deployment.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "bff-vcs-app.fullname" . }} + labels: + {{- include "bff-vcs-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "bff-vcs-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "bff-vcs-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "bff-vcs-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + + {{- range $envName, $serviceKey := .Values.env.grpcClients }} + - name: {{ $envName }} + value: {{ include "global.serviceUrl" (index $.Values.global.services $serviceKey) | quote }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/bff-vcs-app-k8s/templates/ingress.yaml b/charts/backend2/charts/bff-vcs-app-k8s/templates/ingress.yaml new file mode 100755 index 0000000..1393bb8 --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/templates/ingress.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "bff-vcs-app.fullname" . }}-ingress + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.ingressClassName }} + tls: + - hosts: + - {{ .Values.ingress.host | quote }} + secretName: {{ .Values.ingress.tlsSecretName | quote }} + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ include "bff-vcs-app.fullname" . }} + port: + number: {{ .Values.service.port }} +{{- end }} diff --git a/charts/backend2/charts/bff-vcs-app-k8s/templates/pdb.yaml b/charts/backend2/charts/bff-vcs-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..9ffb743 --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "bff-vcs-app.fullname" . }} + labels: + {{- include "bff-vcs-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "bff-vcs-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/bff-vcs-app-k8s/templates/service.yaml b/charts/backend2/charts/bff-vcs-app-k8s/templates/service.yaml new file mode 100755 index 0000000..8104236 --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "bff-vcs-app.fullname" . }} + labels: + {{- include "bff-vcs-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "bff-vcs-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/bff-vcs-app-k8s/values.yaml b/charts/backend2/charts/bff-vcs-app-k8s/values.yaml new file mode 100755 index 0000000..2932c8d --- /dev/null +++ b/charts/backend2/charts/bff-vcs-app-k8s/values.yaml @@ -0,0 +1,32 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + grpcClients: {} + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 8079 + targetPort: 8080 +ingress: + enabled: true + ingressClassName: nginx + host: vcs-p003.cw.ngcloud.ru + tlsSecretName: co-work-secret + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: 'true' + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' + nginx.ingress.kubernetes.io/backend-protocol: HTTP +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/.helmignore b/charts/backend2/charts/big-chat-splitter-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/Chart.yaml b/charts/backend2/charts/big-chat-splitter-app-k8s/Chart.yaml new file mode 100755 index 0000000..b4b8a96 --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: big-chat-splitter-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..053abcb --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "big-chat-splitter-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "big-chat-splitter-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "big-chat-splitter-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "big-chat-splitter-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "big-chat-splitter-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/templates/deployment.yaml b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4fdfaae --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "big-chat-splitter-app-k8s.fullname" . }} + labels: + {{- include "big-chat-splitter-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "big-chat-splitter-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "big-chat-splitter-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "big-chat-splitter-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/templates/pdb.yaml b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..04e6e32 --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "big-chat-splitter-app-k8s.fullname" . }} + labels: + {{- include "big-chat-splitter-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "big-chat-splitter-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/big-chat-splitter-app-k8s/values.yaml b/charts/backend2/charts/big-chat-splitter-app-k8s/values.yaml new file mode 100755 index 0000000..01adb15 --- /dev/null +++ b/charts/backend2/charts/big-chat-splitter-app-k8s/values.yaml @@ -0,0 +1,29 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] + services: + chat: + host: chat-app + port: 9090 + user: + host: user-app + port: 9090 +resources: {} +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/calendar-app-k8s/.helmignore b/charts/backend2/charts/calendar-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/calendar-app-k8s/Chart.yaml b/charts/backend2/charts/calendar-app-k8s/Chart.yaml new file mode 100755 index 0000000..7e303e6 --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: calendar-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/calendar-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/calendar-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..c006242 --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "calendar-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "calendar-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "calendar-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "calendar-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "calendar-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/calendar-app-k8s/templates/deployment.yaml b/charts/backend2/charts/calendar-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..2799420 --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "calendar-app-k8s.fullname" . }} + labels: + {{- include "calendar-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "calendar-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "calendar-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "calendar-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/calendar-app-k8s/templates/pdb.yaml b/charts/backend2/charts/calendar-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..017363e --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "calendar-app-k8s.fullname" . }} + labels: + {{- include "calendar-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "calendar-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/calendar-app-k8s/templates/service.yaml b/charts/backend2/charts/calendar-app-k8s/templates/service.yaml new file mode 100755 index 0000000..747dd66 --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "calendar-app-k8s.fullname" . }} + labels: + {{- include "calendar-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + protocol: TCP + {{- end }} + selector: + {{- include "calendar-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/calendar-app-k8s/values.yaml b/charts/backend2/charts/calendar-app-k8s/values.yaml new file mode 100755 index 0000000..b28cab2 --- /dev/null +++ b/charts/backend2/charts/calendar-app-k8s/values.yaml @@ -0,0 +1,27 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + targetPort: 9090 + containerPort: 9090 + ports: + - name: grpc + port: 9090 + containerPort: 9090 + targetPort: 9090 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/call-app-k8s/.helmignore b/charts/backend2/charts/call-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/call-app-k8s/Chart.yaml b/charts/backend2/charts/call-app-k8s/Chart.yaml new file mode 100755 index 0000000..2a3ebc1 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: call-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/call-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/call-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..6eb3687 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "call-app-k8s.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "call-app-k8s.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "call-app-k8s.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "call-app-k8s.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "call-app-k8s.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/call-app-k8s/templates/deployment.yaml b/charts/backend2/charts/call-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..237a2d8 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "call-app-k8s.fullname" . }} + labels: + {{- include "call-app-k8s.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "call-app-k8s.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "call-app-k8s.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "call-app-k8s.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/call-app-k8s/templates/pdb.yaml b/charts/backend2/charts/call-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..1e41369 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "call-app-k8s.fullname" . }} + labels: + {{- include "call-app-k8s.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "call-app-k8s.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/call-app-k8s/templates/service.yaml b/charts/backend2/charts/call-app-k8s/templates/service.yaml new file mode 100755 index 0000000..00fafc0 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "call-app-k8s.fullname" . }} + labels: + {{- include "call-app-k8s.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + protocol: TCP + {{- end }} + selector: + {{- include "call-app-k8s.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/call-app-k8s/values.yaml b/charts/backend2/charts/call-app-k8s/values.yaml new file mode 100755 index 0000000..ff09a44 --- /dev/null +++ b/charts/backend2/charts/call-app-k8s/values.yaml @@ -0,0 +1,38 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP + ports: + - name: main + port: 5005 + targetPort: 5005 + - name: metrics + port: 9090 + targetPort: 9090 +secrets: + livekit: + name: livekit-secret + apiKeyKey: api-key + secretKey: secret + recording: + name: recording-secret + accessKeyKey: access-key + secretKeyKey: secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/call-event-handler-app-k8s/.helmignore b/charts/backend2/charts/call-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/call-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/call-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..9962d92 --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: call-event-handler-app +description: Call Event Handler Application +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/call-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/call-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..be34c35 --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "call-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "call-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "call-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "call-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "call-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/call-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/call-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..51dd84c --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "call-event-handler-app.fullname" . }} + labels: + {{- include "call-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "call-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "call-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "call-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/call-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/call-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..2b0421b --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "call-event-handler-app.fullname" . }} + labels: + {{- include "call-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "call-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/call-event-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/call-event-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..5b8f95a --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "call-event-handler-app.fullname" . }} + labels: + {{- include "call-event-handler-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + protocol: TCP + {{- end }} + selector: + {{- include "call-event-handler-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/call-event-handler-app-k8s/values.yaml b/charts/backend2/charts/call-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..ac82a85 --- /dev/null +++ b/charts/backend2/charts/call-event-handler-app-k8s/values.yaml @@ -0,0 +1,34 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP + ports: + - name: main + port: 5005 + targetPort: 5005 + - name: metrics + port: 9090 + targetPort: 9090 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + livekit: + name: livekit-secret + apiKeyKey: api-key + secretKey: secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/call-realtime-app-k8s/.helmignore b/charts/backend2/charts/call-realtime-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/call-realtime-app-k8s/Chart.yaml b/charts/backend2/charts/call-realtime-app-k8s/Chart.yaml new file mode 100755 index 0000000..04280f0 --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: call-realtime-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/call-realtime-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/call-realtime-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..e42e8fb --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "call-realtime-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "call-realtime-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "call-realtime-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "call-realtime-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "call-realtime-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/call-realtime-app-k8s/templates/deployment.yaml b/charts/backend2/charts/call-realtime-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..817423d --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "call-realtime-app.fullname" . }} + labels: + {{- include "call-realtime-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "call-realtime-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "call-realtime-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "call-realtime-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/call-realtime-app-k8s/templates/pdb.yaml b/charts/backend2/charts/call-realtime-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..35f4df5 --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "call-realtime-app.fullname" . }} + labels: + {{- include "call-realtime-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "call-realtime-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/call-realtime-app-k8s/templates/service.yaml b/charts/backend2/charts/call-realtime-app-k8s/templates/service.yaml new file mode 100755 index 0000000..bdec4e8 --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "call-realtime-app.fullname" . }} + labels: + {{- include "call-realtime-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.service.ports }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + protocol: TCP + {{- end }} + selector: + {{- include "call-realtime-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/call-realtime-app-k8s/values.yaml b/charts/backend2/charts/call-realtime-app-k8s/values.yaml new file mode 100755 index 0000000..34efdfd --- /dev/null +++ b/charts/backend2/charts/call-realtime-app-k8s/values.yaml @@ -0,0 +1,38 @@ +image: + name: '' + tag: '' + pullPolicy: Always +replicaCount: 1 +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP + ports: + - name: main + port: 5096 + targetPort: 5005 + - name: metrics + port: 9090 + targetPort: 9090 +secrets: + livekit: + name: livekit-secret + apiKeyKey: api-key + secretKey: secret + recording: + name: recording-secret + accessKeyKey: access-key + secretKey: secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/chat-app-k8s/.helmignore b/charts/backend2/charts/chat-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/chat-app-k8s/Chart.yaml b/charts/backend2/charts/chat-app-k8s/Chart.yaml new file mode 100755 index 0000000..97af1b0 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: chat-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/chat-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/chat-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..014f621 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "chat-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "chat-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "chat-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "chat-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "chat-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/chat-app-k8s/templates/deployment.yaml b/charts/backend2/charts/chat-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..05d4846 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chat-app.fullname" . }} + labels: + {{- include "chat-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "chat-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "chat-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "chat-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/chat-app-k8s/templates/pdb.yaml b/charts/backend2/charts/chat-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..05b2250 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "chat-app.fullname" . }} + labels: + {{- include "chat-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "chat-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/chat-app-k8s/templates/service.yaml b/charts/backend2/charts/chat-app-k8s/templates/service.yaml new file mode 100755 index 0000000..9689fb8 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chat-app.fullname" . }} + labels: + {{- include "chat-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + - name: debug + port: 5005 + targetPort: 5005 + protocol: TCP + selector: + {{- include "chat-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/chat-app-k8s/values.yaml b/charts/backend2/charts/chat-app-k8s/values.yaml new file mode 100755 index 0000000..cce31c9 --- /dev/null +++ b/charts/backend2/charts/chat-app-k8s/values.yaml @@ -0,0 +1,31 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + livekit: + name: "" + apiKeyKey: "" + secretKey: "" + recording: + name: "" + accessKeyKey: "" + secretKey: "" +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/.helmignore b/charts/backend2/charts/chat-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/chat-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..b66959b --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: chat-event-handler-app +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/chat-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..296be34 --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "chat-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "chat-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "chat-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "chat-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "chat-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/chat-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..1a6ebd8 --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,78 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chat-event-handler-app.fullname" . }} + labels: + {{- include "chat-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "chat-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "chat-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "chat-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/chat-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..7ee7f28 --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "chat-event-handler-app.fullname" . }} + labels: + {{- include "chat-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "chat-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/chat-event-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..cccfd79 --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chat-event-handler-app.fullname" . }} + labels: + {{- include "chat-event-handler-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "chat-event-handler-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/chat-event-handler-app-k8s/values.yaml b/charts/backend2/charts/chat-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..5a47d80 --- /dev/null +++ b/charts/backend2/charts/chat-event-handler-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP diff --git a/charts/backend2/charts/config-app-k8s/.helmignore b/charts/backend2/charts/config-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/config-app-k8s/Chart.yaml b/charts/backend2/charts/config-app-k8s/Chart.yaml new file mode 100755 index 0000000..764e855 --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: config-app +description: Helm chart for Config App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/config-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/config-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..d513ae0 --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "config-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "config-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "config-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "config-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "config-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/config-app-k8s/templates/deployment.yaml b/charts/backend2/charts/config-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..d6f8dbb --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "config-app.fullname" . }} + labels: + {{- include "config-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "config-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "config-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "config-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.grpcPort }} + name: {{ .Values.service.grpcPortName | default "grpc" }} + protocol: TCP + - containerPort: {{ .Values.service.httpPort }} + name: {{ .Values.service.httpPortName | default "http" }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/config-app-k8s/templates/pdb.yaml b/charts/backend2/charts/config-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..31e7a70 --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "config-app.fullname" . }} + labels: + {{- include "config-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "config-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/config-app-k8s/templates/service.yaml b/charts/backend2/charts/config-app-k8s/templates/service.yaml new file mode 100755 index 0000000..fd7610d --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "config-app.fullname" . }} + labels: + {{- include "config-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + - name: http + port: 8080 + targetPort: 8080 + protocol: TCP + selector: + {{- include "config-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/config-app-k8s/values.yaml b/charts/backend2/charts/config-app-k8s/values.yaml new file mode 100755 index 0000000..b8fe6b3 --- /dev/null +++ b/charts/backend2/charts/config-app-k8s/values.yaml @@ -0,0 +1,28 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] + postgres: + url: jdbc:postgresql://postgresql:5432/config + username: postgres + swagger: + host: localhost + port: 8080 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + grpcPort: 9090 + httpPort: 8080 + type: ClusterIP diff --git a/charts/backend2/charts/cw-common/Chart.yaml b/charts/backend2/charts/cw-common/Chart.yaml new file mode 100644 index 0000000..06e8013 --- /dev/null +++ b/charts/backend2/charts/cw-common/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: cw-common +description: Common library chart for CW backend microservices +type: library +version: 0.1.0 diff --git a/charts/backend2/charts/cw-common/templates/_helpers.tpl b/charts/backend2/charts/cw-common/templates/_helpers.tpl new file mode 100644 index 0000000..bf72d1f --- /dev/null +++ b/charts/backend2/charts/cw-common/templates/_helpers.tpl @@ -0,0 +1,168 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "cw-common.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "cw-common.fullname" -}} +{{- default .Chart.Name .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cw-common.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "cw-common.labels" -}} +helm.sh/chart: {{ include "cw-common.chart" . }} +{{ include "cw-common.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "cw-common.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cw-common.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Image string helper +*/}} +{{- define "cw-common.image" -}} +{{- $prefix := .Values.global.dockerRegistryPrefix | default "" -}} +{{- $name := .Values.image.name -}} +{{- if .Values.image.digest }} +{{- printf "%s%s@%s" $prefix $name .Values.image.digest -}} +{{- else }} +{{- printf "%s%s:%s" $prefix $name .Values.image.tag -}} +{{- end }} +{{- end }} + +{{/* +Init container for importing CA certificate (idempotent) +*/}} +{{- define "cw-common.initContainer.importCA" -}} +- name: import-ca + image: {{ include "cw-common.image" . }} + env: + - name: CERT_ALIAS + value: {{ .Values.global.cert_alias | quote }} + volumeMounts: + - name: ca-cert + mountPath: /app/resources + - name: cacerts-volume + mountPath: /tmp/cacerts + command: + - sh + - -c + - | + cp /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts /tmp/cacerts/cacerts + if keytool -list -keystore /tmp/cacerts/cacerts -storepass changeit -alias gemcert > /dev/null 2>&1; then + echo "Certificate with alias gemcert already exists, skipping import" + else + echo "Importing certificate with alias gemcert" + keytool -import -trustcacerts -storepass changeit -noprompt \ + -alias gemcert \ + -file /app/resources/RootCA_${CERT_ALIAS}.crt \ + -keystore /tmp/cacerts/cacerts + fi +{{- end }} + +{{/* +Volumes for CA certificate +*/}} +{{- define "cw-common.volumes.cacerts" -}} +- name: ca-cert + configMap: + name: auth-app-ca-cert + items: + - key: RootCA_{{ .Values.global.cert_alias }}.crt + path: RootCA_{{ .Values.global.cert_alias }}.crt +- name: cacerts-volume + emptyDir: {} +{{- end }} + +{{/* +Volume mounts for CA certificate (main container) +*/}} +{{- define "cw-common.volumeMounts.cacerts" -}} +- name: cacerts-volume + mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts + subPath: cacerts +{{- end }} + +{{/* +Resources with fallback to global defaults +*/}} +{{- define "cw-common.resources" -}} +{{- if .Values.resources }} +{{- toYaml .Values.resources }} +{{- else if and .Values.global .Values.global.defaults .Values.global.defaults.resources }} +{{- toYaml .Values.global.defaults.resources }} +{{- else }} +requests: + memory: 256Mi +limits: + memory: 512Mi +{{- end }} +{{- end }} + +{{/* +Liveness probe with fallback to global defaults +*/}} +{{- define "cw-common.livenessProbe" -}} +{{- if .Values.livenessProbe }} +{{- toYaml .Values.livenessProbe }} +{{- else if and .Values.global .Values.global.defaults .Values.global.defaults.livenessProbe }} +{{- toYaml .Values.global.defaults.livenessProbe }} +{{- end }} +{{- end }} + +{{/* +Readiness probe with fallback to global defaults +*/}} +{{- define "cw-common.readinessProbe" -}} +{{- if .Values.readinessProbe }} +{{- toYaml .Values.readinessProbe }} +{{- else if and .Values.global .Values.global.defaults .Values.global.defaults.readinessProbe }} +{{- toYaml .Values.global.defaults.readinessProbe }} +{{- end }} +{{- end }} + +{{/* +PodDisruptionBudget template +*/}} +{{- define "cw-common.pdb" -}} +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "cw-common.fullname" . }} + labels: + {{- include "cw-common.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "cw-common.selectorLabels" . | nindent 6 }} +{{- end }} +{{- end }} diff --git a/charts/backend2/charts/deeplink-app-k8s/.helmignore b/charts/backend2/charts/deeplink-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/deeplink-app-k8s/Chart.yaml b/charts/backend2/charts/deeplink-app-k8s/Chart.yaml new file mode 100755 index 0000000..4395126 --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: deeplink-app +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/deeplink-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/deeplink-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..2974205 --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "deeplink-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "deeplink-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "deeplink-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "deeplink-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "deeplink-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/deeplink-app-k8s/templates/deployment.yaml b/charts/backend2/charts/deeplink-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..94f97fe --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "deeplink-app.fullname" . }} + labels: + {{- include "deeplink-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "deeplink-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "deeplink-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "deeplink-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/deeplink-app-k8s/templates/pdb.yaml b/charts/backend2/charts/deeplink-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..0026b66 --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "deeplink-app.fullname" . }} + labels: + {{- include "deeplink-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "deeplink-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/deeplink-app-k8s/templates/service.yaml b/charts/backend2/charts/deeplink-app-k8s/templates/service.yaml new file mode 100755 index 0000000..c0cd134 --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "deeplink-app.fullname" . }} + labels: + {{- include "deeplink-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "deeplink-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/deeplink-app-k8s/values.yaml b/charts/backend2/charts/deeplink-app-k8s/values.yaml new file mode 100755 index 0000000..1616e29 --- /dev/null +++ b/charts/backend2/charts/deeplink-app-k8s/values.yaml @@ -0,0 +1,24 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 9090 + targetPort: 9090 +secrets: + branchio: deeplink-secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/device-app-k8s/.helmignore b/charts/backend2/charts/device-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/device-app-k8s/Chart.yaml b/charts/backend2/charts/device-app-k8s/Chart.yaml new file mode 100755 index 0000000..5e274d8 --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: device-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/device-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/device-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..c48971d --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "device-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "device-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "device-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "device-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "device-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/device-app-k8s/templates/deployment.yaml b/charts/backend2/charts/device-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..94b7ad2 --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/templates/deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "device-app.fullname" . }} + labels: + {{- include "device-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "device-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "device-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "device-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + name: {{ .Values.service.portName | default "grpc" }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/device-app-k8s/templates/pdb.yaml b/charts/backend2/charts/device-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..45882ca --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "device-app.fullname" . }} + labels: + {{- include "device-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "device-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/device-app-k8s/templates/service.yaml b/charts/backend2/charts/device-app-k8s/templates/service.yaml new file mode 100755 index 0000000..f63f6cb --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "device-app.fullname" . }} + labels: + {{- include "device-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "device-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/device-app-k8s/values.yaml b/charts/backend2/charts/device-app-k8s/values.yaml new file mode 100755 index 0000000..f92d674 --- /dev/null +++ b/charts/backend2/charts/device-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + postgres_url: "" + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/dictionary-app-k8s/.helmignore b/charts/backend2/charts/dictionary-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/dictionary-app-k8s/Chart.yaml b/charts/backend2/charts/dictionary-app-k8s/Chart.yaml new file mode 100755 index 0000000..1296f73 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: dictionary-app +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/dictionary-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/dictionary-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..52d58a5 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "dictionary-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "dictionary-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "dictionary-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "dictionary-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "dictionary-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/dictionary-app-k8s/templates/deployment.yaml b/charts/backend2/charts/dictionary-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4035f38 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "dictionary-app.fullname" . }} + labels: + {{- include "dictionary-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "dictionary-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "dictionary-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "dictionary-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/dictionary-app-k8s/templates/pdb.yaml b/charts/backend2/charts/dictionary-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..048bb36 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "dictionary-app.fullname" . }} + labels: + {{- include "dictionary-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "dictionary-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/dictionary-app-k8s/templates/service.yaml b/charts/backend2/charts/dictionary-app-k8s/templates/service.yaml new file mode 100755 index 0000000..999dba0 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "dictionary-app.fullname" . }} + labels: + {{- include "dictionary-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "dictionary-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/dictionary-app-k8s/values.yaml b/charts/backend2/charts/dictionary-app-k8s/values.yaml new file mode 100755 index 0000000..f2506d2 --- /dev/null +++ b/charts/backend2/charts/dictionary-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + type: ClusterIP + port: 9090 + targetPort: 9090 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/gem-call-app-k8s/.helmignore b/charts/backend2/charts/gem-call-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/gem-call-app-k8s/Chart.yaml b/charts/backend2/charts/gem-call-app-k8s/Chart.yaml new file mode 100755 index 0000000..fa5086a --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: gem-call-app +description: A Helm chart for gem-call-app + +type: application + +version: 0.1.0 +appVersion: "1.0.0" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/gem-call-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/gem-call-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..1dcf8ba --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "gem-call-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "gem-call-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "gem-call-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "gem-call-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "gem-call-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/gem-call-app-k8s/templates/deployment.yaml b/charts/backend2/charts/gem-call-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..a606035 --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "gem-call-app.fullname" . }} + labels: + {{- include "gem-call-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "gem-call-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "gem-call-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "gem-call-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + {{- if .Values.service.debugPort }} + - containerPort: {{ .Values.service.debugPort }} + protocol: TCP + {{- end }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/gem-call-app-k8s/templates/pdb.yaml b/charts/backend2/charts/gem-call-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..0360b09 --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "gem-call-app.fullname" . }} + labels: + {{- include "gem-call-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "gem-call-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/gem-call-app-k8s/templates/service.yaml b/charts/backend2/charts/gem-call-app-k8s/templates/service.yaml new file mode 100755 index 0000000..5efd41c --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "gem-call-app.fullname" . }} + labels: + {{- include "gem-call-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + - name: debug + port: 5005 + targetPort: 5005 + protocol: TCP + selector: + {{- include "gem-call-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/gem-call-app-k8s/values.yaml b/charts/backend2/charts/gem-call-app-k8s/values.yaml new file mode 100755 index 0000000..4038e71 --- /dev/null +++ b/charts/backend2/charts/gem-call-app-k8s/values.yaml @@ -0,0 +1,23 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + cert_alias: nubes + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + debugPort: 5005 + type: ClusterIP diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/.helmignore b/charts/backend2/charts/gem-call-events-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/Chart.yaml b/charts/backend2/charts/gem-call-events-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..efab350 --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: gem-call-events-handler-app +description: A Helm chart for gem-call-events-handler-app + +type: application + +version: 0.1.0 +appVersion: "1.0.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..a0cc60c --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "gem-call-events-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "gem-call-events-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "gem-call-events-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "gem-call-events-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "gem-call-events-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..bcceb48 --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "gem-call-events-handler-app.fullname" . }} + labels: + {{- include "gem-call-events-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "gem-call-events-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "gem-call-events-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "gem-call-events-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..3e3fcce --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "gem-call-events-handler-app.fullname" . }} + labels: + {{- include "gem-call-events-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "gem-call-events-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..f2d01fc --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "gem-call-events-handler-app.fullname" . }} + labels: + {{- include "gem-call-events-handler-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + - name: debug + port: 5005 + targetPort: 5005 + protocol: TCP + selector: + {{- include "gem-call-events-handler-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/gem-call-events-handler-app-k8s/values.yaml b/charts/backend2/charts/gem-call-events-handler-app-k8s/values.yaml new file mode 100755 index 0000000..88fb7d1 --- /dev/null +++ b/charts/backend2/charts/gem-call-events-handler-app-k8s/values.yaml @@ -0,0 +1,25 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +chat: + host: chat-app + port: '9090' +additionalEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/huawei-app-k8s/.helmignore b/charts/backend2/charts/huawei-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/huawei-app-k8s/Chart.yaml b/charts/backend2/charts/huawei-app-k8s/Chart.yaml new file mode 100755 index 0000000..0ab30a6 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: huawei-app +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/huawei-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/huawei-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..b7201b9 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "huawei-sender-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "huawei-sender-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "huawei-sender-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "huawei-sender-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "huawei-sender-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/huawei-app-k8s/templates/deployment.yaml b/charts/backend2/charts/huawei-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..3de84d9 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "huawei-sender-app.fullname" . }} + labels: + {{- include "huawei-sender-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "huawei-sender-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "huawei-sender-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "huawei-sender-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/huawei-app-k8s/templates/pdb.yaml b/charts/backend2/charts/huawei-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..5afd884 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "huawei-sender-app.fullname" . }} + labels: + {{- include "huawei-sender-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "huawei-sender-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/huawei-app-k8s/templates/service.yaml b/charts/backend2/charts/huawei-app-k8s/templates/service.yaml new file mode 100755 index 0000000..9f10fc0 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "huawei-sender-app.fullname" . }} + labels: + {{- include "huawei-sender-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "huawei-sender-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/huawei-app-k8s/values.yaml b/charts/backend2/charts/huawei-app-k8s/values.yaml new file mode 100755 index 0000000..17250f4 --- /dev/null +++ b/charts/backend2/charts/huawei-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/ios-app-k8s/.helmignore b/charts/backend2/charts/ios-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/ios-app-k8s/Chart.yaml b/charts/backend2/charts/ios-app-k8s/Chart.yaml new file mode 100755 index 0000000..aaa4959 --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: ios-app +description: Helm chart for iOS sender app +type: application +version: 0.1.0 +appVersion: "1.0.0" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/ios-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/ios-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..561f636 --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "ios-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "ios-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "ios-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "ios-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "ios-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/ios-app-k8s/templates/deployment.yaml b/charts/backend2/charts/ios-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..d4633ed --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ios-app.fullname" . }} + labels: + {{- include "ios-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "ios-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ios-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "ios-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/ios-app-k8s/templates/pdb.yaml b/charts/backend2/charts/ios-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..d3a0f5d --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "ios-app.fullname" . }} + labels: + {{- include "ios-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "ios-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/ios-app-k8s/values.yaml b/charts/backend2/charts/ios-app-k8s/values.yaml new file mode 100755 index 0000000..7be1cf0 --- /dev/null +++ b/charts/backend2/charts/ios-app-k8s/values.yaml @@ -0,0 +1,28 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + IOS_VOIP_FILE: voip_cowork.p12 + IOS_VOIP_PASSWORD: NL8dA1yDYzcdSX + IOS_VOIP_TOPIC: ru.cowork.voip + IOS_MESSAGE_FILE: apns_cowork.p12 + IOS_MESSAGE_PASSWORD: zlupd9CktYMDT + IOS_MESSAGE_TOPIC: ru.cowork + IOS_SENDER_PROD: 'true' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/license-app-k8s/.helmignore b/charts/backend2/charts/license-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/license-app-k8s/Chart.yaml b/charts/backend2/charts/license-app-k8s/Chart.yaml new file mode 100755 index 0000000..753bb62 --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: license-app +description: Helm chart for License App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/license-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/license-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..72a2a65 --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "license-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "license-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "license-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "license-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "license-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/license-app-k8s/templates/deployment.yaml b/charts/backend2/charts/license-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..0917fea --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/templates/deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "license-app.fullname" . }} + labels: + {{- include "license-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "license-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "license-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "license-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.httpPort }} + name: {{ .Values.service.httpPortName | default "http" }} + protocol: TCP + - containerPort: {{ .Values.service.grpcPort }} + name: {{ .Values.service.grpcPortName | default "grpc" }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/license-app-k8s/templates/pdb.yaml b/charts/backend2/charts/license-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..b1d06ed --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "license-app.fullname" . }} + labels: + {{- include "license-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "license-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/license-app-k8s/templates/service.yaml b/charts/backend2/charts/license-app-k8s/templates/service.yaml new file mode 100755 index 0000000..c2dfb83 --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "license-app.fullname" . }} + labels: + {{- include "license-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: http + port: 8080 + targetPort: 8080 + protocol: TCP + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "license-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/license-app-k8s/values.yaml b/charts/backend2/charts/license-app-k8s/values.yaml new file mode 100755 index 0000000..532e538 --- /dev/null +++ b/charts/backend2/charts/license-app-k8s/values.yaml @@ -0,0 +1,23 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +env: + postgres_url: "" + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +pdb: + enabled: false +service: + httpPort: 8080 + grpcPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/.helmignore b/charts/backend2/charts/livekit-webhook-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/Chart.yaml b/charts/backend2/charts/livekit-webhook-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..ecd751c --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: livekit-webhook-handler-app +description: A Helm chart for deploying livekit-webhook-handler-app +version: 0.1.0 +appVersion: "1.0.0" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..d8bf689 --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "livekit-webhook-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "livekit-webhook-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "livekit-webhook-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "livekit-webhook-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "livekit-webhook-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..f37634c --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "livekit-webhook-handler-app.fullname" . }} + labels: + {{- include "livekit-webhook-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "livekit-webhook-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "livekit-webhook-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "livekit-webhook-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..12c4d30 --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "livekit-webhook-handler-app.fullname" . }} + labels: + {{- include "livekit-webhook-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "livekit-webhook-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..cf7e9f9 --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "livekit-webhook-handler-app.fullname" . }} + labels: + {{- include "livekit-webhook-handler-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: http + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + {{- if eq (toString (.Values.service.type | default "ClusterIP")) "NodePort" }} + nodePort: {{ .Values.global.livekit_webhook_nodeport }} + {{- end }} + protocol: TCP + selector: + {{- include "livekit-webhook-handler-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/livekit-webhook-handler-app-k8s/values.yaml b/charts/backend2/charts/livekit-webhook-handler-app-k8s/values.yaml new file mode 100755 index 0000000..61427a0 --- /dev/null +++ b/charts/backend2/charts/livekit-webhook-handler-app-k8s/values.yaml @@ -0,0 +1,27 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + port: 5098 + targetPort: 8080 + type: NodePort +secrets: + livekit: + name: "" + apiKeyKey: "" + secretKey: "" +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/message-app-k8s/.helmignore b/charts/backend2/charts/message-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-app-k8s/Chart.yaml b/charts/backend2/charts/message-app-k8s/Chart.yaml new file mode 100755 index 0000000..f403d5f --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: message-app +description: A Helm chart for deploying the message-app +version: 0.1.0 +appVersion: "1.0.0" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..0baefbd --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..36993e9 --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-app.fullname" . }} + labels: + {{- include "message-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..ed125fa --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-app.fullname" . }} + labels: + {{- include "message-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-app-k8s/templates/service.yaml b/charts/backend2/charts/message-app-k8s/templates/service.yaml new file mode 100755 index 0000000..873d599 --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "message-app.fullname" . }} + labels: + {{- include "message-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "message-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/message-app-k8s/values.yaml b/charts/backend2/charts/message-app-k8s/values.yaml new file mode 100755 index 0000000..5f8c417 --- /dev/null +++ b/charts/backend2/charts/message-app-k8s/values.yaml @@ -0,0 +1,45 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + chat: + host: chat-app + port: '9090' + deeplink: + host: deeplink-app + port: '9090' + search: + host: search-app + port: '9090' + sticker: + host: sticker-app + port: '9090' + upload: + host: upload-app + port: '9090' + user: + host: user-app + port: '9090' + keyspace: messages + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + livekit: + name: livekit-secret + apiKeyKey: api-key + secretKey: secret +service: + port: 9090 + targetPort: 9090 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/.helmignore b/charts/backend2/charts/message-call-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/message-call-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..3f79e9d --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: message-call-event-handler-app +description: A Helm chart for deploying the message-call-event-handler-app +version: 0.1.0 +appVersion: "1.0.0" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..446fe63 --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-call-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-call-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-call-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-call-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-call-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..68cc1f0 --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-call-event-handler-app.fullname" . }} + labels: + {{- include "message-call-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-call-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-call-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-call-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..62f500f --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-call-event-handler-app.fullname" . }} + labels: + {{- include "message-call-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-call-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-call-event-handler-app-k8s/values.yaml b/charts/backend2/charts/message-call-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..57062f9 --- /dev/null +++ b/charts/backend2/charts/message-call-event-handler-app-k8s/values.yaml @@ -0,0 +1,36 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: messages + chat: + host: chat-app + port: '9090' + upload: + host: upload-app + port: '9090' + user: + host: user-app + port: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + livekit: + name: "" + apiKeyKey: "" + secretKey: "" +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/.helmignore b/charts/backend2/charts/message-chat-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/message-chat-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..03c8c95 --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: message-chat-event-handler-app +description: A Helm chart for deploying message-chat-event-handler-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..9b78dbb --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-chat-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-chat-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-chat-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-chat-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-chat-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..334bf7e --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-chat-event-handler-app.fullname" . }} + labels: + {{- include "message-chat-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-chat-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-chat-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-chat-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..164ac52 --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-chat-event-handler-app.fullname" . }} + labels: + {{- include "message-chat-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-chat-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-chat-event-handler-app-k8s/values.yaml b/charts/backend2/charts/message-chat-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..7be7596 --- /dev/null +++ b/charts/backend2/charts/message-chat-event-handler-app-k8s/values.yaml @@ -0,0 +1,31 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: messages + chat: + host: chat-app + port: '9090' + upload: + host: upload-app + port: '9090' + user: + host: user-app + port: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/message-event-handler-app-k8s/.helmignore b/charts/backend2/charts/message-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/message-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..13485e8 --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: message-event-handler-app +description: A Helm chart for the message-event-handler-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..c10d83f --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..3c92dec --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-event-handler-app.fullname" . }} + labels: + {{- include "message-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..2c45a6a --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-event-handler-app.fullname" . }} + labels: + {{- include "message-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-event-handler-app-k8s/values.yaml b/charts/backend2/charts/message-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..e3b50a9 --- /dev/null +++ b/charts/backend2/charts/message-event-handler-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: messages + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/.helmignore b/charts/backend2/charts/message-link-preview-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/Chart.yaml b/charts/backend2/charts/message-link-preview-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..7957f49 --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: message-link-preview-handler-app +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.0 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..579e348 --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-link-preview-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-link-preview-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-link-preview-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-link-preview-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-link-preview-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..050c82f --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-link-preview-handler-app.fullname" . }} + labels: + {{- include "message-link-preview-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-link-preview-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-link-preview-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-link-preview-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..b092405 --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-link-preview-handler-app.fullname" . }} + labels: + {{- include "message-link-preview-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-link-preview-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-link-preview-handler-app-k8s/values.yaml b/charts/backend2/charts/message-link-preview-handler-app-k8s/values.yaml new file mode 100755 index 0000000..376f125 --- /dev/null +++ b/charts/backend2/charts/message-link-preview-handler-app-k8s/values.yaml @@ -0,0 +1,25 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + upload: + host: upload-app + port: '9090' + keyspace: messages + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/.helmignore b/charts/backend2/charts/message-user-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/message-user-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..aee219f --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: message-user-event-handler-app +description: A Helm chart for the message-event-handler-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..6cf36a4 --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "message-user-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "message-user-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "message-user-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "message-user-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "message-user-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..aacf404 --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "message-user-event-handler-app.fullname" . }} + labels: + {{- include "message-user-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "message-user-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "message-user-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "message-user-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..72db801 --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "message-user-event-handler-app.fullname" . }} + labels: + {{- include "message-user-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "message-user-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/message-user-event-handler-app-k8s/values.yaml b/charts/backend2/charts/message-user-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..e3b50a9 --- /dev/null +++ b/charts/backend2/charts/message-user-event-handler-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: messages + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/notification-app-k8s/.helmignore b/charts/backend2/charts/notification-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/notification-app-k8s/Chart.yaml b/charts/backend2/charts/notification-app-k8s/Chart.yaml new file mode 100755 index 0000000..a209a6c --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: notification-app +description: Helm chart for notification-app +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/notification-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/notification-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..aa62446 --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "notification-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "notification-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "notification-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "notification-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "notification-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/notification-app-k8s/templates/deployment.yaml b/charts/backend2/charts/notification-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..8f1ed08 --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "notification-app.fullname" . }} + labels: + {{- include "notification-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "notification-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "notification-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "notification-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/notification-app-k8s/templates/pdb.yaml b/charts/backend2/charts/notification-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..2f4e73b --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "notification-app.fullname" . }} + labels: + {{- include "notification-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "notification-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/notification-app-k8s/templates/service.yaml b/charts/backend2/charts/notification-app-k8s/templates/service.yaml new file mode 100755 index 0000000..4b0c964 --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "notification-app.fullname" . }} + labels: + {{- include "notification-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + selector: + {{- include "notification-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/notification-app-k8s/values.yaml b/charts/backend2/charts/notification-app-k8s/values.yaml new file mode 100755 index 0000000..5797683 --- /dev/null +++ b/charts/backend2/charts/notification-app-k8s/values.yaml @@ -0,0 +1,23 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + cassandra: + keyspace: notifications + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +service: + port: 9090 + targetPort: 9090 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/.helmignore b/charts/backend2/charts/notification-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/notification-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..ceb4024 --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: notification-event-handler-app +description: Helm chart for Notification Event Handler App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/notification-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..6554897 --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "notification-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "notification-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "notification-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "notification-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "notification-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/notification-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..f7f3509 --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "notification-event-handler-app.fullname" . }} + labels: + {{- include "notification-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "notification-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "notification-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "notification-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/notification-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..ee72b56 --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "notification-event-handler-app.fullname" . }} + labels: + {{- include "notification-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "notification-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/notification-event-handler-app-k8s/values.yaml b/charts/backend2/charts/notification-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..b202dae --- /dev/null +++ b/charts/backend2/charts/notification-event-handler-app-k8s/values.yaml @@ -0,0 +1,27 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + chat: + host: chat-app + port: '9090' + user: + host: user-app + port: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/realtime-app-k8s/.helmignore b/charts/backend2/charts/realtime-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/realtime-app-k8s/Chart.yaml b/charts/backend2/charts/realtime-app-k8s/Chart.yaml new file mode 100755 index 0000000..5415382 --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: realtime-app +description: Helm chart for Realtime App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/realtime-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/realtime-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..b2ff40e --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "realtime-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "realtime-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "realtime-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "realtime-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "realtime-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/realtime-app-k8s/templates/deployment.yaml b/charts/backend2/charts/realtime-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..2268bd3 --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/templates/deployment.yaml @@ -0,0 +1,79 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "realtime-app.fullname" . }} + labels: + {{- include "realtime-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "realtime-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "realtime-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "realtime-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + {{- range .Values.ports }} + - name: {{ .name }} + containerPort: {{ .containerPort }} + protocol: TCP + {{- end }} + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/realtime-app-k8s/templates/pdb.yaml b/charts/backend2/charts/realtime-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..dffe172 --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "realtime-app.fullname" . }} + labels: + {{- include "realtime-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "realtime-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/realtime-app-k8s/templates/service.yaml b/charts/backend2/charts/realtime-app-k8s/templates/service.yaml new file mode 100755 index 0000000..e9a4c4c --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "realtime-app.fullname" . }} + labels: + {{- include "realtime-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.ports }} + - name: {{ .name }} + port: {{ .servicePort }} + targetPort: {{ .containerPort }} + protocol: TCP + {{- end }} + selector: + {{- include "realtime-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/realtime-app-k8s/values.yaml b/charts/backend2/charts/realtime-app-k8s/values.yaml new file mode 100755 index 0000000..ad52495 --- /dev/null +++ b/charts/backend2/charts/realtime-app-k8s/values.yaml @@ -0,0 +1,43 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + services: + chat: + host: chat-app + port: '9090' + message: + host: message-app + port: '9090' + gemCall: + host: gem-call-app + port: '9090' + user: + host: user-app + port: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +ports: +- name: app + containerPort: 9090 + servicePort: 9090 +- name: debug + containerPort: 5005 + servicePort: 5091 +- name: metrics + containerPort: 9999 + servicePort: 9999 +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/.helmignore b/charts/backend2/charts/regular-chat-splitter-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/Chart.yaml b/charts/backend2/charts/regular-chat-splitter-app-k8s/Chart.yaml new file mode 100755 index 0000000..9ffee6b --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: regular-chat-splitter-app +description: Helm chart for Regular Chat Splitter App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..bf65b78 --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "regular-chat-splitter-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "regular-chat-splitter-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "regular-chat-splitter-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "regular-chat-splitter-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "regular-chat-splitter-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/deployment.yaml b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4990356 --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "regular-chat-splitter-app.fullname" . }} + labels: + {{- include "regular-chat-splitter-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "regular-chat-splitter-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "regular-chat-splitter-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "regular-chat-splitter-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/pdb.yaml b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..8a55284 --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "regular-chat-splitter-app.fullname" . }} + labels: + {{- include "regular-chat-splitter-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "regular-chat-splitter-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/regular-chat-splitter-app-k8s/values.yaml b/charts/backend2/charts/regular-chat-splitter-app-k8s/values.yaml new file mode 100755 index 0000000..b202dae --- /dev/null +++ b/charts/backend2/charts/regular-chat-splitter-app-k8s/values.yaml @@ -0,0 +1,27 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + chat: + host: chat-app + port: '9090' + user: + host: user-app + port: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/search-app-k8s/.helmignore b/charts/backend2/charts/search-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/search-app-k8s/Chart.yaml b/charts/backend2/charts/search-app-k8s/Chart.yaml new file mode 100755 index 0000000..e0966e6 --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: search-app +description: Helm chart for Search App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/search-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/search-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..602332f --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "search-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "search-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "search-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "search-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "search-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/search-app-k8s/templates/deployment.yaml b/charts/backend2/charts/search-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..8f6eb65 --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "search-app.fullname" . }} + labels: + {{- include "search-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "search-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "search-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "search-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/search-app-k8s/templates/pdb.yaml b/charts/backend2/charts/search-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..bb55a77 --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "search-app.fullname" . }} + labels: + {{- include "search-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "search-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/search-app-k8s/templates/service.yaml b/charts/backend2/charts/search-app-k8s/templates/service.yaml new file mode 100755 index 0000000..434a328 --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "search-app.fullname" . }} + labels: + {{- include "search-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "search-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/search-app-k8s/values.yaml b/charts/backend2/charts/search-app-k8s/values.yaml new file mode 100755 index 0000000..f92d674 --- /dev/null +++ b/charts/backend2/charts/search-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + postgres_url: "" + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/search-event-handler-app-k8s/.helmignore b/charts/backend2/charts/search-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/search-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/search-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..9af2bdc --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: search-event-handler-app +description: Helm chart for Search Event Handler App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/search-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/search-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..ec953a3 --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "search-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "search-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "search-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "search-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "search-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/search-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/search-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..926c19b --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "search-event-handler-app.fullname" . }} + labels: + {{- include "search-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "search-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "search-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "search-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/search-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/search-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..ad2912f --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "search-event-handler-app.fullname" . }} + labels: + {{- include "search-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "search-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/search-event-handler-app-k8s/values.yaml b/charts/backend2/charts/search-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..5dcbcb2 --- /dev/null +++ b/charts/backend2/charts/search-event-handler-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/sticker-app-k8s/.helmignore b/charts/backend2/charts/sticker-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/sticker-app-k8s/Chart.yaml b/charts/backend2/charts/sticker-app-k8s/Chart.yaml new file mode 100755 index 0000000..c2ef98a --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: sticker-app +description: Helm chart for Sticker App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/sticker-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/sticker-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..1496fe6 --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "sticker-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "sticker-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "sticker-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "sticker-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "sticker-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/sticker-app-k8s/templates/deployment.yaml b/charts/backend2/charts/sticker-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..f61d1f9 --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sticker-app.fullname" . }} + labels: + {{- include "sticker-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "sticker-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "sticker-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "sticker-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/sticker-app-k8s/templates/pdb.yaml b/charts/backend2/charts/sticker-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..8d151e8 --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "sticker-app.fullname" . }} + labels: + {{- include "sticker-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "sticker-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/sticker-app-k8s/templates/service.yaml b/charts/backend2/charts/sticker-app-k8s/templates/service.yaml new file mode 100755 index 0000000..368206e --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sticker-app.fullname" . }} + labels: + {{- include "sticker-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "sticker-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/sticker-app-k8s/values.yaml b/charts/backend2/charts/sticker-app-k8s/values.yaml new file mode 100755 index 0000000..1379073 --- /dev/null +++ b/charts/backend2/charts/sticker-app-k8s/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: stickers + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/.helmignore b/charts/backend2/charts/unregister-tokens-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/Chart.yaml b/charts/backend2/charts/unregister-tokens-app-k8s/Chart.yaml new file mode 100755 index 0000000..902af3c --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: unregister-tokens-app +description: Helm chart for Unregister Tokens App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/unregister-tokens-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..b903685 --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "unregister-tokens-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "unregister-tokens-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "unregister-tokens-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "unregister-tokens-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "unregister-tokens-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/templates/deployment.yaml b/charts/backend2/charts/unregister-tokens-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..55035ee --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "unregister-tokens-app.fullname" . }} + labels: + {{- include "unregister-tokens-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "unregister-tokens-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "unregister-tokens-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "unregister-tokens-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/templates/pdb.yaml b/charts/backend2/charts/unregister-tokens-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..a6c4329 --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "unregister-tokens-app.fullname" . }} + labels: + {{- include "unregister-tokens-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "unregister-tokens-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/unregister-tokens-app-k8s/values.yaml b/charts/backend2/charts/unregister-tokens-app-k8s/values.yaml new file mode 100755 index 0000000..64fe2b0 --- /dev/null +++ b/charts/backend2/charts/unregister-tokens-app-k8s/values.yaml @@ -0,0 +1,23 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + cassandra: + keyspace: notifications + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/upload-app-k8s/.helmignore b/charts/backend2/charts/upload-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/upload-app-k8s/Chart.yaml b/charts/backend2/charts/upload-app-k8s/Chart.yaml new file mode 100755 index 0000000..aaf5c39 --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: upload-app +description: Helm chart for the Upload App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/upload-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/upload-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..3c033b9 --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "upload-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "upload-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "upload-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "upload-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "upload-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/upload-app-k8s/templates/deployment.yaml b/charts/backend2/charts/upload-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..bea14ff --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "upload-app.fullname" . }} + labels: + {{- include "upload-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "upload-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "upload-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "upload-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/upload-app-k8s/templates/pdb.yaml b/charts/backend2/charts/upload-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..d863f8d --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "upload-app.fullname" . }} + labels: + {{- include "upload-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "upload-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/upload-app-k8s/templates/service.yaml b/charts/backend2/charts/upload-app-k8s/templates/service.yaml new file mode 100755 index 0000000..e55d9f3 --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "upload-app.fullname" . }} + labels: + {{- include "upload-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "upload-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/upload-app-k8s/values.yaml b/charts/backend2/charts/upload-app-k8s/values.yaml new file mode 100755 index 0000000..17250f4 --- /dev/null +++ b/charts/backend2/charts/upload-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/user-app-k8s/.helmignore b/charts/backend2/charts/user-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/user-app-k8s/Chart.yaml b/charts/backend2/charts/user-app-k8s/Chart.yaml new file mode 100755 index 0000000..9a5d20b --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: user-app +description: Helm chart for the User App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/user-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/user-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..b46e5c0 --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "user-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "user-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "user-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "user-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "user-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/user-app-k8s/templates/deployment.yaml b/charts/backend2/charts/user-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..2d929d7 --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "user-app.fullname" . }} + labels: + {{- include "user-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "user-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "user-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "user-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/user-app-k8s/templates/pdb.yaml b/charts/backend2/charts/user-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..c62bc3b --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "user-app.fullname" . }} + labels: + {{- include "user-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "user-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/user-app-k8s/templates/service.yaml b/charts/backend2/charts/user-app-k8s/templates/service.yaml new file mode 100755 index 0000000..7009381 --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "user-app.fullname" . }} + labels: + {{- include "user-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "user-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/user-app-k8s/values.yaml b/charts/backend2/charts/user-app-k8s/values.yaml new file mode 100755 index 0000000..91db579 --- /dev/null +++ b/charts/backend2/charts/user-app-k8s/values.yaml @@ -0,0 +1,29 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + keyspace: users + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +secrets: + adminPassword: + name: auth-secrets + key: admin-password + clientSecret: + name: auth-secrets + key: client-secret +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/voip-splitter-app-k8s/.helmignore b/charts/backend2/charts/voip-splitter-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/voip-splitter-app-k8s/Chart.yaml b/charts/backend2/charts/voip-splitter-app-k8s/Chart.yaml new file mode 100755 index 0000000..4974f61 --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: voip-splitter-app +description: Helm chart for the VoIP Splitter App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/voip-splitter-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/voip-splitter-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..34578ac --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "voip-splitter-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "voip-splitter-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "voip-splitter-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "voip-splitter-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "voip-splitter-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/voip-splitter-app-k8s/templates/deployment.yaml b/charts/backend2/charts/voip-splitter-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..1c7693c --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "voip-splitter-app.fullname" . }} + labels: + {{- include "voip-splitter-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "voip-splitter-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "voip-splitter-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "voip-splitter-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/voip-splitter-app-k8s/templates/pdb.yaml b/charts/backend2/charts/voip-splitter-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..91048dd --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "voip-splitter-app.fullname" . }} + labels: + {{- include "voip-splitter-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "voip-splitter-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/voip-splitter-app-k8s/values.yaml b/charts/backend2/charts/voip-splitter-app-k8s/values.yaml new file mode 100755 index 0000000..edad64d --- /dev/null +++ b/charts/backend2/charts/voip-splitter-app-k8s/values.yaml @@ -0,0 +1,25 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + chatServiceHost: chat-app + chatServicePort: '9090' + userServiceHost: user-app + userServicePort: '9090' + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/web-sender-app-k8s/.helmignore b/charts/backend2/charts/web-sender-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/web-sender-app-k8s/Chart.yaml b/charts/backend2/charts/web-sender-app-k8s/Chart.yaml new file mode 100755 index 0000000..287ff15 --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: web-sender-app +description: Helm chart for Web Sender App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/web-sender-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/web-sender-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..8fb51c3 --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "web-sender-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "web-sender-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "web-sender-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "web-sender-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "web-sender-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/web-sender-app-k8s/templates/deployment.yaml b/charts/backend2/charts/web-sender-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..9fc80de --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "web-sender-app.fullname" . }} + labels: + {{- include "web-sender-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "web-sender-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "web-sender-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "web-sender-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/web-sender-app-k8s/templates/pdb.yaml b/charts/backend2/charts/web-sender-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..319b899 --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "web-sender-app.fullname" . }} + labels: + {{- include "web-sender-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "web-sender-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/web-sender-app-k8s/values.yaml b/charts/backend2/charts/web-sender-app-k8s/values.yaml new file mode 100755 index 0000000..5dcbcb2 --- /dev/null +++ b/charts/backend2/charts/web-sender-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + type: ClusterIP + targetPort: 9090 diff --git a/charts/backend2/charts/workspace-app-k8s/.helmignore b/charts/backend2/charts/workspace-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/workspace-app-k8s/Chart.yaml b/charts/backend2/charts/workspace-app-k8s/Chart.yaml new file mode 100755 index 0000000..298311f --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: workspace-app +description: Helm chart for Workspace App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/workspace-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/workspace-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..30e5bb2 --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "workspace-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "workspace-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "workspace-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "workspace-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "workspace-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/workspace-app-k8s/templates/deployment.yaml b/charts/backend2/charts/workspace-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..4d53da8 --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "workspace-app.fullname" . }} + labels: + {{- include "workspace-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "workspace-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "workspace-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "workspace-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/workspace-app-k8s/templates/pdb.yaml b/charts/backend2/charts/workspace-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..3bb1851 --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "workspace-app.fullname" . }} + labels: + {{- include "workspace-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "workspace-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/workspace-app-k8s/templates/service.yaml b/charts/backend2/charts/workspace-app-k8s/templates/service.yaml new file mode 100755 index 0000000..d1d4b05 --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "workspace-app.fullname" . }} + labels: + {{- include "workspace-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "workspace-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/workspace-app-k8s/values.yaml b/charts/backend2/charts/workspace-app-k8s/values.yaml new file mode 100755 index 0000000..17250f4 --- /dev/null +++ b/charts/backend2/charts/workspace-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/.helmignore b/charts/backend2/charts/workspace-event-handler-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/.helmignore @@ -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/ diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/Chart.yaml b/charts/backend2/charts/workspace-event-handler-app-k8s/Chart.yaml new file mode 100755 index 0000000..53d1fa4 --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: workspace-event-handler-app +description: Helm chart for Workspace Event Handler App +type: application +version: 0.1.0 +appVersion: "prod-2.1.0-RELEASE" + +dependencies: + - name: cw-common + version: "0.1.0" + repository: file://../cw-common diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/templates/_helpers.tpl b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..3b4a953 --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/_helpers.tpl @@ -0,0 +1,5 @@ +{{- define "workspace-event-handler-app.name" -}}{{ include "cw-common.name" . }}{{- end }} +{{- define "workspace-event-handler-app.fullname" -}}{{ include "cw-common.fullname" . }}{{- end }} +{{- define "workspace-event-handler-app.chart" -}}{{ include "cw-common.chart" . }}{{- end }} +{{- define "workspace-event-handler-app.labels" -}}{{ include "cw-common.labels" . }}{{- end }} +{{- define "workspace-event-handler-app.selectorLabels" -}}{{ include "cw-common.selectorLabels" . }}{{- end }} diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/templates/deployment.yaml b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..78755db --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "workspace-event-handler-app.fullname" . }} + labels: + {{- include "workspace-event-handler-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "workspace-event-handler-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "workspace-event-handler-app.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- include "cw-common.volumes.cacerts" . | nindent 8 }} + initContainers: + {{- include "cw-common.initContainer.importCA" . | nindent 8 }} + containers: + - name: {{ include "workspace-event-handler-app.fullname" . }} + image: {{ include "cw-common.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.targetPort }} + protocol: TCP + env: + {{- range .Values.env.globalEnvIncludes }} + {{- include (printf "global.env.%s" .) $ | nindent 12 }} + {{- end }} + {{- range $prefix, $serviceKey := .Values.env.serviceHostPort }} + {{- $svc := index $.Values.global.services $serviceKey }} + - name: {{ $prefix }}_HOST + value: {{ $svc.host | quote }} + - name: {{ $prefix }}_PORT + value: {{ $svc.port | quote }} + {{- end }} + {{- with .Values.env.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + {{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }} + resources: + {{- include "cw-common.resources" . | nindent 12 }} + {{- with (include "cw-common.livenessProbe" .) }} + livenessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with (include "cw-common.readinessProbe" .) }} + readinessProbe: + {{- . | nindent 12 }} + {{- end }} + {{- with .Values.global.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/templates/pdb.yaml b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/pdb.yaml new file mode 100644 index 0000000..336c1ee --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.pdb .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "workspace-event-handler-app.fullname" . }} + labels: + {{- include "workspace-event-handler-app.labels" . | nindent 4 }} +spec: + {{- if .Values.pdb.minAvailable }} + minAvailable: {{ .Values.pdb.minAvailable }} + {{- end }} + {{- if .Values.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.pdb.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "workspace-event-handler-app.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/templates/service.yaml b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/service.yaml new file mode 100755 index 0000000..2d9b49e --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "workspace-event-handler-app.fullname" . }} + labels: + {{- include "workspace-event-handler-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - name: grpc + port: 9090 + targetPort: 9090 + protocol: TCP + selector: + {{- include "workspace-event-handler-app.selectorLabels" . | nindent 4 }} diff --git a/charts/backend2/charts/workspace-event-handler-app-k8s/values.yaml b/charts/backend2/charts/workspace-event-handler-app-k8s/values.yaml new file mode 100755 index 0000000..17250f4 --- /dev/null +++ b/charts/backend2/charts/workspace-event-handler-app-k8s/values.yaml @@ -0,0 +1,21 @@ +replicaCount: 1 +image: + name: '' + tag: '' + pullPolicy: Always +env: + globalEnvIncludes: [] + serviceHostPort: {} + extraEnv: [] +podAnnotations: {} +podLabels: {} +imagePullSecrets: [] +livenessProbe: {} +readinessProbe: {} +affinity: {} +tolerations: [] +pdb: + enabled: false +service: + targetPort: 9090 + type: ClusterIP diff --git a/charts/backend2/templates/.helmignore b/charts/backend2/templates/.helmignore new file mode 100755 index 0000000..e69de29 diff --git a/charts/backend2/templates/_globals.tpl b/charts/backend2/templates/_globals.tpl new file mode 100755 index 0000000..895e79c --- /dev/null +++ b/charts/backend2/templates/_globals.tpl @@ -0,0 +1,126 @@ +{{/* Global Environment Templates */}} +{{- define "global.env.kafka" -}} + {{- if .Values.global.infrastructure.kafka.enabled -}} + {{- tpl (.Values.global.envTemplates.kafka | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.redis" -}} + {{- if .Values.global.infrastructure.redis.enabled -}} + {{- tpl (.Values.global.envTemplates.redis | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.cassandra" -}} + {{- if .Values.global.infrastructure.cassandra.enabled -}} + {{- tpl (.Values.global.envTemplates.cassandra | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.postgres" -}} + {{- if .Values.global.infrastructure.postgres.enabled -}} + {{- tpl (.Values.global.envTemplates.postgres | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.s3" -}} + {{- if .Values.global.infrastructure.s3.enabled -}} + {{- tpl (.Values.global.envTemplates.s3 | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.s3_upload" -}} + {{- if .Values.global.infrastructure.s3_upload.enabled -}} + {{- tpl (.Values.global.envTemplates.s3_upload | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.general" -}} + {{- if .Values.global.infrastructure.general.enabled -}} + {{- tpl (.Values.global.envTemplates.general | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.auth" -}} + {{- if .Values.global.infrastructure.auth.enabled -}} + {{- tpl (.Values.global.envTemplates.auth | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.call" -}} + {{- if .Values.global.infrastructure.call.enabled -}} + {{- tpl (.Values.global.envTemplates.call | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.callevent" -}} + {{- if .Values.global.infrastructure.callevent.enabled -}} + {{- tpl (.Values.global.envTemplates.callevent | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.elastic" -}} + {{- if .Values.global.infrastructure.elastic.enabled -}} + {{- tpl (.Values.global.envTemplates.elastic | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.imageRepository" -}} + {{- $prefix := .Values.global.dockerRegistryPrefix | default "registry.co-work.ru/" -}} + {{- $name := .Chart.Name | default "unknown" -}} + {{- printf "%s%s" $prefix $name -}} +{{- end -}} + +{{- define "global.env.configService" -}} +- name: CONFIG_SERVICE_URL + value: {{ .Values.global.services.configServiceUrl | default "configservice://config-app:9090" | quote }} +{{- end -}} + +{{- define "global.env.chatsplitter" -}} + {{- if .Values.global.infrastructure.chatsplitter.enabled -}} + {{- tpl (.Values.global.envTemplates.chatsplitter | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.env.user" -}} + {{- if .Values.global.infrastructure.user.enabled -}} + {{- tpl (.Values.global.envTemplates.user | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} + +{{- define "global.serviceUrl" -}} +http://{{ .host }}:{{ .port }} +{{- end -}} + +{{- define "global.env.observability" -}} +- name: OTEL_LOGS_EXPORTER + value: {{ .Values.global.observability.exporters.logs | quote }} +- name: OTEL_METRICS_EXPORTER + value: {{ .Values.global.observability.exporters.metrics | quote }} +- name: OTEL_TRACES_EXPORTER + value: {{ .Values.global.observability.exporters.traces | quote }} +- name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.global.observability.otlpEndpoint | quote }} +- name: OTEL_BSP_EXPORT_TIMEOUT + value: {{ .Values.global.observability.bsp.exportTimeout | quote }} +- name: OTEL_BLRP_MAX_QUEUE_SIZE + value: {{ .Values.global.observability.blrp.maxQueueSize | quote }} +- name: OTEL_BLRP_MAX_EXPORT_BATCH_SIZE + value: {{ .Values.global.observability.blrp.maxExportBatchSize | quote }} +- name: OTEL_RESOURCE_DETECTORS + value: {{ .Values.global.observability.resourceDetectors | quote }} +- name: HEAP_SIZE_RATIO + value: {{ .Values.global.observability.heapSizeRatio | quote }} +- name: OTEL_SERVICE_NAME + value: {{ include "cw-common.fullname" . | quote }} +- name: PYROSCOPE_APPLICATION_NAME + value: {{ include "cw-common.fullname" . | quote }} +- name: PYROSCOPE_SERVER_ADDRESS + value: {{ .Values.global.observability.pyroscopeEndpoint | quote }} +- name: PYROSCOPE_FORMAT + value: {{ .Values.global.observability.pyroscope.format | quote }} +- name: PYROSCOPE_PROFILER_LOCK + value: {{ .Values.global.observability.pyroscope.profilerLock | quote }} +- name: PYROSCOPE_AGENT_ENABLED + value: {{ .Values.global.observability.pyroscope.enabled | quote }} +{{- end -}} \ No newline at end of file diff --git a/charts/backend2/templates/auth-app-ca-cert.yaml b/charts/backend2/templates/auth-app-ca-cert.yaml new file mode 100644 index 0000000..c5cef4f --- /dev/null +++ b/charts/backend2/templates/auth-app-ca-cert.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + annotations: + name: auth-app-ca-cert + namespace: {{ .Release.Namespace }} +data: + RootCA_cowork.crt: | + -----BEGIN CERTIFICATE----- + MIID0zCCArugAwIBAgIUdRVwJlLqchhuGFncfp5eD/xgoMYwDQYJKoZIhvcNAQEL + BQAweTELMAkGA1UEBhMCUlUxDzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9z + Y293MQ8wDQYDVQQKDAZNb3Njb3cxDDAKBgNVBAsMA2dlbTEMMAoGA1UEAwwDZ2Vt + MRswGQYJKoZIhvcNAQkBFgxjdy1wMDUubG9jYWwwHhcNMjUwOTAzMTgxNzI5WhcN + MzUwOTAxMTgxNzI5WjB5MQswCQYDVQQGEwJSVTEPMA0GA1UECAwGTW9zY293MQ8w + DQYDVQQHDAZNb3Njb3cxDzANBgNVBAoMBk1vc2NvdzEMMAoGA1UECwwDZ2VtMQww + CgYDVQQDDANnZW0xGzAZBgkqhkiG9w0BCQEWDGN3LXAwNS5sb2NhbDCCASIwDQYJ + KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKA8aYmMPb3Ra725ZjUhXaHqGwhZ+9wY + 1dsayqSVPtVgF5iWCBmBqUn0Is9XEWBmEWwAxq0OaaLViBEPiBHZnbWCsYh1Qg6L + rV5yD03CNB47OoiZDVsy4DW2N3icpVua8fdmfecQvo0yQuqIqkF9wSiNDzALX6Zp + AISqggsmyH4dRMB7/R1U95BtJNhSas8XSCxqO4Z/JtOZ+vNGy9TlGX4z+7eOqO4s + 02eEPF+M9XH4Aa9Ddj6DxQnqroZHFGvOn5HOknqSlQTtWvq5yDYxVZDxwl807Mjl + JiXNTxkbbo8O7kTvH+HDBYMwsA6LgEnoiwvjPwkGg+BKsOKs8g7QrYECAwEAAaNT + MFEwHQYDVR0OBBYEFKsaBN7Djsm1LUd9gfMOkdPva70nMB8GA1UdIwQYMBaAFKsa + BN7Djsm1LUd9gfMOkdPva70nMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL + BQADggEBAJZnzJfxLnUswx/cnyFRXIsgVZZ7y+HUtwe92UFJcSA2r1iHs0GPQ7Wn + T4ir07ORCPxTDQg6RrrEN+dwy0c2hfyny8Gr2NgFHSQhe7dx+nX2ASi6bYKAoOFV + LFRP8gXqu5MxxbHj53MlTuuWHLsRakXDvCTiCykhTt0yAp48p7SzWbOlly1CRubm + o4MGyL69iypH9C2i821uYwyIn/ih06g0clFZsSp8pJ8jwngNicjh8qTx74J4YOJV + 3nSFJho642I9JMkknE2teP47pNgie6samze4Jni/ZwS15U3/jsAiO/ATh16inSyJ + ID35WnKcz6kgkrMDyLfqr8423/lDGxc= + -----END CERTIFICATE----- \ No newline at end of file diff --git a/charts/backend2/values.yaml b/charts/backend2/values.yaml new file mode 100755 index 0000000..56cdd04 --- /dev/null +++ b/charts/backend2/values.yaml @@ -0,0 +1,1189 @@ +global: + dockerRegistryPrefix: "registry.co-work.ru/" + nodeSelector: + tenant: client3 + + defaults: + resources: + requests: + memory: 256Mi + limits: + memory: 2Gi + + observability: + otlpEndpoint: "http://mon.nubes.ru:4318" + pyroscopeEndpoint: "http://mon.nubes.ru:4040" + exporters: + logs: "none" + metrics: "none" + traces: "none" + bsp: + exportTimeout: "3000000" + blrp: + maxQueueSize: "2048000" + maxExportBatchSize: "512000" + resourceDetectors: "env,host,process,container" + heapSizeRatio: "90" + pyroscope: + format: "jfr" + profilerLock: "10ms" + enabled: "false" + + infrastructure: + general: + enabled: true + tenant_id: "8caccf97-4843-4de8-a7ec-de5c19e99ca0" + sticker_base_url: "https://store-p001.cw.ngcloud.ru:9000" + recording_folder: "livekit" + deeplink_domain: "https://links.co-work.ru" + swagger_host: "localhost" + swagger_port: 8080 + workspace_host: "workspace-app" + workspace_port: 9090 + user_host: "user-app" + user_port: 9090 + admin_host: "admin-app" + admin_port: 9090 + device_host: "device-app" + device_port: 9090 + auth_host: "auth-app" + auth_port: 9090 + license_host: "license-app" + license_port: 9090 + keycloak_url: "https://iam.cw.ngcloud.ru/realms/cowork" + deeplink_tenant: "nubes-test.ru" + + elastic: + enabled: true + host: elasticsearch-master + port: "9200" + + chatsplitter: + enabled: true + appnotificationlocale: "ru" + + auth: + enabled: true + cert_alias: cowork + adminClientId: "admin-cli" + adminRealm: "master" + adminUrl: "https://iam.cw.ngcloud.ru/admin/realms/cowork" + adminUsername: "admin" + clientId: "gem-auth-client" + clientIssuerIri: "https://iam.cw.ngcloud.ru/realms/cowork" + clientRealm: "cowork" + realm: "cowork" + securityAdminRealm: "master" + securityOauth2ClientIssuerUri: "https://iam.cw.ngcloud.ru/realms" + client_scope: "openid profile email" + + call: + enabled: true + livekit_apiHost: https://av-p003.cw.ngcloud.ru + recording_endpoint: https://store-p001.cw.ngcloud.ru:9000 + recording_region: us-east-2 + recording_bucket: livekit + + callevent: + enabled: true + livekit_apiHost: https://av-p003.cw.ngcloud.ru + recording_endpoint: https://store-p001.cw.ngcloud.ru:9000 + recording_region: us-east-2 + recording_bucket: livekit + + kafka: + enabled: true + server: "kafka:9092,kafka:9092,kafka:9092" + port: 9092 + secret: "kafka-static-user-passwords" + username: "admin" + passwordKey: "client-passwords" + + redis: + enabled: true + host: "redis-master" + port: 6379 + + cassandra: + enabled: true + host: "cassandra" + contactPoint: "cassandra" + datacenter: "datacenter1" + keyspace: "config" + secret: "cassandra-static-user-passwords" + usernameKey: "username" + passwordKey: "cassandra-password" + port: "9042" + + keycloak: + url: "https://iam.cw.ngcloud.ru/realms/cowork" + + livekit: + secret: "livekit-secret" + apiKeyKey: "api-key" + secretKey: "secret" + + postgres: + enabled: true + host: "postgresql" + port: 5432 + secret: "pg-ha-creds" + username: "postgres" + passwordKey: "password" + search_url: "jdbc:postgresql://postgresql:5432/search_db" + device_url: "jdbc:postgresql://postgresql:5432/device" + license_url: "jdbc:postgresql://postgresql:5432/license" + configurl: "jdbc:postgresql://postgresql:5432/config" + usersurl: "jdbc:postgresql://postgresql:5432/users" + + s3: + enabled: true + endpoint: https://store-p001.cw.ngcloud.ru:9000 + secret: "s3-static-secret" + accessKey: "access-key" + secretKey: "secret-key" + + s3_upload: + enabled: true + endpoint: https://store-p001.cw.ngcloud.ru:9000 + secret: "s3-static-secret" + accessKey: "access-key" + secretKey: "secret-key" + user: + enabled: true + + services: + configServiceUrl: "configservice://config-app:9090" + auth: + host: "auth-app" + port: 9090 + calendar: + host: "calendar-app" + port: 9090 + call: + host: "call-app" + port: 9090 + callRealtime: + host: "call-realtime-app" + port: 9090 + chat: + host: "chat-app" + port: 9090 + configCore: + host: "config-app" + port: 9090 + deeplink: + host: "deeplink-app" + port: 9090 + device: + host: "device-app" + port: 9090 + gemCall: + host: "gem-call-app" + port: 9090 + message: + host: "message-app" + port: 9090 + notification: + host: "notification-app" + port: 9090 + realtime: + host: "realtime-app" + port: 9090 + search: + host: "search-app" + port: 9090 + sticker: + host: "sticker-app" + port: 9090 + upload: + host: "upload-app" + port: 9090 + user: + host: "user-app" + port: 9090 + workspace: + host: "workspace-app" + port: 9090 + + ingress: + admin-ui: + enabled: true + className: nginx + name: admin-ui-ingress + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + hosts: + - host: admin-ui.cw.ngcloud.ru + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - admin-ui.cw.ngcloud.ru + secretName: co-work-secret + + bff-admin: + enabled: true + className: nginx + name: bff-admin-ingress + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + hosts: + - host: admin-ui.cw.ngcloud.ru + paths: + - path: /bff-admin + pathType: Prefix + tls: + - hosts: + - admin-ui.cw.ngcloud.ru + secretName: co-work-secret + + bff-app: + name: api-p003.cw.ngcloud.ru + bff-vcs: + name: vcs-p003.cw.ngcloud.ru + + secrets: + branchio: + secret: "deeplink-secret" + keys: &branchio-keys + access: "branchio-access" + appid: "branchio-appid" + defaultUrl: "branchio-default-url" + key: "branchio-key" + secret: "branchio-secret" + url: "branchio-url" + webdomain: "deeplink-webdomain" + + recording: + secret: "recording-secret" + keys: + access: "access-key" + secret: "secret" + + upload: + secret: "upload-app-s3" + keys: + access: "access-key" + secret: "secret-key" + + cert_alias: cowork + + livekit_webhook_nodeport: 31648 + envTemplates: + general: &general-env + - name: TENANT_ID + value: "{{ .Values.global.infrastructure.general.tenant_id }}" + - name: STICKER_BASE_URL + value: "{{ .Values.global.infrastructure.general.sticker_base_url }}" + - name: RECORDING_FOLDER + value: "{{ .Values.global.infrastructure.general.recording_folder }}" + - name: DEEPLINK_DOMAIN + value: "{{ .Values.global.infrastructure.general.deeplink_domain }}" + - name: SWAGGER_HOST + value: "{{ .Values.global.infrastructure.general.swagger_host }}" + - name: SWAGGER_PORT + value: "{{ .Values.global.infrastructure.general.swagger_port }}" + - name: WORKSPACE_HOST + value: "{{ .Values.global.infrastructure.general.workspace_host }}" + - name: WORKSPACE_PORT + value: "{{ .Values.global.infrastructure.general.workspace_port }}" + - name: USER_HOST + value: "{{ .Values.global.infrastructure.general.user_host }}" + - name: USER_PORT + value: "{{ .Values.global.infrastructure.general.user_port }}" + - name: ADMIN_HOST + value: "{{ .Values.global.infrastructure.general.admin_host }}" + - name: ADMIN_PORT + value: "{{ .Values.global.infrastructure.general.admin_port }}" + - name: DEVICE_HOST + value: "{{ .Values.global.infrastructure.general.device_host }}" + - name: DEVICE_PORT + value: "{{ .Values.global.infrastructure.general.device_port }}" + - name: AUTH_HOST + value: "{{ .Values.global.infrastructure.general.auth_host }}" + - name: AUTH_PORT + value: "{{ .Values.global.infrastructure.general.auth_port }}" + - name: LICENSE_HOST + value: "{{ .Values.global.infrastructure.general.license_host }}" + - name: LICENSE_PORT + value: "{{ .Values.global.infrastructure.general.license_port }}" + - name: KEYCLOAK_URL + value: "{{ .Values.global.infrastructure.general.keycloak_url }}" + - name: DEEPLINK_TENANT + value: "{{ .Values.global.infrastructure.general.deeplink_tenant }}" + + elastic: &elastic-env + - name: ELASTIC_HOST + value: "{{ .Values.global.infrastructure.elastic.host }}" + - name: ELASTIC_PORT + value: "{{ .Values.global.infrastructure.elastic.port }}" + + chatsplitter: &chatsplitter-env + - name: APP_NOTIFICATION_LOCALE + value: "{{ .Values.global.infrastructure.chatsplitter.appnotificationlocale }}" + + call: &call-env + - name: RECORDING_API_HOST + value: "{{ .Values.global.infrastructure.call.livekit_apiHost }}" + - name: RECORDING_BUCKET + value: "{{ .Values.global.infrastructure.call.recording_bucket }}" + - name: RECORDING_ENDPOINT + value: "{{ .Values.global.infrastructure.call.recording_endpoint }}" + - name: RECORDING_REGION + value: "{{ .Values.global.infrastructure.call.recording_region }}" + + callevent: &callevent-env + - name: RECORDING_API_HOST + value: "{{ .Values.global.infrastructure.callevent.recording_endpoint }}" + - name: RECORDING_BUCKET + value: "{{ .Values.global.infrastructure.callevent.recording_bucket }}" + - name: RECORDING_ENDPOINT + value: "{{ .Values.global.infrastructure.callevent.recording_endpoint }}" + - name: RECORDING_REGION + value: "{{ .Values.global.infrastructure.callevent.recording_region }}" + + auth: &auth-env + - name: CERT_ALIAS + value: "{{ .Values.global.infrastructure.auth.cert_alias }}" + - name: ADMIN_CLIENT_ID + value: "{{ .Values.global.infrastructure.auth.adminClientId }}" + - name: ADMIN_REALM + value: "{{ .Values.global.infrastructure.auth.adminRealm }}" + - name: ADMIN_URL + value: "{{ .Values.global.infrastructure.auth.adminUrl }}" + - name: ADMIN_USERNAME + value: "{{ .Values.global.infrastructure.auth.adminUsername }}" + - name: CLIENT_ID + value: "{{ .Values.global.infrastructure.auth.clientId }}" + - name: CLIENT_ISSUER_IRI + value: "{{ .Values.global.infrastructure.auth.clientIssuerIri }}" + - name: CLIENT_REALM + value: "{{ .Values.global.infrastructure.auth.clientRealm }}" + - name: REALM + value: "{{ .Values.global.infrastructure.auth.realm }}" + - name: SECURITY_ADMIN_REALM + value: "{{ .Values.global.infrastructure.auth.securityAdminRealm }}" + - name: SECURITY_OAUTH2_CLIENT_ISSUER_URI + value: "{{ .Values.global.infrastructure.auth.securityOauth2ClientIssuerUri }}" + - name: CLIENT_SCOPE + value: "{{ .Values.global.infrastructure.auth.client_scope }}" + + kafka: &kafka-env + - name: KAFKA + value: "{{ .Values.global.infrastructure.kafka.server }}" + - name: KAFKA_SERVER + value: "{{ .Values.global.infrastructure.kafka.server }}" + - name: KAFKA_USERNAME + value: "{{ .Values.global.infrastructure.kafka.username }}" + - name: KAFKA_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.kafka.secret }}" + key: "{{ .Values.global.infrastructure.kafka.passwordKey }}" + + redis: &redis-env + - name: REDIS_HOST + value: "{{ .Values.global.infrastructure.redis.host }}" + - name: REALTIME_REDIS_HOST + value: "{{ .Values.global.infrastructure.redis.host }}" + - name: REDIS_PORT + value: "{{ .Values.global.infrastructure.redis.port }}" + + cassandra: &cassandra-env + - name: CASSANDRA_CONTACTPOINT + value: "{{ .Values.global.infrastructure.cassandra.contactPoint }}" + - name: CASSANDRA_HOST + value: "{{ .Values.global.infrastructure.cassandra.host }}" + - name: CASSANDRA_DATACENTER + value: "{{ .Values.global.infrastructure.cassandra.datacenter }}" + - name: CASSANDRA_USERNAME + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.cassandra.secret }}" + key: "{{ .Values.global.infrastructure.cassandra.usernameKey }}" + - name: CASSANDRA_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.cassandra.secret }}" + key: "{{ .Values.global.infrastructure.cassandra.passwordKey }}" + - name: CASSANDRA_PORT + value: "{{ .Values.global.infrastructure.cassandra.port }}" + - name: CASSANDRA_CONTACTPOINT_CONFIG + value: "{{ .Values.global.infrastructure.cassandra.contactPoint }}" + - name: CASSANDRA_DATACENTER_CONFIG + value: "{{ .Values.global.infrastructure.cassandra.datacenter }}" + - name: CASSANDRA_KEYSPACE_CONFIG + value: "{{ .Values.global.infrastructure.cassandra.keyspace }}" + - name: CASSANDRA_PORT_CONFIG + value: "{{ .Values.global.infrastructure.cassandra.port }}" + - name: CASSANDRA_USERNAME_CONFIG + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.cassandra.secret }}" + key: "{{ .Values.global.infrastructure.cassandra.usernameKey }}" + - name: CASSANDRA_PASSWORD_CONFIG + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.cassandra.secret }}" + key: "{{ .Values.global.infrastructure.cassandra.passwordKey }}" + + postgres: &postgres-env + - name: POSTGRES_USERNAME + value: "{{ .Values.global.infrastructure.postgres.username }}" + - name: POSTGRES_USERNAME_CONFIG + value: "{{ .Values.global.infrastructure.postgres.username }}" + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.postgres.secret }}" + key: "{{ .Values.global.infrastructure.postgres.passwordKey }}" + - name: POSTGRES_PASSWORD_CONFIG + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.postgres.secret }}" + key: "{{ .Values.global.infrastructure.postgres.passwordKey }}" + - name: POSTGRES_DEVICE_URL + value: "{{ .Values.global.infrastructure.postgres.device_url }}" + - name: POSTGRES_SEARCH_URL + value: "{{ .Values.global.infrastructure.postgres.search_url }}" + - name: POSTGRES_LICENSE_URL + value: "{{ .Values.global.infrastructure.postgres.license_url }}" + - name: POSTGRES_URL_CONFIG + value: "{{ .Values.global.infrastructure.postgres.configurl }}" + - name: POSTGRES_URL_USERS + value: "{{ .Values.global.infrastructure.postgres.usersurl }}" + - name: POSTGRES_USERNAME_USERS + value: "{{ .Values.global.infrastructure.postgres.username }}" + - name: POSTGRES_PASSWORD_USERS + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.postgres.secret }}" + key: "{{ .Values.global.infrastructure.postgres.passwordKey }}" + + s3: &s3-env + - name: S3_ENDPOINT + value: "{{ .Values.global.infrastructure.s3.endpoint }}" + - name: S3_ACCESS_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.s3.secret }}" + key: "{{ .Values.global.infrastructure.s3.accessKey }}" + - name: S3_SECRET_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.s3.secret }}" + key: "{{ .Values.global.infrastructure.s3.secretKey }}" + + s3_upload: &s3_upload-env + - name: S3_ENDPOINT + value: "{{ .Values.global.infrastructure.s3_upload.endpoint }}" + - name: S3_ACCESS_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.s3_upload.secret }}" + key: "{{ .Values.global.infrastructure.s3_upload.accessKey }}" + - name: S3_SECRET_KEY + valueFrom: + secretKeyRef: + name: "{{ .Values.global.infrastructure.s3_upload.secret }}" + key: "{{ .Values.global.infrastructure.s3_upload.secretKey }}" + + user: &user-env + - name: LICENSE_HOST + value: "{{ .Values.global.infrastructure.general.license_host }}" + - name: LICENSE_PORT + value: "{{ .Values.global.infrastructure.general.license_port }}" + - name: KEYCLOAK_CLIENT_ISSUER_IRI + value: "{{ .Values.global.infrastructure.auth.clientIssuerIri }}" + - name: KEYCLOAK_CLIENT_REALM + value: "{{ .Values.global.infrastructure.auth.clientRealm }}" + - name: KEYCLOAK_CLIENT_ID + value: "{{ .Values.global.infrastructure.auth.clientId }}" + - name: KEYCLOAK_ADMIN_CLIENT_ID + value: "{{ .Values.global.infrastructure.auth.adminClientId }}" + - name: KEYCLOAK_ADMIN_USERNAME + value: "{{ .Values.global.infrastructure.auth.adminUsername }}" + - name: ADMIN_URL + value: "{{ .Values.global.infrastructure.auth.adminUrl }}" + +# Per-subchart overrides +admin-app: + image: + name: "admin-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - general + - observability + +admin-ui-app: + image: + name: "admin-panel-cowork" + tag: "stage" + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + +android-app: + image: + name: "android-sender-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +auth-app: + image: + name: "auth-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - general + - auth + - observability + +auth-event-handler-app: + image: + name: "auth-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - general + - cassandra + - kafka + - redis + - auth + - observability + +bff-admin-app: + image: + name: "bff-admin-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - general + - observability + +bff-app: + image: + name: "bff-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - observability + grpcClients: + GRPC_CLIENT_AUTH_URL: auth + GRPC_CLIENT_CHAT_URL: chat + GRPC_CLIENT_CONFIG_URL: user + GRPC_CLIENT_DEEPLINK_URL: deeplink + GRPC_CLIENT_GEM_CALL_URL: gemCall + GRPC_CLIENT_MESSAGE_URL: message + GRPC_CLIENT_NOTIFICATIONS_URL: notification + GRPC_CLIENT_REACTION_URL: message + GRPC_CLIENT_REALTIME_URL: realtime + GRPC_CLIENT_SEARCH_URL: search + GRPC_CLIENT_STICKER_URL: sticker + GRPC_CLIENT_UPLOAD_URL: upload + GRPC_CLIENT_USER_URL: user + GRPC_CLIENT_WORKSPACE_URL: workspace + GRPC_CLIENT_DEVICE_URL: device + GRPC_CLIENT_CALENDAR_URL: calendar + GRPC_CLIENT_CONFIG_CORE_URL: configCore + resources: + requests: + cpu: 200m + memory: 512Mi + limits: + memory: 1Gi + livenessProbe: {} + readinessProbe: {} + +bff-external-app: + image: + name: "bff-external-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - observability + +bff-vcs-app: + image: + name: "bff-vss-core-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - observability + grpcClients: + GRPC_CLIENT_CALL_URL: call + GRPC_CLIENT_CALL_REALTIME_URL: callRealtime + livenessProbe: {} + readinessProbe: {} + +big-chat-splitter-app: + image: + name: "big-chat-splitter-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +call-app: + image: + name: "call-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - call + - observability + +calendar-app: + image: + name: "calendar-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - observability + +call-event-handler-app: + image: + name: "call-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - callevent + - observability + +call-realtime-app: + image: + name: "call-realtime-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - callevent + - observability + +chat-app: + image: + name: "chat-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + DEEPLINK: deeplink + GEM_CALL: gemCall + MESSAGE: message + SEARCH: search + USER: user + +chat-event-handler-app: + image: + name: "chat-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + DEEPLINK: deeplink + GEM_CALL: gemCall + MESSAGE: message + SEARCH: search + USER: user + +config-app: + image: + name: "config-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - postgres + - cassandra + - observability + +deeplink-app: + image: + name: "deeplink-core-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +device-app: + image: + name: "device-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - kafka + - postgres + - general + - observability + postgres_url: "jdbc:postgresql://postgresql:5432/device" + +dictionary-app: + image: + name: "dictionary-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - observability + +gem-call-app: + image: + name: "gem-call-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + CALL: call + CALL_REALTIME: callRealtime + CHAT: chat + DEEPLINK: deeplink + USER: user + resources: + requests: + cpu: 200m + memory: 512Mi + limits: + memory: 1Gi + +gem-call-events-handler-app: + image: + name: "gem-call-events-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + CHAT: chat + +huawei-app: + image: + name: "huawei-sender-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +ios-app: + image: + name: "ios-sender-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +license-app: + image: + name: "license-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - postgres + - general + - observability + postgres_url: "jdbc:postgresql://postgresql:5432/license" + +livekit-webhook-handler-app: + image: + name: "livekit-webhook-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +message-app: + image: + name: "message-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + CHAT: chat + DEEPLINK: deeplink + SEARCH: search + STICKER: sticker + UPLOAD: upload + extraEnv: + - name: LIVEKIT_API_KEY + valueFrom: + secretKeyRef: + name: livekit-secret + key: api-key + - name: LIVEKIT_SECRET + valueFrom: + secretKeyRef: + name: livekit-secret + key: secret + - name: KEYSPACE + value: "messages" + +message-call-event-handler-app: + image: + name: "message-call-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + UPLOAD: upload + USER: user + extraEnv: + - name: LIVEKIT_API_KEY + valueFrom: + secretKeyRef: + name: livekit-secret + key: api-key + - name: LIVEKIT_SECRET + valueFrom: + secretKeyRef: + name: livekit-secret + key: secret + - name: KEYSPACE + value: "messages" + +message-chat-event-handler-app: + image: + name: "message-chat-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + serviceHostPort: + USER: user + CHAT: chat + UPLOAD: upload + extraEnv: + - name: KEYSPACE + value: "messages" + +message-event-handler-app: + image: + name: "message-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + extraEnv: + - name: KEYSPACE + value: "messages" + +message-link-preview-handler-app: + image: + name: "message-link-preview-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +message-user-event-handler-app: + image: + name: "message-user-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +notification-app: + image: + name: "notification-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +notification-event-handler-app: + image: + name: "notification-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +realtime-app: + image: + name: "realtime-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +regular-chat-splitter-app: + image: + name: "regular-chat-splitter-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - chatsplitter + - observability + +search-app: + image: + name: "search-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - elastic + - cassandra + - kafka + - redis + - postgres + - general + - observability + serviceHostPort: + CHAT: chat + postgres_url: "jdbc:postgresql://postgresql:5432/search_db" + +search-event-handler-app: + image: + name: "search-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - elastic + - cassandra + - kafka + - redis + - postgres + - general + - observability + +sticker-app: + image: + name: "sticker-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - observability + +unregister-tokens-app: + image: + name: "unregister-tokens-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - observability + +upload-app: + image: + name: "upload-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - s3_upload + - general + - observability + +user-app: + image: + name: "user-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - s3 + - general + - user + - auth + - postgres + - observability + +voip-splitter-app: + image: + name: "voip-splitter-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - general + - s3 + - observability + +web-sender-app: + image: + name: "web-sender-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - s3 + - observability + +workspace-app: + image: + name: "workspace-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - general + - observability + +workspace-event-handler-app: + image: + name: "workspace-event-handler-app" + tag: "prod-2.1.1-RELEASE" + env: + globalEnvIncludes: + - configService + - cassandra + - kafka + - redis + - s3 + - observability