From 4a9367272c967030dffd0d6d465d7bc21c64bed8 Mon Sep 17 00:00:00 2001 From: Igor Nikulin Date: Tue, 22 Jul 2025 10:54:53 +0200 Subject: [PATCH] sync-yandex-apps --- charts/backend/Chart.yaml | 8 +- .../admin-app-k8s/templates/deployment.yaml | 1 + .../charts/admin-ui-app-k8s/.helmignore | 23 ++++++ .../charts/admin-ui-app-k8s/Chart.yaml | 6 ++ .../admin-ui-app-k8s/templates/_helpers.tpl | 24 ++++++ .../templates/deployment.yaml | 22 ++++++ .../admin-ui-app-k8s/templates/ingress.yaml | 38 ++++++++++ .../admin-ui-app-k8s/templates/service.yaml | 15 ++++ .../charts/admin-ui-app-k8s/values.yaml | 30 ++++++++ .../templates/deployment.yaml | 1 + .../bff-app-k8s/templates/deployment.yaml | 2 + charts/backend/charts/bff-app-k8s/values.yaml | 2 +- .../call-app-k8s/templates/deployment.yaml | 1 + .../templates/deployment.yaml | 1 + .../templates/deployment.yaml | 9 +-- .../charts/deeplink-app-k8s/values.yaml | 2 +- .../charts/devices-app-k8s/.helmignore | 23 ++++++ .../backend/charts/devices-app-k8s/Chart.yaml | 24 ++++++ .../devices-app-k8s/templates/_helpers.tpl | 27 +++++++ .../devices-app-k8s/templates/deployment.yaml | 76 +++++++++++++++++++ .../devices-app-k8s/templates/service.yaml | 13 ++++ .../charts/devices-app-k8s/values.yaml | 17 +++++ .../charts/license-app-k8s/.helmignore | 23 ++++++ .../backend/charts/license-app-k8s/Chart.yaml | 6 ++ .../license-app-k8s/templates/_helpers.tpl | 7 ++ .../license-app-k8s/templates/deployment.yaml | 32 ++++++++ .../license-app-k8s/templates/service.yaml | 18 +++++ .../charts/license-app-k8s/values.yaml | 11 +++ .../message-app-k8s/templates/deployment.yaml | 11 +-- .../templates/deployment.yaml | 1 + .../templates/deployment.yaml | 1 + .../templates/deployment.yaml | 1 + .../templates/deployment.yaml | 1 + .../templates/deployment.yaml | 1 + .../sticker-app-k8s/templates/deployment.yaml | 7 +- .../upload-app-k8s/templates/deployment.yaml | 1 + .../backend/templates/templates/_globals.tpl | 8 +- charts/backend/values.yaml | 68 ++++++++++++++++- 38 files changed, 530 insertions(+), 32 deletions(-) create mode 100755 charts/backend/charts/admin-ui-app-k8s/.helmignore create mode 100755 charts/backend/charts/admin-ui-app-k8s/Chart.yaml create mode 100755 charts/backend/charts/admin-ui-app-k8s/templates/_helpers.tpl create mode 100755 charts/backend/charts/admin-ui-app-k8s/templates/deployment.yaml create mode 100755 charts/backend/charts/admin-ui-app-k8s/templates/ingress.yaml create mode 100755 charts/backend/charts/admin-ui-app-k8s/templates/service.yaml create mode 100755 charts/backend/charts/admin-ui-app-k8s/values.yaml create mode 100755 charts/backend/charts/devices-app-k8s/.helmignore create mode 100755 charts/backend/charts/devices-app-k8s/Chart.yaml create mode 100755 charts/backend/charts/devices-app-k8s/templates/_helpers.tpl create mode 100755 charts/backend/charts/devices-app-k8s/templates/deployment.yaml create mode 100755 charts/backend/charts/devices-app-k8s/templates/service.yaml create mode 100755 charts/backend/charts/devices-app-k8s/values.yaml create mode 100755 charts/backend/charts/license-app-k8s/.helmignore create mode 100755 charts/backend/charts/license-app-k8s/Chart.yaml create mode 100755 charts/backend/charts/license-app-k8s/templates/_helpers.tpl create mode 100755 charts/backend/charts/license-app-k8s/templates/deployment.yaml create mode 100755 charts/backend/charts/license-app-k8s/templates/service.yaml create mode 100755 charts/backend/charts/license-app-k8s/values.yaml diff --git a/charts/backend/Chart.yaml b/charts/backend/Chart.yaml index b082f89..ec79857 100755 --- a/charts/backend/Chart.yaml +++ b/charts/backend/Chart.yaml @@ -122,4 +122,10 @@ dependencies: repository: file://charts/workspace-app-k8s - name: workspace-event-handler-app version: "0.1.0" - repository: file://charts/workspace-event-handler-app-k8s \ No newline at end of file + repository: file://charts/workspace-event-handler-app-k8s + - name: devices-app + version: "0.1.0" + repository: file://charts/devices-app-k8s + - name: license-app + version: "0.1.0" + repository: file://charts/license-app-k8s diff --git a/charts/backend/charts/admin-app-k8s/templates/deployment.yaml b/charts/backend/charts/admin-app-k8s/templates/deployment.yaml index 8bfc32e..8a5e3e2 100755 --- a/charts/backend/charts/admin-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/admin-app-k8s/templates/deployment.yaml @@ -50,6 +50,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + {{- include "global.env.general" . | nindent 12 }} - name: WORKSPACE_HOST value: "{{ .Values.env.workspace_host }}" - name: WORKSPACE_PORT diff --git a/charts/backend/charts/admin-ui-app-k8s/.helmignore b/charts/backend/charts/admin-ui-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend/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/backend/charts/admin-ui-app-k8s/Chart.yaml b/charts/backend/charts/admin-ui-app-k8s/Chart.yaml new file mode 100755 index 0000000..c1a022d --- /dev/null +++ b/charts/backend/charts/admin-ui-app-k8s/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: admin-ui-app +description: Helm chart for Admin ui app +type: application +version: 0.1.0 +appVersion: "1.0.0-SNAPSHOT" diff --git a/charts/backend/charts/admin-ui-app-k8s/templates/_helpers.tpl b/charts/backend/charts/admin-ui-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..ea0fbe8 --- /dev/null +++ b/charts/backend/charts/admin-ui-app-k8s/templates/_helpers.tpl @@ -0,0 +1,24 @@ +{{/* Common labels */}} +{{- define "admin-ui-app.labels" -}} +helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} +app.kubernetes.io/name: {{ include "admin-ui-app.name" . }} +app.kubernetes.io/instance: {{ .Chart.Name }} +app.kubernetes.io/version: {{ .Chart.AppVersion }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* Name */}} +{{- define "admin-ui-app.name" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* Fullname */}} +{{- define "admin-ui-app.fullname" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* Selector labels */}} +{{- define "admin-ui-app.selectorLabels" -}} +app.kubernetes.io/name: {{ include "admin-ui-app.name" . }} +app.kubernetes.io/instance: {{ .Chart.Name }} +{{- end }} diff --git a/charts/backend/charts/admin-ui-app-k8s/templates/deployment.yaml b/charts/backend/charts/admin-ui-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..5dd9ab9 --- /dev/null +++ b/charts/backend/charts/admin-ui-app-k8s/templates/deployment.yaml @@ -0,0 +1,22 @@ +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: + labels: + {{- include "admin-ui-app.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: admin-ui-app + ports: + - containerPort: 9090 + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/charts/backend/charts/admin-ui-app-k8s/templates/ingress.yaml b/charts/backend/charts/admin-ui-app-k8s/templates/ingress.yaml new file mode 100755 index 0000000..514c084 --- /dev/null +++ b/charts/backend/charts/admin-ui-app-k8s/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Values.ingress.name }} + namespace: {{ .Release.Namespace | default "default" }} + {{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + + tls: +{{- range .Values.ingress.tls }} + - hosts: +{{- range .hosts }} + - {{ . | quote }} +{{- end }} + secretName: {{ .secretName | quote }} +{{- end }} + + rules: +{{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: +{{- range .paths }} + - path: {{ .path | quote }} + pathType: {{ .pathType }} + backend: + service: + name: {{ $.Values.service.name }} + port: + number: {{ $.Values.service.port }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/backend/charts/admin-ui-app-k8s/templates/service.yaml b/charts/backend/charts/admin-ui-app-k8s/templates/service.yaml new file mode 100755 index 0000000..6848da3 --- /dev/null +++ b/charts/backend/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 }} + selector: + {{- include "admin-ui-app.selectorLabels" . | nindent 4 }} + ports: + - name: http + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP diff --git a/charts/backend/charts/admin-ui-app-k8s/values.yaml b/charts/backend/charts/admin-ui-app-k8s/values.yaml new file mode 100755 index 0000000..5f9de05 --- /dev/null +++ b/charts/backend/charts/admin-ui-app-k8s/values.yaml @@ -0,0 +1,30 @@ +replicaCount: 1 + +image: + repository: registry.co-work.ru/admin-panel-cowork + tag: preprod + pullPolicy: Always + +service: + name: admin-ui-app + 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.co-work.ru + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - admin-ui.co-work.ru + secretName: co-work-secret diff --git a/charts/backend/charts/bff-admin-app-k8s/templates/deployment.yaml b/charts/backend/charts/bff-admin-app-k8s/templates/deployment.yaml index a463d63..be244d2 100755 --- a/charts/backend/charts/bff-admin-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/bff-admin-app-k8s/templates/deployment.yaml @@ -19,6 +19,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + {{- include "global.env.general" . | nindent 12 }} - name: SWAGGER_HOST value: "{{ .Values.env.swagger_host }}" - name: SWAGGER_PORT diff --git a/charts/backend/charts/bff-app-k8s/templates/deployment.yaml b/charts/backend/charts/bff-app-k8s/templates/deployment.yaml index 2e135ef..39b9aab 100755 --- a/charts/backend/charts/bff-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/bff-app-k8s/templates/deployment.yaml @@ -85,6 +85,8 @@ spec: value: {{ .Values.env.services.user | quote }} - name: GRPC_CLIENT_WORKSPACE_URL value: {{ .Values.env.services.workspace | quote }} + - name: GRPC_CLIENT_DEVICE_URL + value: {{ .Values.env.services.device | quote }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/backend/charts/bff-app-k8s/values.yaml b/charts/backend/charts/bff-app-k8s/values.yaml index b399569..62054b8 100755 --- a/charts/backend/charts/bff-app-k8s/values.yaml +++ b/charts/backend/charts/bff-app-k8s/values.yaml @@ -39,7 +39,7 @@ env: sticker: http://sticker-app:9090 upload: http://upload-app:9090 workspace: http://workspace-app:9090 - + device: http://devices-app:9090 resources: limits: memory: 1Gi diff --git a/charts/backend/charts/call-app-k8s/templates/deployment.yaml b/charts/backend/charts/call-app-k8s/templates/deployment.yaml index 127eda7..7f7f50a 100755 --- a/charts/backend/charts/call-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/call-app-k8s/templates/deployment.yaml @@ -61,6 +61,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: KEYCLOAK_URL value: {{ .Values.env.keycloak.url | quote }} - name: LIVEKIT_API_KEY diff --git a/charts/backend/charts/call-realtime-app-k8s/templates/deployment.yaml b/charts/backend/charts/call-realtime-app-k8s/templates/deployment.yaml index 1febce4..f4032a6 100755 --- a/charts/backend/charts/call-realtime-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/call-realtime-app-k8s/templates/deployment.yaml @@ -63,6 +63,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: LIVEKIT_API_KEY valueFrom: secretKeyRef: diff --git a/charts/backend/charts/deeplink-app-k8s/templates/deployment.yaml b/charts/backend/charts/deeplink-app-k8s/templates/deployment.yaml index 9e430ea..28ad211 100755 --- a/charts/backend/charts/deeplink-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/deeplink-app-k8s/templates/deployment.yaml @@ -24,6 +24,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: BRANCHIO_ACCESS valueFrom: secretKeyRef: @@ -54,11 +55,6 @@ spec: secretKeyRef: name: {{ .Values.secrets.branchio }} key: branchio-url - - name: DEEPLINK_DOMAIN - valueFrom: - secretKeyRef: - name: {{ .Values.secrets.branchio }} - key: deeplink-domain - name: DEEPLINK_WEBDOMAIN valueFrom: secretKeyRef: @@ -66,7 +62,4 @@ spec: key: deeplink-webdomain - name: DEEPLINK_TENANT value: {{ .Values.deeplink.tenant | quote }} - - - name: KEYCLOAK_URL - value: {{ .Values.keycloak.url | quote }} restartPolicy: Always diff --git a/charts/backend/charts/deeplink-app-k8s/values.yaml b/charts/backend/charts/deeplink-app-k8s/values.yaml index 5234d90..fd3f5cc 100755 --- a/charts/backend/charts/deeplink-app-k8s/values.yaml +++ b/charts/backend/charts/deeplink-app-k8s/values.yaml @@ -20,4 +20,4 @@ secrets: env: CASSANDRA_PORT: "9042" deeplink: - tenant: stage.co-work.local + tenant: preprod-co-work.ru diff --git a/charts/backend/charts/devices-app-k8s/.helmignore b/charts/backend/charts/devices-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend/charts/devices-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/backend/charts/devices-app-k8s/Chart.yaml b/charts/backend/charts/devices-app-k8s/Chart.yaml new file mode 100755 index 0000000..0c4ed96 --- /dev/null +++ b/charts/backend/charts/devices-app-k8s/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: devices-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" diff --git a/charts/backend/charts/devices-app-k8s/templates/_helpers.tpl b/charts/backend/charts/devices-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..560538a --- /dev/null +++ b/charts/backend/charts/devices-app-k8s/templates/_helpers.tpl @@ -0,0 +1,27 @@ +{{/* +Return the name of the chart +*/}} +{{- define "devices-app.name" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "devices-app.fullname" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "devices-app.labels" -}} +helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} +app.kubernetes.io/name: {{ include "devices-app.name" . }} +app.kubernetes.io/instance: {{ .Chart.Name }} +app.kubernetes.io/version: {{ .Chart.AppVersion }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} +{{- define "devices-app.quote" -}} +{{- . | quote }} +{{- end }} diff --git a/charts/backend/charts/devices-app-k8s/templates/deployment.yaml b/charts/backend/charts/devices-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..996902b --- /dev/null +++ b/charts/backend/charts/devices-app-k8s/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "devices-app.fullname" . }} + labels: + {{- include "devices-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "devices-app.name" . }} + template: + metadata: + labels: + app: {{ include "devices-app.name" . }} + spec: + volumes: + - 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: {} + initContainers: + - name: import-ca + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + 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 && + keytool -import -trustcacerts -storepass changeit -noprompt \ + -alias gemcert \ + -file /app/resources/RootCA_${CERT_ALIAS}.crt \ + -keystore /tmp/cacerts/cacerts + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: 9090 + name: grpc + protocol: TCP + env: + {{- include "global.env.kafka" . | nindent 12 }} + {{- include "global.env.postgres" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} + - name: KAFKA + value: {{ .Values.env.KAFKA }} + - name: USER_HOST + value: {{ .Values.env.USER_HOST }} + - name: USER_PORT + value: {{ include "devices-app.quote" .Values.env.USER_PORT }} + - name: AUTH_HOST + value: {{ .Values.env.AUTH_HOST }} + - name: AUTH_PORT + value: {{ include "devices-app.quote" .Values.env.AUTH_PORT }} + - name: POSTGRES_URL + value: {{ .Values.env.postgres.url | quote }} + - name: KEYCLOAK_URL + value: {{ .Values.env.keycloak.url | quote }} + volumeMounts: + - name: cacerts-volume + mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts + subPath: cacerts + restartPolicy: Always diff --git a/charts/backend/charts/devices-app-k8s/templates/service.yaml b/charts/backend/charts/devices-app-k8s/templates/service.yaml new file mode 100755 index 0000000..b93565b --- /dev/null +++ b/charts/backend/charts/devices-app-k8s/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "devices-app.fullname" . }} + labels: + {{- include "devices-app.labels" . | nindent 4 }} +spec: + selector: + app: {{ include "devices-app.name" . }} + ports: + - name: http + port: 9090 + targetPort: 9090 diff --git a/charts/backend/charts/devices-app-k8s/values.yaml b/charts/backend/charts/devices-app-k8s/values.yaml new file mode 100755 index 0000000..68f5c02 --- /dev/null +++ b/charts/backend/charts/devices-app-k8s/values.yaml @@ -0,0 +1,17 @@ +replicaCount: 1 + +image: + repository: docker.ii-p001.local/device-app + tag: 1.0.0-SNAPSHOT + pullPolicy: Always + +env: + KAFKA: "kafka.kafka.svc.cluster.local:9092,kafka.kafka.svc.cluster.local:9092,kafka.kafka.svc.cluster.local:9092" + USER_HOST: user-app + USER_PORT: 9090 + AUTH_HOST: auth-app + AUTH_PORT: 9090 + keycloak: + url: https://iam.stage.co-work.local/realms/co-work + postgres: + url: jdbc:postgresql://postgresql-ha-pgpool:5432/device diff --git a/charts/backend/charts/license-app-k8s/.helmignore b/charts/backend/charts/license-app-k8s/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/backend/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/backend/charts/license-app-k8s/Chart.yaml b/charts/backend/charts/license-app-k8s/Chart.yaml new file mode 100755 index 0000000..c936fad --- /dev/null +++ b/charts/backend/charts/license-app-k8s/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: license-app +description: Helm chart for License App +type: application +version: 0.1.0 +appVersion: "1.0.0-SNAPSHOT" diff --git a/charts/backend/charts/license-app-k8s/templates/_helpers.tpl b/charts/backend/charts/license-app-k8s/templates/_helpers.tpl new file mode 100755 index 0000000..f3ceeb4 --- /dev/null +++ b/charts/backend/charts/license-app-k8s/templates/_helpers.tpl @@ -0,0 +1,7 @@ +{{- define "license-app.name" -}} +{{ .Chart.Name }} +{{- end -}} + +{{- define "license-app.fullname" -}} +{{ .Chart.Name }} +{{- end -}} diff --git a/charts/backend/charts/license-app-k8s/templates/deployment.yaml b/charts/backend/charts/license-app-k8s/templates/deployment.yaml new file mode 100755 index 0000000..0c0679a --- /dev/null +++ b/charts/backend/charts/license-app-k8s/templates/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "license-app.fullname" . }} + labels: + app: {{ include "license-app.name" . }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "license-app.name" . }} + template: + metadata: + labels: + app: {{ include "license-app.name" . }} + spec: + containers: + - name: license-app + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9090 + name: grpc + protocol: TCP + env: + {{- include "global.env.postgres" . | nindent 12 }} + - name: POSTGRES_URL + value: {{ .Values.env.postgres.url | quote }} + restartPolicy: Always diff --git a/charts/backend/charts/license-app-k8s/templates/service.yaml b/charts/backend/charts/license-app-k8s/templates/service.yaml new file mode 100755 index 0000000..6b5fe40 --- /dev/null +++ b/charts/backend/charts/license-app-k8s/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "license-app.fullname" . }} + labels: + app: {{ include "license-app.name" . }} +spec: + selector: + app: {{ include "license-app.name" . }} + ports: + - name: http + protocol: TCP + port: 8080 + targetPort: 8080 + - name: grpc + protocol: TCP + port: 9090 + targetPort: 9090 diff --git a/charts/backend/charts/license-app-k8s/values.yaml b/charts/backend/charts/license-app-k8s/values.yaml new file mode 100755 index 0000000..54bb0e0 --- /dev/null +++ b/charts/backend/charts/license-app-k8s/values.yaml @@ -0,0 +1,11 @@ +replicaCount: 1 + +image: + repository: docker.ii-p001.local/license-app + tag: 1.0.0-SNAPSHOT + pullPolicy: Always + +env: + postgres: + url: jdbc:postgresql://postgresql-ha-pgpool:5432/license + username: postgres diff --git a/charts/backend/charts/message-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-app-k8s/templates/deployment.yaml index 21eef5b..f6c26e4 100755 --- a/charts/backend/charts/message-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-app-k8s/templates/deployment.yaml @@ -54,10 +54,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} - - name: TENANT_ID - value: {{ .Values.env.tenant_id | quote }} - - name: STICKER_BASE_URL - value: {{ .Values.env.sticker_base_url | quote }} + {{- include "global.env.general" . | nindent 12 }} - name: CHAT_HOST value: {{ .Values.env.chat.host | quote }} - name: CHAT_PORT @@ -70,8 +67,6 @@ spec: value: {{ .Values.env.livekit.api_key | quote }} - name: LIVEKIT_SECRET value: {{ .Values.env.livekit.secret | quote }} - - name: KEYCLOAK_URL - value: {{ .Values.env.keycloak.url | quote }} - name: KEYSPACE value: {{ .Values.env.keyspace | quote }} - name: SEARCH_HOST @@ -86,10 +81,6 @@ spec: value: {{ .Values.env.upload.host | quote }} - name: UPLOAD_PORT value: {{ .Values.env.upload.port | quote }} - - name: USER_HOST - value: {{ .Values.env.user.host | quote }} - - name: USER_PORT - value: {{ .Values.env.user.port | quote }} volumeMounts: - name: cacerts-volume mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts diff --git a/charts/backend/charts/message-call-event-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-call-event-handler-app-k8s/templates/deployment.yaml index 8d2363c..70801d1 100755 --- a/charts/backend/charts/message-call-event-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-call-event-handler-app-k8s/templates/deployment.yaml @@ -60,6 +60,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: LIVEKIT_API_KEY valueFrom: secretKeyRef: diff --git a/charts/backend/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml index b05ca2b..8d02677 100755 --- a/charts/backend/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-chat-event-handler-app-k8s/templates/deployment.yaml @@ -54,6 +54,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: USER_HOST value: {{ .Values.env.user.host | quote }} - name: USER_PORT diff --git a/charts/backend/charts/message-event-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-event-handler-app-k8s/templates/deployment.yaml index 4a84063..0cdbd65 100755 --- a/charts/backend/charts/message-event-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-event-handler-app-k8s/templates/deployment.yaml @@ -56,6 +56,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: KEYSPACE value: {{ .Values.env.cassandra.keyspace | quote }} volumeMounts: diff --git a/charts/backend/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml index 3c14ee8..6ffb2e1 100755 --- a/charts/backend/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-link-preview-handler-app-k8s/templates/deployment.yaml @@ -56,6 +56,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: KEYSPACE value: {{ .Values.env.cassandra.keyspace | quote }} - name: UPLOAD_HOST diff --git a/charts/backend/charts/message-user-event-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-user-event-handler-app-k8s/templates/deployment.yaml index 746de0f..2b9e6d5 100755 --- a/charts/backend/charts/message-user-event-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-user-event-handler-app-k8s/templates/deployment.yaml @@ -51,6 +51,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: KEYSPACE value: {{ .Values.env.cassandra.keyspace | quote }} volumeMounts: diff --git a/charts/backend/charts/sticker-app-k8s/templates/deployment.yaml b/charts/backend/charts/sticker-app-k8s/templates/deployment.yaml index c9ee922..c1b65b7 100755 --- a/charts/backend/charts/sticker-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/sticker-app-k8s/templates/deployment.yaml @@ -55,12 +55,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} - - name: TENANT_ID - value: {{ .Values.env.TENANT_ID | quote }} - - name: STICKER_BASE_URL - value: {{ .Values.env.STICKER_BASE_URL | quote }} - - name: KEYCLOAK_URL - value: {{ .Values.env.keycloak.url | quote }} + {{- include "global.env.general" . | nindent 12 }} - name: KEYSPACE value: {{ .Values.env.keyspace | quote }} volumeMounts: diff --git a/charts/backend/charts/upload-app-k8s/templates/deployment.yaml b/charts/backend/charts/upload-app-k8s/templates/deployment.yaml index da3c708..c6ebcd7 100755 --- a/charts/backend/charts/upload-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/upload-app-k8s/templates/deployment.yaml @@ -51,6 +51,7 @@ spec: - containerPort: 9090 env: {{- include "global.env.s3_upload" . | nindent 12 }} + {{- include "global.env.general" . | nindent 12 }} - name: TENANT_ID value: {{ .Values.env.TENANT_ID | quote }} - name: KEYCLOAK_URL diff --git a/charts/backend/templates/templates/_globals.tpl b/charts/backend/templates/templates/_globals.tpl index c12d48e..6594de0 100755 --- a/charts/backend/templates/templates/_globals.tpl +++ b/charts/backend/templates/templates/_globals.tpl @@ -33,4 +33,10 @@ {{- if .Values.global.infrastructure.s3_upload.enabled -}} {{- tpl (.Values.global.envTemplates.s3_upload | toYaml) . | nindent 0 -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{- define "global.env.general" -}} + {{- if .Values.global.infrastructure.general.enabled -}} + {{- tpl (.Values.global.envTemplates.general | toYaml) . | nindent 0 -}} + {{- end -}} +{{- end -}} diff --git a/charts/backend/values.yaml b/charts/backend/values.yaml index eb926fb..3065254 100755 --- a/charts/backend/values.yaml +++ b/charts/backend/values.yaml @@ -1,7 +1,27 @@ global: infrastructure: - tenant_id: 412eb2e1-9669-4b74-a56a-6198f3b5338a - sticker_base_url: store-s001.co-work.ru:9000 + general: + enabled: true + tenant_id: "412eb2e1-9669-4b74-a56a-6198f3b5338a" + sticker_base_url: "store-s001.co-work.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: "devices-app" + device_port: 9090 + auth_host: "auth-app" + auth_port: 9090 + license_host: "license-app" + license_port: 9090 + keycloak_url: "https://iam.stage.co-work.local/realms/co-work" + kafka: enabled: true server: "kafka:9092,kafka:9092,kafka:9092" @@ -96,6 +116,46 @@ global: 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 }}" + kafka: &kafka-env - name: KAFKA value: "{{ .Values.global.infrastructure.kafka.server }}" @@ -136,7 +196,7 @@ global: key: "{{ .Values.global.infrastructure.cassandra.passwordKey }}" - name: CASSANDRA_PORT value: "{{ .Values.global.infrastructure.cassandra.port }}" - + postgres: &postgres-env - name: POSTGRES_USERNAME value: "{{ .Values.global.infrastructure.postgres.username }}" @@ -171,4 +231,4 @@ global: valueFrom: secretKeyRef: name: "{{ .Values.global.infrastructure.s3_upload.secret }}" - key: "{{ .Values.global.infrastructure.s3_upload.secretKey }}" \ No newline at end of file + key: "{{ .Values.global.infrastructure.s3_upload.secretKey }}"