Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17d7a43be7 | ||
|
|
5e43578d4f | ||
|
|
cb3c9fa7e1 | ||
|
|
98274b1858 | ||
|
|
04d9f75d17 | ||
| 0818b65fb6 | |||
|
|
218a59a539 | ||
|
|
ed0fb7a64c | ||
|
|
55bc42ecbb | ||
|
|
d533095b8f | ||
| 4dc99af141 | |||
|
|
39e917aa9e | ||
|
|
f576b1a919 | ||
|
|
78a123b55b | ||
|
|
69c0340cb4 | ||
|
|
1963a3f2d9 | ||
|
|
fe149fcf8b | ||
|
|
8bd8d743e4 | ||
|
|
4f801b48e9 | ||
|
|
3a6214f113 | ||
|
|
9ce09df7b1 | ||
|
|
3420f3e5af | ||
|
|
88e9084833 | ||
|
|
b036f2b644 | ||
|
|
018414a676 |
@ -1,178 +0,0 @@
|
|||||||
import copy
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
||||||
CHARTS = os.path.join(REPO, ".rmk-charts")
|
|
||||||
OUT = os.path.join(REPO, "rmk", "infrastructure")
|
|
||||||
WORK = os.path.join(REPO, ".rmk-render", "work")
|
|
||||||
|
|
||||||
COMPONENTS = {
|
|
||||||
# component: (chart tgz, overlay patch file, [extra plain yaml files])
|
|
||||||
"camunda": ("camunda-contour-11.0.14.tgz", "camunda.yaml",
|
|
||||||
["keycloak-krb5.yaml", "uralkali-ca.yaml", "ldap-debug/pod.yaml"]),
|
|
||||||
"istio-base": ("istio-base-contour-1.24.0.tgz", None, []),
|
|
||||||
"istio-config": ("istio-config-contour-0.1.0.tgz", "istio-config.yaml",
|
|
||||||
["minio-serviceentry.yaml", "zitadel-jwks-serviceentry.yaml"]),
|
|
||||||
"istio-gateway": ("istio-gateway-contour-1.24.0.tgz", "istio-gateway.yaml", []),
|
|
||||||
"istio-pilot": ("istiod-contour-1.24.0.tgz", "istio-pilot.yaml", []),
|
|
||||||
"kafka": ("kafka-contour-0.1.15.tgz", "kafka.yaml", ["kafka-scram-users-job.yaml"]),
|
|
||||||
"rabbitmq": ("rabbitmq-contour-15.2.4.tgz", "rabbitmq.yaml", []),
|
|
||||||
"superset": ("superset-prod-0.13.3.tgz", "superset.yaml", []),
|
|
||||||
"trino": ("trino-prod-0.33.0.tgz", "trino.yaml", []),
|
|
||||||
"vault": ("vault-contour-0.2.3.tgz", "vault.yaml", []),
|
|
||||||
"zitadel": ("idp-contour-4.12.13.tgz", "zitadel.yaml", ["uralkali-ca.yaml"]),
|
|
||||||
}
|
|
||||||
|
|
||||||
NAMESPACE_PATCH = {"superset": "superset-namespace.yaml", "trino": "trino-namespace.yaml"}
|
|
||||||
|
|
||||||
|
|
||||||
def load(p):
|
|
||||||
with open(p, encoding="utf-8") as f:
|
|
||||||
return yaml.safe_load(f)
|
|
||||||
|
|
||||||
|
|
||||||
def sm_merge(base, overlay):
|
|
||||||
"""Approximate kustomize strategic merge: dicts recursive, lists of dicts
|
|
||||||
merged by 'name', everything else replaced."""
|
|
||||||
if isinstance(base, dict) and isinstance(overlay, dict):
|
|
||||||
out = copy.deepcopy(base)
|
|
||||||
for k, v in overlay.items():
|
|
||||||
out[k] = sm_merge(out[k], v) if k in out else copy.deepcopy(v)
|
|
||||||
return out
|
|
||||||
if isinstance(base, list) and isinstance(overlay, list):
|
|
||||||
if all(isinstance(i, dict) and "name" in i for i in base + overlay) and base and overlay:
|
|
||||||
out = copy.deepcopy(base)
|
|
||||||
idx = {i["name"]: n for n, i in enumerate(out)}
|
|
||||||
for item in overlay:
|
|
||||||
if item["name"] in idx:
|
|
||||||
out[idx[item["name"]]] = sm_merge(out[idx[item["name"]]], item)
|
|
||||||
else:
|
|
||||||
out.append(copy.deepcopy(item))
|
|
||||||
return out
|
|
||||||
return copy.deepcopy(overlay)
|
|
||||||
return copy.deepcopy(overlay)
|
|
||||||
|
|
||||||
|
|
||||||
def run(cmd, **kw):
|
|
||||||
r = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", **kw)
|
|
||||||
if r.returncode != 0:
|
|
||||||
raise RuntimeError(f"FAILED {' '.join(cmd)}\n{r.stdout}\n{r.stderr}")
|
|
||||||
return r.stdout
|
|
||||||
|
|
||||||
|
|
||||||
def write_docs(yaml_text, outdir, prefix_note=""):
|
|
||||||
os.makedirs(outdir, exist_ok=True)
|
|
||||||
written = []
|
|
||||||
seen = {}
|
|
||||||
for doc in yaml.safe_load_all(yaml_text):
|
|
||||||
if not doc or not isinstance(doc, dict) or "kind" not in doc:
|
|
||||||
continue
|
|
||||||
kind = doc["kind"].lower()
|
|
||||||
name = doc.get("metadata", {}).get("name", "unnamed")
|
|
||||||
fname = f"{kind}-{name}.yaml"
|
|
||||||
fname = re.sub(r"[^A-Za-z0-9_.-]", "-", fname)
|
|
||||||
if fname in seen:
|
|
||||||
ns = doc.get("metadata", {}).get("namespace")
|
|
||||||
if ns:
|
|
||||||
fname = f"{kind}-{ns}-{name}.yaml"
|
|
||||||
fname = re.sub(r"[^A-Za-z0-9_.-]", "-", fname)
|
|
||||||
if fname in seen:
|
|
||||||
seen[fname] += 1
|
|
||||||
fname = fname.replace(".yaml", f"-{seen[fname]}.yaml")
|
|
||||||
seen[fname] = seen.get(fname, 0) + 1
|
|
||||||
with open(os.path.join(outdir, fname), "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
f.write(yaml.safe_dump(doc, allow_unicode=True, sort_keys=False, width=4096))
|
|
||||||
written.append(fname)
|
|
||||||
return written
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
shutil.rmtree(WORK, ignore_errors=True)
|
|
||||||
os.makedirs(WORK, exist_ok=True)
|
|
||||||
summary = {}
|
|
||||||
for comp, (tgz, patch_file, extras) in COMPONENTS.items():
|
|
||||||
cdir = os.path.join(REPO, "infrastructure", comp)
|
|
||||||
hr = load(os.path.join(cdir, "base", "helmrelease.yaml"))
|
|
||||||
overlay = None
|
|
||||||
if patch_file:
|
|
||||||
overlay = load(os.path.join(cdir, "uralkal", patch_file))
|
|
||||||
hr = sm_merge(hr, overlay)
|
|
||||||
spec = hr["spec"]
|
|
||||||
name = spec.get("releaseName") or hr["metadata"]["name"]
|
|
||||||
ns = hr["metadata"]["namespace"]
|
|
||||||
values = spec.get("values", {})
|
|
||||||
wdir = os.path.join(WORK, comp)
|
|
||||||
os.makedirs(wdir, exist_ok=True)
|
|
||||||
vfile = os.path.join(wdir, "values.yaml")
|
|
||||||
with open(vfile, "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
yaml.safe_dump(values, f, allow_unicode=True, sort_keys=False, width=4096)
|
|
||||||
|
|
||||||
chart = os.path.join(CHARTS, tgz)
|
|
||||||
rendered = run(["helm", "template", name, chart, "-n", ns,
|
|
||||||
"-f", vfile, "--include-crds", "--kube-version", "1.30.0"])
|
|
||||||
|
|
||||||
# apply postRenderers (JSON6902 patches via kubectl kustomize)
|
|
||||||
prs = spec.get("postRenderers", [])
|
|
||||||
patches = []
|
|
||||||
for pr in prs:
|
|
||||||
for p in pr.get("kustomize", {}).get("patches", []):
|
|
||||||
patches.append({"target": p["target"], "patch": p["patch"]})
|
|
||||||
if patches:
|
|
||||||
with open(os.path.join(wdir, "rendered.yaml"), "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
f.write(rendered)
|
|
||||||
kust = {"apiVersion": "kustomize.config.k8s.io/v1beta1",
|
|
||||||
"kind": "Kustomization",
|
|
||||||
"resources": ["rendered.yaml"],
|
|
||||||
"patches": patches}
|
|
||||||
with open(os.path.join(wdir, "kustomization.yaml"), "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
yaml.safe_dump(kust, f, sort_keys=False)
|
|
||||||
rendered = run(["kubectl", "kustomize", wdir])
|
|
||||||
|
|
||||||
outdir = os.path.join(OUT, comp)
|
|
||||||
shutil.rmtree(outdir, ignore_errors=True)
|
|
||||||
files = write_docs(rendered, outdir)
|
|
||||||
|
|
||||||
# base namespace
|
|
||||||
nsfile = os.path.join(cdir, "base", "namespace.yaml")
|
|
||||||
if os.path.exists(nsfile):
|
|
||||||
nsdocs = [d for d in yaml.safe_load_all(open(nsfile, encoding="utf-8")) if d]
|
|
||||||
nspatch = NAMESPACE_PATCH.get(comp)
|
|
||||||
if nspatch:
|
|
||||||
nsdocs = [sm_merge(d, load(os.path.join(cdir, "uralkal", nspatch)))
|
|
||||||
if d.get("kind") == "Namespace" else d for d in nsdocs]
|
|
||||||
for d in nsdocs:
|
|
||||||
fname = re.sub(r"[^A-Za-z0-9_.-]", "-",
|
|
||||||
f"{d['kind'].lower()}-{d['metadata']['name']}.yaml")
|
|
||||||
with open(os.path.join(outdir, fname), "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
yaml.safe_dump(d, f, allow_unicode=True, sort_keys=False)
|
|
||||||
files.append(fname)
|
|
||||||
|
|
||||||
# extra plain resources from overlay
|
|
||||||
for extra in extras:
|
|
||||||
src = os.path.join(cdir, "uralkal", extra)
|
|
||||||
if not os.path.exists(src):
|
|
||||||
continue
|
|
||||||
for doc in yaml.safe_load_all(open(src, encoding="utf-8")):
|
|
||||||
if not doc:
|
|
||||||
continue
|
|
||||||
fname = re.sub(r"[^A-Za-z0-9_.-]", "-",
|
|
||||||
f"{doc['kind'].lower()}-{doc['metadata']['name']}.yaml")
|
|
||||||
with open(os.path.join(outdir, fname), "w", encoding="utf-8", newline="\n") as f:
|
|
||||||
yaml.safe_dump(doc, f, allow_unicode=True, sort_keys=False, width=4096)
|
|
||||||
files.append(fname)
|
|
||||||
|
|
||||||
summary[comp] = files
|
|
||||||
print(f"[{comp}] {len(files)} files")
|
|
||||||
|
|
||||||
print("\nDONE")
|
|
||||||
return summary
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
181
apps/ams-sync/nn-dev/helmrelease.yaml
Normal file
181
apps/ams-sync/nn-dev/helmrelease.yaml
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: ams-sync
|
||||||
|
namespace: ams-sync
|
||||||
|
spec:
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
version: 0.1.9
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: ams-sync-vault
|
||||||
|
secretEnvs: []
|
||||||
|
volumes:
|
||||||
|
_default: []
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
proxy.istio.io/config: '{"holdApplicationUntilProxyStarts":true}'
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200,9092
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: ams-sync
|
||||||
|
vault.hashicorp.com/agent-inject-secret-ams-sync-kafka: secrets/data/kafka/apps/ams-sync
|
||||||
|
vault.hashicorp.com/agent-inject-template-ams-sync-kafka: '{{- with secret
|
||||||
|
"secrets/data/kafka/apps/ams-sync" -}}
|
||||||
|
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS=''["{{ index .Data.data "bootstrap_servers"
|
||||||
|
}}"]''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-ams-sync-zitadel: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-ams-sync-zitadel: '{{- with
|
||||||
|
secret "secrets/data/zitadel/setup" -}}
|
||||||
|
|
||||||
|
ZITADEL_SERVICE_ACCESS_TOKEN=''{{ index .Data.data "django_zitadel_access_token"
|
||||||
|
}}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-ams-sync-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-ams-sync-auth: '{{- with secret
|
||||||
|
"secrets/data/vault/common/django_auth" -}}
|
||||||
|
|
||||||
|
AUTH_ADMIN_USERNAME=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
AUTH_ADMIN_PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-ams-sync-db: secrets/data/apps/django/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-ams-sync-db: '{{- with secret
|
||||||
|
"secrets/data/apps/django/postgres" -}}
|
||||||
|
|
||||||
|
USER_DB_NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
USER_DB_USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
USER_DB_PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
USER_DB_HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
USER_DB_PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
sidecar.istio.io/inject: 'true'
|
||||||
|
envs:
|
||||||
|
- name: AMS_SYNC_TOPIC
|
||||||
|
value:
|
||||||
|
_default: ams-sync
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: PRODUCTION
|
||||||
|
- name: HOST_ORGANIZATION_ID
|
||||||
|
value:
|
||||||
|
_default: ${ZITADEL_ORG_ID}
|
||||||
|
- name: ALERT_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'False'
|
||||||
|
- name: VERIFY_USERS
|
||||||
|
value:
|
||||||
|
_default: 'True'
|
||||||
|
- name: USER_SERVER_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_PLATFORM}
|
||||||
|
- name: AUTH_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: RESOURCES_INTERNAL_HOST
|
||||||
|
value:
|
||||||
|
_default: http://iam-backend.iam.svc.cluster.local:8000
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_LOGIN}
|
||||||
|
- name: KAFKA_SECURITY_PROTOCOL
|
||||||
|
value:
|
||||||
|
_default: SASL_PLAINTEXT
|
||||||
|
- name: KAFKA_SASL_MECHANISM
|
||||||
|
value:
|
||||||
|
_default: SCRAM-SHA-512
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: ''
|
||||||
|
- name: TELEGRAM_TOKEN
|
||||||
|
value:
|
||||||
|
_default: 000000:disabled
|
||||||
|
- name: TELEGRAM_GROUP_ID
|
||||||
|
value:
|
||||||
|
_default: '0'
|
||||||
|
- name: PYTHONUNBUFFERED
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: HEALTHCHECK_PORT
|
||||||
|
value:
|
||||||
|
_default: '8008'
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
deployment:
|
||||||
|
port:
|
||||||
|
_default: 8008
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/ams-sync-kafka
|
||||||
|
|
||||||
|
. /vault/secrets/ams-sync-zitadel
|
||||||
|
|
||||||
|
. /vault/secrets/ams-sync-auth
|
||||||
|
|
||||||
|
. /vault/secrets/ams-sync-db
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec python3 cmd.py run
|
||||||
|
|
||||||
|
'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
type: &id001
|
||||||
|
_default: tcpSocket
|
||||||
|
tcpSocket: &id002
|
||||||
|
port:
|
||||||
|
_default: 8008
|
||||||
|
periodSeconds:
|
||||||
|
_default: 5
|
||||||
|
timeoutSeconds: &id003
|
||||||
|
_default: 2
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
type: *id001
|
||||||
|
tcpSocket: *id002
|
||||||
|
periodSeconds:
|
||||||
|
_default: 30
|
||||||
|
timeoutSeconds: *id003
|
||||||
|
initialDelaySeconds:
|
||||||
|
_default: 30
|
||||||
36
apps/ams-sync/nn-dev/kustomization.yaml
Normal file
36
apps/ams-sync/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
configMapGenerator:
|
||||||
|
- name: ams-sync-contour-env
|
||||||
|
literals:
|
||||||
|
- USER_SERVER_HOST=https://${HOST_PLATFORM}
|
||||||
|
- AUTH_HOST=http://backend-svc.django.svc.cluster.local:80
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: ams-sync-contour-env
|
||||||
|
fieldPath: data.USER_SERVER_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: ams-sync
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=USER_SERVER_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: ams-sync-contour-env
|
||||||
|
fieldPath: data.AUTH_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: ams-sync
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=AUTH_HOST].value._default
|
||||||
|
patches:
|
||||||
|
- path: helmrelease.yaml
|
||||||
23
apps/attachments/nn-dev/helmrelease.yaml
Normal file
23
apps/attachments/nn-dev/helmrelease.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: attachments
|
||||||
|
namespace: attachments
|
||||||
|
annotations:
|
||||||
|
kustomize.toolkit.fluxcd.io/substitute: disabled
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
attachments:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-attachments-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/attachments" -}}
|
||||||
|
YANDEX_S3_ENDPOINT_URL=minio.storage.svc.cluster.local:9000
|
||||||
|
YANDEX_S3_ACCESS_KEY_ID={{ or (index .Data.data "access_key") (index .Data.data "access_key_id") }}
|
||||||
|
YANDEX_S3_SECRET_ACCESS_KEY={{ or (index .Data.data "secret_key") (index .Data.data "secret_access_key") }}
|
||||||
|
YANDEX_S3_USE_SSL=false
|
||||||
|
YANDEX_S3_REGION=ru-central
|
||||||
|
YANDEX_S3_VERIFY=false
|
||||||
|
BUCKET_NAME=attachments
|
||||||
|
{{- end -}}
|
||||||
6
apps/attachments/nn-dev/kustomization.yaml
Normal file
6
apps/attachments/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: helmrelease.yaml
|
||||||
4
apps/auth-flow/nn-dev/kustomization.yaml
Normal file
4
apps/auth-flow/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
78
apps/bi/nn-dev/kustomization.yaml
Normal file
78
apps/bi/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
configMapGenerator:
|
||||||
|
- name: bi-contour-env
|
||||||
|
literals:
|
||||||
|
- AUTH_HOST=http://backend-svc.django.svc.cluster.local
|
||||||
|
- ISSUES_SERVICE_HOST=http://backend-svc.issues.svc.cluster.local
|
||||||
|
- EAV_SERVICE_HOST=http://backend-svc.eav.svc.cluster.local
|
||||||
|
- PM_SERVICE_HOST=http://backend-svc.pm.svc.cluster.local:8000
|
||||||
|
- SUPERSET_DOCUMENTATION_URL=https://${HOST_PLATFORM}/documentations/
|
||||||
|
- 'KAFKA_BOOTSTRAP_SERVERS=["kafka-kafka-contour.kafka.svc.cluster.local:9092"]'
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.AUTH_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=AUTH_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.ISSUES_SERVICE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=ISSUES_SERVICE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.EAV_SERVICE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=EAV_SERVICE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.PM_SERVICE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=PM_SERVICE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.SUPERSET_DOCUMENTATION_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=SUPERSET_DOCUMENTATION_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bi-contour-env
|
||||||
|
fieldPath: data.KAFKA_BOOTSTRAP_SERVERS
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: bi-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.main.envs.[name=KAFKA_BOOTSTRAP_SERVERS].value._default
|
||||||
23
apps/bim/nn-dev/kustomization.yaml
Normal file
23
apps/bim/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
configMapGenerator:
|
||||||
|
- name: bim-contour-env
|
||||||
|
literals:
|
||||||
|
- POSTGRES_POOL_SIZE=5
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: bim-contour-env
|
||||||
|
fieldPath: data.POSTGRES_POOL_SIZE
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=POSTGRES_POOL_SIZE].value._default
|
||||||
139
apps/cde/nn-dev/kustomization.yaml
Normal file
139
apps/cde/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- serviceaccount.yaml
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde/deployment/resources
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-flowscallback
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-flowscallback/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-flowscallback/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-splitpdf
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-splitpdf/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-splitpdf/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-alert
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-alert/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-alert/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-copy
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-copy/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-copy/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-copyv2
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-copyv2/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-copyv2/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-create-versions
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-create-versions/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-create-versions/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-create-versionsv2
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-create-versionsv2/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-create-versionsv2/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-markings
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-markings/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-markings/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-markingsv2
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-markingsv2/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-markingsv2/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-sign
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-sign/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-sign/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-signv2
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-signv2/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-signv2/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde-worker-update-bundles
|
||||||
|
patch: |
|
||||||
|
- op: remove
|
||||||
|
path: /spec/values/services/cde-worker-update-bundles/deployment/resources
|
||||||
|
- op: replace
|
||||||
|
path: /spec/values/services/cde-worker-update-bundles/serviceAccount/enabled/_default
|
||||||
|
value: false
|
||||||
|
configMapGenerator:
|
||||||
|
- name: cde-contour-env
|
||||||
|
literals:
|
||||||
|
- SAREX_BACKEND_BASE_URL=http://backend-svc.django.svc.cluster.local:80
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: cde-contour-env
|
||||||
|
fieldPath: data.SAREX_BACKEND_BASE_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: cde
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.cde.envs.[name=SAREX_BACKEND_BASE_URL].value._default
|
||||||
@ -2,5 +2,4 @@ apiVersion: v1
|
|||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: cde-vault
|
name: cde-vault
|
||||||
labels: {}
|
|
||||||
namespace: cde
|
namespace: cde
|
||||||
33
apps/checklists/nn-dev/jwt-access.yaml
Normal file
33
apps/checklists/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: checklists
|
||||||
|
namespace: checklists
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
checklists:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-checklists-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-checklists-jwt-public: '{{-
|
||||||
|
with secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/checklists-db ] && . /vault/secrets/checklists-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/checklists-jwt-public ] && export JWT_AUTH_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/checklists-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec ./entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
6
apps/checklists/nn-dev/kustomization.yaml
Normal file
6
apps/checklists/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
39
apps/contracts/nn-dev/jwt-access.yaml
Normal file
39
apps/contracts/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: contracts
|
||||||
|
namespace: contracts
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
contracts:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/contracts-db ] && . /vault/secrets/contracts-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/contracts-jwt-public ] && export PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/contracts-jwt-public)"
|
||||||
|
|
||||||
|
[ -f /vault/secrets/contracts-rabbitmq ] && . /vault/secrets/contracts-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/contracts-s3 ] && . /vault/secrets/contracts-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/contracts-kafka ] && . /vault/secrets/contracts-kafka
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /usr/local/bin/http
|
||||||
|
|
||||||
|
'
|
||||||
6
apps/contracts/nn-dev/kustomization.yaml
Normal file
6
apps/contracts/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
79
apps/control-interface/nn-dev/admin-frontend.yaml
Normal file
79
apps/control-interface/nn-dev/admin-frontend.yaml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: admin-frontend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 1
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 1
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
admin-frontend:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/admin-frontend:uralkal_4d0a3684
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: admin-frontend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: admin-frontend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
commitSha: ''
|
||||||
|
gitlabUri: ''
|
||||||
|
gitlabJobUrl: ''
|
||||||
|
owner: ''
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
5
apps/control-interface/nn-dev/kustomization.yaml
Normal file
5
apps/control-interface/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- admin-frontend.yaml
|
||||||
94
apps/control-interface/wb/admin-frontend.yaml
Normal file
94
apps/control-interface/wb/admin-frontend.yaml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: admin-frontend
|
||||||
|
namespace: control-interface
|
||||||
|
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.7"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 1
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 1
|
||||||
|
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
|
||||||
|
services:
|
||||||
|
admin-frontend:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/admin-frontend:uralkal_4d0a3684
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
name:
|
||||||
|
_default: admin-frontend
|
||||||
|
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 100m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
name:
|
||||||
|
_default: admin-frontend-svc
|
||||||
|
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: dockerhub
|
||||||
|
|
||||||
|
commitSha: ""
|
||||||
|
gitlabUri: ""
|
||||||
|
gitlabJobUrl: ""
|
||||||
|
owner: ""
|
||||||
6
apps/control-interface/wb/kustomization.yaml
Normal file
6
apps/control-interface/wb/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: control-interface
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- admin-frontend.yaml
|
||||||
@ -1,6 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
|
||||||
istio-injection: enabled
|
|
||||||
name: control-interface
|
name: control-interface
|
||||||
4
apps/cross-section/nn-dev/kustomization.yaml
Normal file
4
apps/cross-section/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
60
apps/django/nn-dev/backend.yaml
Normal file
60
apps/django/nn-dev/backend.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/django" }}
|
||||||
|
|
||||||
|
AWS_S3_ENDPOINT_URL=http://${MINIO_ENDPOINT}
|
||||||
|
|
||||||
|
S3_HOST=http://${MINIO_ENDPOINT}
|
||||||
|
|
||||||
|
S3_BUCKET={{ index .Data.data "bucket" }}
|
||||||
|
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key_id" }}
|
||||||
|
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_access_key" }}
|
||||||
|
|
||||||
|
AWS_S3_ACCESS_KEY_ID={{ index .Data.data "access_key_id" }}
|
||||||
|
|
||||||
|
AWS_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_access_key" }}
|
||||||
|
|
||||||
|
AWS_STORAGE_BUCKET_NAME={{ index .Data.data "bucket" }}
|
||||||
|
|
||||||
|
{{- end }}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-common: '{{- with secret
|
||||||
|
"secrets/data/zitadel/setup" -}}
|
||||||
|
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token"
|
||||||
|
}}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/iam
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: '{{- with secret
|
||||||
|
"secrets/data/kafka/apps/iam" -}}
|
||||||
|
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS=''["{{ with index .Data.data "auth" }}{{ index
|
||||||
|
. "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers"
|
||||||
|
}}{{ end }}"]''
|
||||||
|
|
||||||
|
KAFKA_SECURITY_PROTOCOL=''SASL_PLAINTEXT''
|
||||||
|
|
||||||
|
KAFKA_SASL_MECHANISM=''SCRAM-SHA-512''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
KAFKA_SSL_CAFILE=''''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 8200,9092
|
||||||
|
proxy.istio.io/config: '{"holdApplicationUntilProxyStarts":true}'
|
||||||
54
apps/django/nn-dev/celery.yaml
Normal file
54
apps/django/nn-dev/celery.yaml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/django" }}
|
||||||
|
|
||||||
|
AWS_S3_ENDPOINT_URL=http://${MINIO_ENDPOINT}
|
||||||
|
|
||||||
|
S3_HOST=http://${MINIO_ENDPOINT}
|
||||||
|
|
||||||
|
S3_BUCKET={{ index .Data.data "bucket" }}
|
||||||
|
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key_id" }}
|
||||||
|
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_access_key" }}
|
||||||
|
|
||||||
|
{{- end }}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-common: '{{- with secret
|
||||||
|
"secrets/data/zitadel/setup" -}}
|
||||||
|
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token"
|
||||||
|
}}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/iam
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: '{{- with secret
|
||||||
|
"secrets/data/kafka/apps/iam" -}}
|
||||||
|
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS=''["{{ with index .Data.data "auth" }}{{ index
|
||||||
|
. "bootstrap_servers" }}{{ else }}{{ index .Data.data "bootstrap_servers"
|
||||||
|
}}{{ end }}"]''
|
||||||
|
|
||||||
|
KAFKA_SECURITY_PROTOCOL=''SASL_PLAINTEXT''
|
||||||
|
|
||||||
|
KAFKA_SASL_MECHANISM=''SCRAM-SHA-512''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
KAFKA_SSL_CAFILE=''''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 8200,9092
|
||||||
|
proxy.istio.io/config: '{"holdApplicationUntilProxyStarts":true}'
|
||||||
88
apps/django/nn-dev/export-project.yaml
Normal file
88
apps/django/nn-dev/export-project.yaml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: export-project
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/export-project:prod_ef8aa756
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: export-project
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
stage: 1
|
||||||
|
preprod: 3
|
||||||
|
production: 3
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: export-project-service
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
labels:
|
||||||
|
monitoring: prometheus
|
||||||
|
envs:
|
||||||
|
- name: TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: '180'
|
||||||
|
commitSha: ''
|
||||||
|
gitlabUri: ''
|
||||||
|
gitlabJobUrl: ''
|
||||||
|
owner: ''
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
265
apps/django/nn-dev/jwt-access.yaml
Normal file
265
apps/django/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/apps/django/jwt_private
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: '{{- with
|
||||||
|
secret "secrets/data/vault/apps/django/jwt_private" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
checksum/jwt-runtime: 58bae88d1d81ac414b2cac6ff81e0f441dc9a8f05a42d9d3d11bdfa97d38772b
|
||||||
|
vault.hashicorp.com/agent-inject-secret-jwt-signer-client: secrets/data/vault/apps/django/jwt_signer_client
|
||||||
|
vault.hashicorp.com/agent-inject-template-jwt-signer-client: '{{- with
|
||||||
|
secret "secrets/data/vault/apps/django/jwt_signer_client" -}}
|
||||||
|
|
||||||
|
JWT_SIGNER_CLIENT_TOKEN={{ index .Data.data "token" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/role: django-backend
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat
|
||||||
|
/vault/secrets/django-jwt-private)"
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/django-jwt-public)"
|
||||||
|
|
||||||
|
[ -f /vault/secrets/jwt-signer-client ] && . /vault/secrets/jwt-signer-client
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/sarex/entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /jwt-config/original-production.py
|
||||||
|
name: django-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: uwsgi.ini
|
||||||
|
path:
|
||||||
|
_default: uwsgi.ini
|
||||||
|
name:
|
||||||
|
_default: uwsgi-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/uwsgi.ini
|
||||||
|
name: uwsgi-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: uwsgi.ini
|
||||||
|
- name: jwt-runtime-production
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-client
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/jwt_signer_client.py
|
||||||
|
subPath:
|
||||||
|
_default: client.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: client.py
|
||||||
|
path:
|
||||||
|
_default: client.py
|
||||||
|
- name: jwt-runtime-urls
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/jwt_signer_urls.py
|
||||||
|
subPath:
|
||||||
|
_default: urls.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: urls.py
|
||||||
|
path:
|
||||||
|
_default: urls.py
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
group: apps
|
||||||
|
version: v1
|
||||||
|
kind: Deployment
|
||||||
|
name: backend
|
||||||
|
patch: "- op: add\n path: /spec/template/spec/serviceAccountName\n value:\
|
||||||
|
\ django-backend-vault\n- op: add\n path: /spec/template/spec/containers/0/env/-\n\
|
||||||
|
\ value:\n name: JWT_SIGNER_MODE\n value: server\n"
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
checksum/jwt-runtime: 58bae88d1d81ac414b2cac6ff81e0f441dc9a8f05a42d9d3d11bdfa97d38772b
|
||||||
|
vault.hashicorp.com/agent-inject-secret-jwt-signer-client: secrets/data/vault/apps/django/jwt_signer_client
|
||||||
|
vault.hashicorp.com/agent-inject-template-jwt-signer-client: '{{- with
|
||||||
|
secret "secrets/data/vault/apps/django/jwt_signer_client" -}}
|
||||||
|
|
||||||
|
JWT_SIGNER_CLIENT_TOKEN={{ index .Data.data "token" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/role: django-celery
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/django-jwt-public)"
|
||||||
|
|
||||||
|
[ -f /vault/secrets/jwt-signer-client ] && . /vault/secrets/jwt-signer-client
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec celery -A config worker -B -l info -E -Q default -n default_worker.%h
|
||||||
|
--concurrency=2
|
||||||
|
|
||||||
|
'
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /jwt-config/original-production.py
|
||||||
|
name: django-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-production
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-client
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/jwt_signer_client.py
|
||||||
|
subPath:
|
||||||
|
_default: client.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: client.py
|
||||||
|
path:
|
||||||
|
_default: client.py
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
group: apps
|
||||||
|
version: v1
|
||||||
|
kind: Deployment
|
||||||
|
name: celery
|
||||||
|
patch: "- op: add\n path: /spec/template/spec/volumes/-\n value:\n name:\
|
||||||
|
\ jwt-runtime-patch\n configMap:\n name: jwt-runtime\n- op: add\n\
|
||||||
|
\ path: /spec/template/spec/initContainers\n value:\n - name: jwt-delegation-code\n\
|
||||||
|
\ image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_18e5ac1e\n\
|
||||||
|
\ command:\n - python\n - /jwt-source/patch.py\n volumeMounts:\n\
|
||||||
|
\ - name: jwt-runtime-patch\n mountPath: /jwt-source\n readOnly:\
|
||||||
|
\ true\n - name: jwt-patched\n mountPath: /jwt-patched\n resources:\n\
|
||||||
|
\ requests:\n cpu: 25m\n memory: 64Mi\n- op: add\n path:\
|
||||||
|
\ /spec/template/spec/volumes/-\n value:\n name: jwt-patched\n emptyDir:\
|
||||||
|
\ {}\n- op: add\n path: /spec/template/spec/containers/0/volumeMounts/-\n\
|
||||||
|
\ value:\n name: jwt-patched\n mountPath: /opt/sarex/sarex/base/tasks.py\n\
|
||||||
|
\ subPath: tasks.py\n readOnly: true\n- op: add\n path: /spec/template/spec/containers/0/volumeMounts/-\n\
|
||||||
|
\ value:\n name: jwt-patched\n mountPath: /opt/sarex/sarex/services/mixin.py\n\
|
||||||
|
\ subPath: mixin.py\n readOnly: true\n- op: add\n path: /spec/template/spec/containers/0/env/-\n\
|
||||||
|
\ value:\n name: JWT_SIGNER_URL\n value: http://backend-svc.django.svc.cluster.local:80/internal/jwt/access-token/\n\
|
||||||
|
- op: add\n path: /spec/template/spec/serviceAccountName\n value: django-celery-vault\n"
|
||||||
11
apps/django/nn-dev/jwt-serviceaccount.yaml
Normal file
11
apps/django/nn-dev/jwt-serviceaccount.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: django-backend-vault
|
||||||
|
namespace: django
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: django-celery-vault
|
||||||
|
namespace: django
|
||||||
31
apps/django/nn-dev/jwt/client.py
Normal file
31
apps/django/nn-dev/jwt/client.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import json
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
from urllib.error import HTTPError, URLError
|
||||||
|
from urllib.request import Request, urlopen
|
||||||
|
|
||||||
|
|
||||||
|
def issue_access_token(user_id):
|
||||||
|
endpoint = os.environ["JWT_SIGNER_URL"]
|
||||||
|
credential = os.environ["JWT_SIGNER_CLIENT_TOKEN"]
|
||||||
|
request = Request(
|
||||||
|
endpoint,
|
||||||
|
data=json.dumps({"user_id": int(user_id)}).encode(),
|
||||||
|
headers={"Authorization": "Bearer " + credential, "Content-Type": "application/json"},
|
||||||
|
method="POST",
|
||||||
|
)
|
||||||
|
for attempt in range(3):
|
||||||
|
try:
|
||||||
|
with urlopen(request, timeout=5) as response:
|
||||||
|
payload = json.load(response)
|
||||||
|
token = payload.get("access")
|
||||||
|
if not isinstance(token, str) or not token:
|
||||||
|
raise RuntimeError("JWT signer returned an invalid response")
|
||||||
|
return token
|
||||||
|
except HTTPError as error:
|
||||||
|
if error.code < 500 or attempt == 2:
|
||||||
|
raise RuntimeError("JWT signer rejected the request: HTTP %d" % error.code) from None
|
||||||
|
except URLError:
|
||||||
|
if attempt == 2:
|
||||||
|
raise RuntimeError("JWT signer is unavailable") from None
|
||||||
|
time.sleep(attempt + 1)
|
||||||
15
apps/django/nn-dev/jwt/patch.py
Normal file
15
apps/django/nn-dev/jwt/patch.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
cases = [
|
||||||
|
("/opt/sarex/sarex/base/tasks.py", "tasks.py", "str(TokenObtainPairSerializer.get_token(user).access_token)", 2),
|
||||||
|
("/opt/sarex/sarex/services/mixin.py", "mixin.py", "str(CustomRefreshToken.for_user(user).access_token)", 1),
|
||||||
|
]
|
||||||
|
for source, destination, expression, expected in cases:
|
||||||
|
original = Path(source).read_text()
|
||||||
|
if original.count(expression) != expected:
|
||||||
|
raise RuntimeError("JWT delegation patch does not match the application image: " + source)
|
||||||
|
modified = "from config.jwt_signer_client import issue_access_token\n" + original.replace(
|
||||||
|
expression, "issue_access_token(user.id)"
|
||||||
|
)
|
||||||
|
compile(modified, source, "exec")
|
||||||
|
Path("/jwt-patched", destination).write_text(modified)
|
||||||
14
apps/django/nn-dev/jwt/production.py
Normal file
14
apps/django/nn-dev/jwt/production.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import os as _jwt_os
|
||||||
|
|
||||||
|
_jwt_has_private = bool(_jwt_os.environ.get("JWT_PRIVATE_KEY"))
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ["JWT_PRIVATE_KEY"] = ""
|
||||||
|
with open("/jwt-config/original-production.py") as _jwt_source:
|
||||||
|
exec(compile(_jwt_source.read(), "/jwt-config/original-production.py", "exec"), globals())
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ.pop("JWT_PRIVATE_KEY", None)
|
||||||
|
SIMPLE_JWT["SIGNING_KEY"] = ""
|
||||||
|
if _jwt_os.environ.get("JWT_SIGNER_MODE") == "server":
|
||||||
|
ROOT_URLCONF = "config.jwt_signer_urls"
|
||||||
|
DEBUG = False
|
||||||
|
del _jwt_has_private, _jwt_source
|
||||||
64
apps/django/nn-dev/jwt/urls.py
Normal file
64
apps/django/nn-dev/jwt/urls.py
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import hmac
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
from django.http import JsonResponse
|
||||||
|
from django.urls import path
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
from django.views.decorators.debug import sensitive_variables
|
||||||
|
|
||||||
|
from config import urls as original_urls
|
||||||
|
from sarex.core.serializers.token import CustomTokenSerializer
|
||||||
|
|
||||||
|
|
||||||
|
@csrf_exempt
|
||||||
|
@sensitive_variables("credential", "supplied", "token")
|
||||||
|
def issue_access_token(request):
|
||||||
|
if request.method != "POST":
|
||||||
|
return JsonResponse({"detail": "Method not allowed"}, status=405)
|
||||||
|
credential = os.environ.get("JWT_SIGNER_CLIENT_TOKEN", "")
|
||||||
|
supplied = request.headers.get("Authorization", "")
|
||||||
|
if not credential or not hmac.compare_digest(supplied.encode(), ("Bearer " + credential).encode()):
|
||||||
|
return JsonResponse({"detail": "Unauthorized"}, status=401)
|
||||||
|
if len(request.body) > 1024:
|
||||||
|
return JsonResponse({"detail": "Invalid request"}, status=400)
|
||||||
|
try:
|
||||||
|
value = json.loads(request.body)
|
||||||
|
user_id = value["user_id"]
|
||||||
|
if isinstance(user_id, bool) or not isinstance(user_id, int) or not 0 < user_id <= 9223372036854775807:
|
||||||
|
raise ValueError()
|
||||||
|
except (ValueError, TypeError, KeyError):
|
||||||
|
return JsonResponse({"detail": "Invalid request"}, status=400)
|
||||||
|
user = get_user_model().objects.filter(pk=user_id, is_active=True).first()
|
||||||
|
if user is None:
|
||||||
|
return JsonResponse({"detail": "User not found"}, status=404)
|
||||||
|
token = str(CustomTokenSerializer.get_token(user).access_token)
|
||||||
|
return JsonResponse({"access": token}, headers={"Cache-Control": "no-store"})
|
||||||
|
|
||||||
|
|
||||||
|
@sensitive_variables("credential", "token")
|
||||||
|
def issue_legacy_access_token(request, pk):
|
||||||
|
credential = os.environ.get("JWT_SIGNER_CLIENT_TOKEN", "")
|
||||||
|
if not credential or not hmac.compare_digest(
|
||||||
|
request.headers.get("Authorization", "").encode(), ("Bearer " + credential).encode()
|
||||||
|
):
|
||||||
|
return JsonResponse({"detail": "Unauthorized"}, status=401)
|
||||||
|
if request.method != "GET":
|
||||||
|
return JsonResponse({"detail": "Method not allowed"}, status=405)
|
||||||
|
if not 0 < pk <= 9223372036854775807:
|
||||||
|
return JsonResponse({"detail": "Invalid request"}, status=400)
|
||||||
|
user = get_user_model().objects.filter(pk=pk, is_active=True).first()
|
||||||
|
if user is None:
|
||||||
|
return JsonResponse({"detail": "User not found"}, status=404)
|
||||||
|
token = str(CustomTokenSerializer.get_token(user).access_token)
|
||||||
|
return JsonResponse(token, safe=False, headers={"Cache-Control": "no-store"})
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path("internal/jwt/access-token/", issue_access_token),
|
||||||
|
path("internal/client/token/<int:pk>/", issue_legacy_access_token),
|
||||||
|
] + original_urls.urlpatterns
|
||||||
|
for name in ("handler400", "handler403", "handler404", "handler500"):
|
||||||
|
if hasattr(original_urls, name):
|
||||||
|
globals()[name] = getattr(original_urls, name)
|
||||||
102
apps/django/nn-dev/kustomization.yaml
Normal file
102
apps/django/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- jwt-serviceaccount.yaml
|
||||||
|
- export-project.yaml
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
|
- path: backend.yaml
|
||||||
|
- path: celery.yaml
|
||||||
|
- path: s3-proxy.yaml
|
||||||
|
- path: zitadel-configmap.yaml
|
||||||
|
- patch: |
|
||||||
|
$patch: delete
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: srx-admin-frontend
|
||||||
|
namespace: django
|
||||||
|
- target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
patch: |
|
||||||
|
- op: add
|
||||||
|
path: /spec/values/services/backend/envs/-
|
||||||
|
value:
|
||||||
|
name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_PLATFORM}
|
||||||
|
configMapGenerator:
|
||||||
|
- name: jwt-runtime
|
||||||
|
namespace: django
|
||||||
|
files:
|
||||||
|
- production.py=jwt/production.py
|
||||||
|
- client.py=jwt/client.py
|
||||||
|
- urls.py=jwt/urls.py
|
||||||
|
- patch.py=jwt/patch.py
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
- name: django-contour-env
|
||||||
|
literals:
|
||||||
|
- SAREX_HOST=https://${HOST_PLATFORM}
|
||||||
|
- ZITADEL_HOST=https://${HOST_LOGIN}
|
||||||
|
- WORKFLOWS_HOST=http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- WORKFLOWS_BASE_HOST=http://backend-svc.django.svc.cluster.local:80
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: django-contour-env
|
||||||
|
fieldPath: data.SAREX_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SERVER_HOST].value._default
|
||||||
|
- spec.values.services.backend.envs.[name=SERVER_API_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=SERVER_HOST].value._default
|
||||||
|
- spec.values.services.celery.envs.[name=SERVER_API_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: django-contour-env
|
||||||
|
fieldPath: data.ZITADEL_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=ZITADEL_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=ZITADEL_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: django-contour-env
|
||||||
|
fieldPath: data.WORKFLOWS_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=WORKFLOWS_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: django-contour-env
|
||||||
|
fieldPath: data.WORKFLOWS_BASE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=WORKFLOWS_BASE_HOST].value._default
|
||||||
18
apps/django/nn-dev/s3-proxy.yaml
Normal file
18
apps/django/nn-dev/s3-proxy.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: s3-proxy
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
s3-proxy:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-s3: |
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" }}
|
||||||
|
AWS_API_ENDPOINT=http://${MINIO_ENDPOINT}
|
||||||
|
AWS_S3_BUCKET={{ index .Data.data "bucket" }}
|
||||||
|
AWS_ACCESS_KEY_ID={{ index .Data.data "access_key_id" }}
|
||||||
|
AWS_SECRET_ACCESS_KEY={{ index .Data.data "secret_access_key" }}
|
||||||
|
{{- end }}
|
||||||
82
apps/django/nn-dev/service-user-job.yaml
Normal file
82
apps/django/nn-dev/service-user-job.yaml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: django-service-user
|
||||||
|
namespace: django
|
||||||
|
annotations:
|
||||||
|
kustomize.toolkit.fluxcd.io/substitute: disabled
|
||||||
|
kustomize.toolkit.fluxcd.io/force: enabled
|
||||||
|
spec:
|
||||||
|
backoffLimit: 6
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/apps/django/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/django/postgres" -}}
|
||||||
|
DJANGO_POSTGRES_HOST={{ index .Data.data "host" }}
|
||||||
|
DJANGO_POSTGRES_PORTS={{ index .Data.data "port" }}
|
||||||
|
DJANGO_POSTGRES_DATABASE={{ index .Data.data "database" }}
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-service-user: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-service-user: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
SERVICE_USERNAME={{ index .Data.data "username" }}
|
||||||
|
SERVICE_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: django-vault
|
||||||
|
restartPolicy: Never
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
containers:
|
||||||
|
- name: service-user
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_7d0ec48b
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
workingDir: /opt/sarex
|
||||||
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
. /vault/secrets/service-user
|
||||||
|
set +a
|
||||||
|
exec python manage.py shell -c '
|
||||||
|
import os
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
name = os.environ["SERVICE_USERNAME"]
|
||||||
|
user, created = get_user_model().objects.get_or_create(username=name)
|
||||||
|
user.set_password(os.environ["SERVICE_PASSWORD"])
|
||||||
|
user.is_active = True
|
||||||
|
user.is_staff = True
|
||||||
|
user.is_superuser = True
|
||||||
|
user.save()
|
||||||
|
print("service user", name, "created" if created else "updated")
|
||||||
|
'
|
||||||
|
env:
|
||||||
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
|
value: config.settings.production
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 256Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: django-configmap
|
||||||
|
mountPath: /opt/sarex/config/settings/production.py
|
||||||
|
subPath: production.py
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: django-configmap
|
||||||
|
configMap:
|
||||||
|
name: django-configmap
|
||||||
@ -1,14 +1,14 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: zitadel-configmap
|
||||||
|
namespace: django
|
||||||
data:
|
data:
|
||||||
config.json: |
|
config.json: |
|
||||||
{
|
{
|
||||||
"auth_type": "zitadel",
|
"auth_type": "zitadel",
|
||||||
"zitadel": {
|
"zitadel": {
|
||||||
"client_id": "379557107642492501",
|
"client_id": "${ZITADEL_CLIENT_ID}",
|
||||||
"host": "https://login.stand.sarex.tech"
|
"host": "https://${HOST_LOGIN}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: zitadel-configmap
|
|
||||||
namespace: django
|
|
||||||
@ -8,6 +8,9 @@ spec:
|
|||||||
values:
|
values:
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_6f5ad8ab
|
||||||
deployment:
|
deployment:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_7d0ec48b
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_6f5ad8ab
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.22.3
|
_default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.43.0
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_ee0a6717
|
_default: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_de4fb6d8
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
4
apps/document-link/nn-dev/kustomization.yaml
Normal file
4
apps/document-link/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
21
apps/documentations/nn-dev/api.yaml
Normal file
21
apps/documentations/nn-dev/api.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/documentations" -}}
|
||||||
|
{"endpoint": "${MINIO_ENDPOINT}", "bucket_name": "{{ index .Data.data "bucket" }}", "access_key_id": "{{ index .Data.data "access_key_id" }}", "secret_access_key": "{{ index .Data.data "secret_access_key" }}", "use_ssl": false, "verify": false}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
||||||
|
{{- with secret "secrets/data/zitadel/setup" -}}
|
||||||
|
{{ index .Data.data "documentations_zitadel_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
169
apps/documentations/nn-dev/cde-api-integration.yaml
Normal file
169
apps/documentations/nn-dev/cde-api-integration.yaml
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
envs:
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '20'
|
||||||
|
- name: USE_LEGACY_BIM_FLOW
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ZITADEL_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-zitadel-account-json
|
||||||
|
- name: ZITADEL_DOMAIN
|
||||||
|
value:
|
||||||
|
_default: ${HOST_LOGIN}
|
||||||
|
- name: USE_ZITADEL
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: '36311'
|
||||||
|
- name: API_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: API_ADDRESS_FILE
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: PUBLIC_LINK_FOLDER_CONNECTOR_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ENABLE_SQL_QUERY
|
||||||
|
value:
|
||||||
|
_default: '0'
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value:
|
||||||
|
_default: '0'
|
||||||
|
- name: WORKSPACE_V2_EXTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_PLATFORM}/workspaces-v2/
|
||||||
|
- name: ENABLE_S3
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: production
|
||||||
|
- name: LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: '1000000'
|
||||||
|
- name: HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: FILE_STREAM_HOST
|
||||||
|
value:
|
||||||
|
_default: ${HOST_PLATFORM}
|
||||||
|
- name: DOCUMENTATION_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80/
|
||||||
|
- name: WORKFLOW_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80/
|
||||||
|
- name: WORKSPACE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80/
|
||||||
|
- name: BIM_API_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80/
|
||||||
|
- name: BIM_API_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80/
|
||||||
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
|
value:
|
||||||
|
_default: v1
|
||||||
|
- name: SYSTEM_LOG_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: MARKS_PROCESSING_URL
|
||||||
|
value:
|
||||||
|
_default: http://marks-service:8000
|
||||||
|
- name: USE_MARKS_RABBITMQ
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: MARKS_RABBITMQ_HOST
|
||||||
|
value:
|
||||||
|
_default: rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
- name: MARKS_RABBITMQ_PORT
|
||||||
|
value:
|
||||||
|
_default: '5672'
|
||||||
|
- name: PUBLIC_LINK_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_DOCUMENT_LINK}
|
||||||
|
- name: NAMESPACE
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: DJANGO_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_prod
|
||||||
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-s3-account-json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: ENABLE_SMTP
|
||||||
|
value:
|
||||||
|
_default: 'True'
|
||||||
|
- name: ENABLE_MAILGUN
|
||||||
|
value:
|
||||||
|
_default: 'False'
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_SECRET
|
||||||
|
value:
|
||||||
|
_default: mock
|
||||||
|
- name: ENABLE_AUTH_JWT_IN_URL
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ENABLE_SIGNATURE_IN_URL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: '0'
|
||||||
|
- name: VALKEY_ADDR
|
||||||
|
value:
|
||||||
|
_default: redis:6379
|
||||||
|
- name: VALKEY_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: VALKEY_PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_URL
|
||||||
|
value:
|
||||||
|
_default: http://cde-api.documentations.svc.cluster.local:8000
|
||||||
399
apps/documentations/nn-dev/cde-api/cde-api-worker-copy.yaml
Normal file
399
apps/documentations/nn-dev/cde-api/cde-api-worker-copy.yaml
Normal file
@ -0,0 +1,399 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-copy
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-copy:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-copy
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-rabbitmq
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-copy:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-copy
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_SYSTEMLOG_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: CDE_API_SYSTEMLOG_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_WORKFLOW_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOW_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKFLOW_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_V2_MS
|
||||||
|
value:
|
||||||
|
_default: '300000'
|
||||||
|
- name: CDE_API_CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: CDE_API_WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: CDE_API_DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: CDE_API_ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: nn-dev
|
||||||
|
- name: CDE_API_CONVERTED_PDF_TO_S3
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DXF_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DWG_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_BIMV1_FOR_BIMV2
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: '2000'
|
||||||
|
- name: CDE_API_LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: '2250'
|
||||||
|
- name: CDE_API_LAST_SLAVE_2_BIM
|
||||||
|
value:
|
||||||
|
_default: '15000'
|
||||||
|
- name: CDE_API_USE_BIM_INSERTER
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_LEGACY_BIM_FLOW
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_DOCUMENTATION_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: CDE_API_INTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: http://cde-api.documentations.svc.cluster.local:8000
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_WORKSPACE_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKSPACE_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKSPACE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: pdf_markings_input
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: hash.compute.normal
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_EXCHANGE
|
||||||
|
value:
|
||||||
|
_default: hash.compute
|
||||||
|
- name: CDE_API_ISSUES_SYNC_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_ISSUES_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.issues.svc.cluster.local:80
|
||||||
|
- name: CDE_API_ISSUES_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_ISSUES_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_COPY_WORKER_JOBS
|
||||||
|
value:
|
||||||
|
_default: ''
|
||||||
|
- name: CDE_API_COPY_JOB_TIMEOUT_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '30'
|
||||||
|
- name: CDE_API_COPY_STEP_PARALLELISM
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_COPY_S3_PARALLELISM
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with
|
||||||
|
secret "secrets/data/rabbitmq/apps/cde" -}}
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
381
apps/documentations/nn-dev/cde-api/cde-api-worker-move.yaml
Normal file
381
apps/documentations/nn-dev/cde-api/cde-api-worker-move.yaml
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-move
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-move:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-move
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-rabbitmq
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-move:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-move
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_SYSTEMLOG_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: CDE_API_SYSTEMLOG_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_WORKFLOW_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOW_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKFLOW_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_V2_MS
|
||||||
|
value:
|
||||||
|
_default: '300000'
|
||||||
|
- name: CDE_API_CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: CDE_API_WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: CDE_API_DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: CDE_API_ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: nn-dev
|
||||||
|
- name: CDE_API_CONVERTED_PDF_TO_S3
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DXF_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DWG_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_BIMV1_FOR_BIMV2
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: '2000'
|
||||||
|
- name: CDE_API_LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: '2250'
|
||||||
|
- name: CDE_API_LAST_SLAVE_2_BIM
|
||||||
|
value:
|
||||||
|
_default: '15000'
|
||||||
|
- name: CDE_API_USE_BIM_INSERTER
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_LEGACY_BIM_FLOW
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_DOCUMENTATION_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: CDE_API_INTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: http://cde-api.documentations.svc.cluster.local:8000
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_WORKSPACE_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKSPACE_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKSPACE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: pdf_markings_input
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: hash.compute.normal
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_EXCHANGE
|
||||||
|
value:
|
||||||
|
_default: hash.compute
|
||||||
|
- name: CDE_API_MOVE_WORKER_JOBS
|
||||||
|
value:
|
||||||
|
_default: ''
|
||||||
|
- name: CDE_API_MOVE_JOB_TIMEOUT_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '30'
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with
|
||||||
|
secret "secrets/data/rabbitmq/apps/cde" -}}
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
@ -0,0 +1,277 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-s32d-create-upload
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-s32d-create-upload:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-s32d-create-upload
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-create-upload:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-s32d-create-upload
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_S32D_READERAT_BLOCK_SIZE_MB
|
||||||
|
value:
|
||||||
|
_default: '8'
|
||||||
|
- name: CDE_API_S32D_READERAT_CACHE_BLOCKS
|
||||||
|
value:
|
||||||
|
_default: '8'
|
||||||
|
- name: CDE_API_S32D_WORKER_CREATE_UPLOAD_TIMEOUT_MIN
|
||||||
|
value:
|
||||||
|
_default: '240'
|
||||||
|
- name: CDE_API_S32D_WORKER_CREATE_UPLOAD_MAX_JOBS
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
@ -0,0 +1,271 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-s32d-handle-error
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-s32d-handle-error:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-s32d-handle-error
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-handle-error:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-s32d-handle-error
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_S32D_WORKER_HANDLE_ERROR_TIMEOUT_MIN
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_S32D_WORKER_HANDLE_ERROR_MAX_JOBS
|
||||||
|
value:
|
||||||
|
_default: '4'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
@ -0,0 +1,340 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-s32d-process-workflows
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-s32d-process-workflows:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-s32d-process-workflows
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-process-workflows:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-s32d-process-workflows
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_S32D_WORKER_PROCESS_WORKFLOWS_TIMEOUT_MIN
|
||||||
|
value:
|
||||||
|
_default: '480'
|
||||||
|
- name: CDE_API_S32D_WORKER_PROCESS_WORKFLOWS_MAX_JOBS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_WORKFLOW_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOW_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKFLOW_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_V2_MS
|
||||||
|
value:
|
||||||
|
_default: '300000'
|
||||||
|
- name: CDE_API_CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: CDE_API_WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: CDE_API_DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: CDE_API_ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: nn-dev
|
||||||
|
- name: CDE_API_CONVERTED_PDF_TO_S3
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DXF_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DWG_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_BIMV1_FOR_BIMV2
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: '2000'
|
||||||
|
- name: CDE_API_LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: '2250'
|
||||||
|
- name: CDE_API_LAST_SLAVE_2_BIM
|
||||||
|
value:
|
||||||
|
_default: '15000'
|
||||||
|
- name: CDE_API_USE_BIM_INSERTER
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_LEGACY_BIM_FLOW
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_DOCUMENTATION_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: CDE_API_INTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: http://cde-api.documentations.svc.cluster.local:8000
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
@ -0,0 +1,286 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api-worker-s32d-publish-documents
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
worker-s32d-publish-documents:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: worker-s32d-publish-documents
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/worker
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-publish-documents:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: worker-s32d-publish-documents
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: info
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '1'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_S32D_WORKER_PUBLISH_DOCUMENTS_TIMEOUT_MIN
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_S32D_WORKER_PUBLISH_DOCUMENTS_MAX_JOBS
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_SYSTEMLOG_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: CDE_API_SYSTEMLOG_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKSPACE_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKSPACE_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKSPACE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
dependsOn:
|
||||||
|
- name: cde-api
|
||||||
|
namespace: documentations
|
||||||
487
apps/documentations/nn-dev/cde-api/cde-api.yaml
Normal file
487
apps/documentations/nn-dev/cde-api/cde-api.yaml
Normal file
@ -0,0 +1,487 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
cde-api:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: cde-api
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 5
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
type:
|
||||||
|
_default: tcpSocket
|
||||||
|
tcpSocket:
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
periodSeconds:
|
||||||
|
_default: 5
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
command:
|
||||||
|
_default:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-rabbitmq
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-users
|
||||||
|
|
||||||
|
CDE_API_PUBLIC_KEY="$(cat /vault/secrets/cde-api-public-key)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/main
|
||||||
|
|
||||||
|
'
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/cde-api:preprod_905f8821
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: cde-api
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: CDE_API_RESOURCES_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://iam-backend.iam.svc.cluster.local:8000
|
||||||
|
- name: CDE_API_RESOURCES_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10s
|
||||||
|
- name: CDE_API_APP_NAME
|
||||||
|
value:
|
||||||
|
_default: cde-api
|
||||||
|
- name: CDE_API_LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: debug
|
||||||
|
- name: CDE_API_HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: '8000'
|
||||||
|
- name: CDE_API_HTTP_READ_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 0s
|
||||||
|
- name: CDE_API_HTTP_WRITE_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 0s
|
||||||
|
- name: CDE_API_HTTP_IDLE_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 120s
|
||||||
|
- name: CDE_API_HTTP_READ_BUFFER_SIZE
|
||||||
|
value:
|
||||||
|
_default: '96'
|
||||||
|
- name: CDE_API_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE
|
||||||
|
value:
|
||||||
|
_default: '5368709120'
|
||||||
|
- name: CDE_API_S3_MAX_PART_SIZE
|
||||||
|
value:
|
||||||
|
_default: '524288000'
|
||||||
|
- name: CDE_API_S3_UPLOAD_STALL_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_PUBLIC_LINK_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_DOCUMENT_LINK}
|
||||||
|
- name: CDE_API_WORKFLOW_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOW_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKFLOW_RETRY_WAIT_MS
|
||||||
|
value:
|
||||||
|
_default: '500'
|
||||||
|
- name: CDE_API_WORKFLOW_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.bim.svc.cluster.local:80
|
||||||
|
- name: CDE_API_BIMAPI_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_BIMAPI_RETRY_WAIT_MS
|
||||||
|
value:
|
||||||
|
_default: '1000'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '30000'
|
||||||
|
- name: CDE_API_BIMAPI_TIMEOUT_V2_MS
|
||||||
|
value:
|
||||||
|
_default: '300000'
|
||||||
|
- name: CDE_API_WORKSPACE_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKSPACE_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '3'
|
||||||
|
- name: CDE_API_WORKSPACE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_SYSTEMLOG_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: CDE_API_SYSTEMLOG_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: CDE_API_WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: CDE_API_DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: CDE_API_ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: nn-dev
|
||||||
|
- name: CDE_API_CONVERTED_PDF_TO_S3
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DXF_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_CONVERT_DWG_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_BIMV1_FOR_BIMV2
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_EAV_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: CDE_API_EAV_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_DOCUMENTATION_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: CDE_API_INTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: http://cde-api.documentations.svc.cluster.local:8000
|
||||||
|
- name: CDE_API_COPY_MAX_SYNC_WAIT_MS
|
||||||
|
value:
|
||||||
|
_default: '300000'
|
||||||
|
- name: CDE_API_LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: '2000'
|
||||||
|
- name: CDE_API_LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: '2250'
|
||||||
|
- name: CDE_API_LAST_SLAVE_2_BIM
|
||||||
|
value:
|
||||||
|
_default: '15000'
|
||||||
|
- name: CDE_API_USE_BIM_INSERTER
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USE_LEGACY_BIM_FLOW
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_LIFETIME
|
||||||
|
value:
|
||||||
|
_default: 30m
|
||||||
|
- name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME
|
||||||
|
value:
|
||||||
|
_default: 10m
|
||||||
|
- name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_DIAGNOSTICS_SLOW_OPERATION_THRESHOLD
|
||||||
|
value:
|
||||||
|
_default: 30s
|
||||||
|
- name: CDE_API_DATABASE__SSLMODE
|
||||||
|
value:
|
||||||
|
_default: disable
|
||||||
|
- name: CDE_API_DATABASE__INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_DATABASE_OBSERVABILITY_ENABLE
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__DB
|
||||||
|
value:
|
||||||
|
_default: '5'
|
||||||
|
- name: CDE_API_REDIS__SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_REDIS__POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__MIN_IDLE_CONNS
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_REDIS__DIAL_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '5000'
|
||||||
|
- name: CDE_API_REDIS__READ_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__WRITE_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '3000'
|
||||||
|
- name: CDE_API_REDIS__DEFAULT_TTL_MINUTES
|
||||||
|
value:
|
||||||
|
_default: '10'
|
||||||
|
- name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_S3_USE_SSL
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_BUCKET_LOOKUP
|
||||||
|
value:
|
||||||
|
_default: auto
|
||||||
|
- name: CDE_API_S3_INSECURE_SKIP_TLS
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CHECK_BUCKET
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: CDE_API_S3_CONNECT_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10s
|
||||||
|
- name: CDE_API_S3_TLS_HANDSHAKE_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: 10s
|
||||||
|
- name: CDE_API_S32D_MAX_ARCHIVE_SIZE_BYTES
|
||||||
|
value:
|
||||||
|
_default: '1099511627776'
|
||||||
|
- name: CDE_API_S32D_MAX_FILES_COUNT
|
||||||
|
value:
|
||||||
|
_default: '500'
|
||||||
|
- name: CDE_API_ZEEBE_USE_PLAINTEXT
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: CDE_API_USERS_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: CDE_API_DISK_BUCKET_NAMESPACE
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: CDE_API_USERS_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_nn_dev
|
||||||
|
- name: CDE_API_USERS_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_MAILER_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://mailer-service.mailer:8000
|
||||||
|
- name: CDE_API_MAILER_FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: noreply@sarex.io
|
||||||
|
- name: CDE_API_MAILER_RETRY_COUNT
|
||||||
|
value:
|
||||||
|
_default: '2'
|
||||||
|
- name: CDE_API_MAILER_TIMEOUT_MS
|
||||||
|
value:
|
||||||
|
_default: '10000'
|
||||||
|
- name: CDE_API_FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: CDE_API_TRANSMITTALS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.transmittal.svc.cluster.local:80
|
||||||
|
- name: CDE_API_WORKFLOWS_CONFIG_FILEPATH
|
||||||
|
value:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
- name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: pdf_markings_input
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY
|
||||||
|
value:
|
||||||
|
_default: hash.compute.normal
|
||||||
|
- name: CDE_API_RABBITMQ__HASHER_EXCHANGE
|
||||||
|
value:
|
||||||
|
_default: hash.compute
|
||||||
|
- name: CDE_API_REDIS__HOST
|
||||||
|
value:
|
||||||
|
_default: redis.documentations.svc.cluster.local
|
||||||
|
- name: CDE_API_REDIS__PORT
|
||||||
|
value:
|
||||||
|
_default: '6379'
|
||||||
|
- name: CDE_API_S3_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: minio.storage.svc.cluster.local:9000
|
||||||
|
- name: CDE_API_ZEEBE_GATEWAY_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500
|
||||||
|
- name: CDE_API_ZEEBE_CLIENT_ID
|
||||||
|
value:
|
||||||
|
_default: zeebe
|
||||||
|
- name: CDE_API_ZEEBE_AUTH_SERVER_URL
|
||||||
|
value:
|
||||||
|
_default: http://camunda-keycloak.camunda.svc.cluster.local
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: tasks-execution-config
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/app/tasks_execution_config.json
|
||||||
|
subPath:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: tasks-execution-config-documentation-v2
|
||||||
|
items:
|
||||||
|
- key: tasks-execution-config-documentation-v2.json
|
||||||
|
path:
|
||||||
|
_default: tasks_execution_config.json
|
||||||
|
defaultMode:
|
||||||
|
_default: '0644'
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: false
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
sidecar.istio.io/proxyCPU: 25m
|
||||||
|
sidecar.istio.io/proxyMemory: 128Mi
|
||||||
|
sidecar.istio.io/proxyCPULimit: '2'
|
||||||
|
sidecar.istio.io/proxyMemoryLimit: 1Gi
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200
|
||||||
|
vault.hashicorp.com/agent-inject: 'true'
|
||||||
|
vault.hashicorp.com/agent-init-first: 'true'
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: 'true'
|
||||||
|
vault.hashicorp.com/agent-requests-cpu: 25m
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret
|
||||||
|
"secrets/data/apps/documentations/postgres" -}}
|
||||||
|
|
||||||
|
CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret
|
||||||
|
"secrets/data/minio/apps/documentations" -}}
|
||||||
|
|
||||||
|
CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index
|
||||||
|
.Data.data "access_key") }}''
|
||||||
|
|
||||||
|
CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key")
|
||||||
|
(index .Data.data "secret_key") }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret
|
||||||
|
"secrets/data/camunda/identity-components" -}}
|
||||||
|
|
||||||
|
CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with
|
||||||
|
secret "secrets/data/rabbitmq/apps/cde" -}}
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}''
|
||||||
|
|
||||||
|
CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-users: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-users: '{{- with secret
|
||||||
|
"secrets/data/vault/common/django_auth" -}}
|
||||||
|
|
||||||
|
CDE_API_USERS_AUTH_TOKEN=''{{ index .Data.data "key" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-public-key: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-public-key: '{{- with
|
||||||
|
secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
12
apps/documentations/nn-dev/cde-api/kustomization.yaml
Normal file
12
apps/documentations/nn-dev/cde-api/kustomization.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- cde-api-worker-copy.yaml
|
||||||
|
- cde-api-worker-move.yaml
|
||||||
|
- cde-api-worker-s32d-create-upload.yaml
|
||||||
|
- cde-api-worker-s32d-handle-error.yaml
|
||||||
|
- cde-api-worker-s32d-process-workflows.yaml
|
||||||
|
- cde-api-worker-s32d-publish-documents.yaml
|
||||||
|
- cde-api.yaml
|
||||||
|
- tasks-execution-config.yaml
|
||||||
|
- virtualservice.yaml
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: tasks-execution-config-documentation-v2
|
||||||
|
namespace: documentations
|
||||||
|
data:
|
||||||
|
tasks-execution-config-documentation-v2.json: "{\n \"bim_api_metadata_inserter\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"bim_api_metadata_inserter_v2\": {\n \"executor\": \"\
|
||||||
|
k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"bim_api_metadata_inserter_v4\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"bim_differ\": {\n \"executor\": \"k8s\",\n \"\
|
||||||
|
resources\": {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\
|
||||||
|
: \"64Mi\"\n }\n },\n \"bim_updater\": {\n \"executor\": \"\
|
||||||
|
k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"convert_to_potree\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"docx_to_pdf\": {\n \"executor\": \"k8s\",\n \"\
|
||||||
|
resources\": {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\
|
||||||
|
: \"64Mi\"\n }\n },\n \"dwg_to_geojson\": {\n \"executor\"\
|
||||||
|
: \"k8s\",\n \"resources\": {\n \"cpu_limits\": \"4\",\n \
|
||||||
|
\ \"cpu_requests\": \"100m\",\n \"memory_limits\": \"40Gi\"\
|
||||||
|
,\n \"memory_requests\": \"64Mi\"\n }\n },\n \"e57_to_las\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"ifc_converter_job\": {\n \"executor\": \"k8s\",\n \
|
||||||
|
\ \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"las_merge\": {\n \
|
||||||
|
\ \"executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\"\
|
||||||
|
: \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n },\n \
|
||||||
|
\ \"mesh_optimizer\": {\n \"executor\": \"k8s\",\n \"resources\"\
|
||||||
|
: {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\
|
||||||
|
: \"64Mi\"\n }\n },\n \"mesh_optimizer_v2\": {\n \"executor\"\
|
||||||
|
: \"k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n\
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"parsing_template\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"processing_converter_to_tiles\": {\n \"executor\": \"\
|
||||||
|
k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"processing_create_colored_surface_from_geotiff\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"rendering_template\": {\n \"executor\": \"k8s\",\n \
|
||||||
|
\ \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"split_pdf_document\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"split_pdf_document_legacy\": {\n \"executor\": \"k8s\"\
|
||||||
|
,\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \
|
||||||
|
\ \"memory_requests\": \"64Mi\"\n }\n },\n \"update_orthomosaic_data\"\
|
||||||
|
: {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\
|
||||||
|
cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \
|
||||||
|
\ }\n },\n \"web_hook_caller\": {\n \"executor\": \"k8s\",\n \
|
||||||
|
\ \"resources\": {\n \"cpu_requests\": \"100m\",\n \"\
|
||||||
|
memory_requests\": \"64Mi\"\n }\n },\n \"xml_to_glb\": {\n \
|
||||||
|
\ \"executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\"\
|
||||||
|
: \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n },\n \
|
||||||
|
\ \"document_converter\": {\n \"executor\": \"k8s\",\n \"resources\"\
|
||||||
|
: {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\
|
||||||
|
: \"64Mi\"\n }\n },\n \"sparkjs_converter_wrapper\": {\n \"\
|
||||||
|
executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\":\
|
||||||
|
\ \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n }\n}\n"
|
||||||
52
apps/documentations/nn-dev/cde-api/virtualservice.yaml
Normal file
52
apps/documentations/nn-dev/cde-api/virtualservice.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
apiVersion: networking.istio.io/v1
|
||||||
|
kind: VirtualService
|
||||||
|
metadata:
|
||||||
|
name: vs-cde-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
hosts:
|
||||||
|
- ${HOST_PLATFORM}
|
||||||
|
gateways:
|
||||||
|
- default/platform-gateway
|
||||||
|
http:
|
||||||
|
- match:
|
||||||
|
- uri:
|
||||||
|
prefix: /documentations/v2/
|
||||||
|
rewrite:
|
||||||
|
uri: /external/v2/
|
||||||
|
corsPolicy: &id001
|
||||||
|
allowOrigins:
|
||||||
|
- exact: https://${HOST_PLATFORM}
|
||||||
|
- exact: https://${HOST_DOCUMENT_LINK}
|
||||||
|
allowMethods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- DELETE
|
||||||
|
- PATCH
|
||||||
|
- OPTIONS
|
||||||
|
- HEAD
|
||||||
|
allowHeaders:
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Identity
|
||||||
|
- Range
|
||||||
|
- Cache-control
|
||||||
|
allowCredentials: true
|
||||||
|
maxAge: 24h
|
||||||
|
route:
|
||||||
|
- destination:
|
||||||
|
host: cde-api.documentations.svc.cluster.local
|
||||||
|
port:
|
||||||
|
number: 8000
|
||||||
|
- match:
|
||||||
|
- uri:
|
||||||
|
prefix: /cde/app/
|
||||||
|
rewrite:
|
||||||
|
uri: /app/
|
||||||
|
corsPolicy: *id001
|
||||||
|
route:
|
||||||
|
- destination:
|
||||||
|
host: cde-api.documentations.svc.cluster.local
|
||||||
|
port:
|
||||||
|
number: 8000
|
||||||
21
apps/documentations/nn-dev/filestream.yaml
Normal file
21
apps/documentations/nn-dev/filestream.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-filestream
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/documentations" -}}
|
||||||
|
{"endpoint": "${MINIO_ENDPOINT}", "bucket_name": "{{ index .Data.data "bucket" }}", "access_key_id": "{{ index .Data.data "access_key_id" }}", "secret_access_key": "{{ index .Data.data "secret_access_key" }}", "use_ssl": false, "verify": false}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
||||||
|
{{- with secret "secrets/data/zitadel/setup" -}}
|
||||||
|
{{ index .Data.data "documentations_zitadel_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
150
apps/documentations/nn-dev/jwt-access.yaml
Normal file
150
apps/documentations/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cde-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
cde-api:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-cde-api-public-key: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-cde-api-public-key: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-db
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-s3
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-zeebe
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-rabbitmq
|
||||||
|
|
||||||
|
. /vault/secrets/cde-api-users
|
||||||
|
|
||||||
|
CDE_API_PUBLIC_KEY="$(cat /vault/secrets/cde-api-public-key)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/main
|
||||||
|
|
||||||
|
'
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: '{{-
|
||||||
|
with secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-marks-rabbitmq ] && . /vault/secrets/documentations-marks-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/documentations-rsa-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /app/entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-filestream
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: '{{-
|
||||||
|
with secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/documentations-rsa-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /app/file_entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: pdm-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: '{{-
|
||||||
|
with secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/documentations-rsa-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec ./httpserver
|
||||||
|
|
||||||
|
'
|
||||||
138
apps/documentations/nn-dev/kustomization.yaml
Normal file
138
apps/documentations/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- cde-api
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
|
- path: api.yaml
|
||||||
|
- path: cde-api-integration.yaml
|
||||||
|
- path: filestream.yaml
|
||||||
|
- path: pdm.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: documentations-contour-env
|
||||||
|
literals:
|
||||||
|
- ZITADEL_DOMAIN=${HOST_LOGIN}
|
||||||
|
- WORKSPACE_V2_EXTERNAL_URL=https://${HOST_PLATFORM}/workspaces-v2/
|
||||||
|
- FILE_STREAM_HOST=${HOST_PLATFORM}
|
||||||
|
- PUBLIC_LINK_HOST=https://${HOST_DOCUMENT_LINK}
|
||||||
|
- WORKFLOW_URL=http://backend-svc.processing.svc.cluster.local:80/
|
||||||
|
- SYSTEM_LOG_URL=http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- MARKS_QR__REDIRECT_URL=https://${HOST_STAMP_VERIFICATION}/
|
||||||
|
- MARKS_QR__BASE_DOCUMENT_URL=https://${HOST_PLATFORM}
|
||||||
|
- INSPECTIONS_URL=http://backend-svc.inspections.svc.cluster.local:80
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.ZITADEL_DOMAIN
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-api
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=ZITADEL_DOMAIN].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=ZITADEL_DOMAIN].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.WORKSPACE_V2_EXTERNAL_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-api
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=WORKSPACE_V2_EXTERNAL_URL].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=WORKSPACE_V2_EXTERNAL_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.FILE_STREAM_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-api
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=FILE_STREAM_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=FILE_STREAM_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.PUBLIC_LINK_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-api
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=PUBLIC_LINK_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=PUBLIC_LINK_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.WORKFLOW_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=WORKFLOW_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.SYSTEM_LOG_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-filestream
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SYSTEM_LOG_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.MARKS_QR__REDIRECT_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-pdf-markings-amqp
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=MARKS_QR__REDIRECT_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.MARKS_QR__BASE_DOCUMENT_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: documentations-pdf-markings-amqp
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=MARKS_QR__BASE_DOCUMENT_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: documentations-contour-env
|
||||||
|
fieldPath: data.INSPECTIONS_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: pdm-api
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=INSPECTIONS_URL].value._default
|
||||||
16
apps/documentations/nn-dev/pdm.yaml
Normal file
16
apps/documentations/nn-dev/pdm.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: pdm-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/minio/apps/documentations
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/documentations" -}}
|
||||||
|
{"endpoint": "${MINIO_ENDPOINT}", "bucket_name": "{{ index .Data.data "bucket" }}", "access_key_id": "{{ index .Data.data "access_key_id" }}", "secret_access_key": "{{ index .Data.data "secret_access_key" }}", "use_ssl": false, "verify": false}
|
||||||
|
{{- end -}}
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_358ca69c
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_65f44db2
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
@ -137,7 +137,11 @@ spec:
|
|||||||
|
|
||||||
- name: CDE_API_ENABLED
|
- name: CDE_API_ENABLED
|
||||||
value:
|
value:
|
||||||
_default: "false"
|
_default: "true"
|
||||||
|
|
||||||
|
- name: CDE_API_URL
|
||||||
|
value:
|
||||||
|
_default: "http://cde-api.documentations.svc.cluster.local:8000"
|
||||||
|
|
||||||
- name: ZITADEL_ACCOUNT
|
- name: ZITADEL_ACCOUNT
|
||||||
value:
|
value:
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_fef3add2
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_65f44db2
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_e5f99d7c
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_64155bf6
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/pdf-markings-amqp:prod_9dea5b64
|
_default: cr.yandex/crp3ccidau046kdj8g9q/pdf-markings-amqp:prod_3ab263be
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,10 @@ spec:
|
|||||||
_default: documentations-yc-s3
|
_default: documentations-yc-s3
|
||||||
|
|
||||||
envs:
|
envs:
|
||||||
|
- name: SENTRY_DSN
|
||||||
|
value:
|
||||||
|
_default: ""
|
||||||
|
|
||||||
- name: APP_NAME
|
- name: APP_NAME
|
||||||
value:
|
value:
|
||||||
_default: "pdm_v2"
|
_default: "pdm_v2"
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_9507c2d5
|
_default: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_70b31308
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
4
apps/drawings/nn-dev/kustomization.yaml
Normal file
4
apps/drawings/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
68
apps/eav/nn-dev/jwt-access.yaml
Normal file
68
apps/eav/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: eav
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-jwt-public: '{{- with secret
|
||||||
|
"secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
checksum/jwt-runtime: e0960a7201af6acef03562faf53a36d9880a2724c954a752b416b886bb249e79
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/eav-db ] && . /vault/secrets/eav-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/eav-s3 ] && . /vault/secrets/eav-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/eav-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/eav-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /server/entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /jwt-config/original-production.py
|
||||||
|
name: django-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-production
|
||||||
|
mountPath:
|
||||||
|
_default: /server/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
13
apps/eav/nn-dev/jwt/production.py
Normal file
13
apps/eav/nn-dev/jwt/production.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import os as _jwt_os
|
||||||
|
|
||||||
|
_jwt_has_private = bool(_jwt_os.environ.get("JWT_PRIVATE_KEY"))
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ["JWT_PRIVATE_KEY"] = ""
|
||||||
|
with open("/jwt-config/original-production.py") as _jwt_source:
|
||||||
|
exec(compile(_jwt_source.read(), "/jwt-config/original-production.py", "exec"), globals())
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ.pop("JWT_PRIVATE_KEY", None)
|
||||||
|
SIMPLE_JWT["SIGNING_KEY"] = ""
|
||||||
|
if _jwt_os.environ.get("JWT_SIGNER_MODE") == "server":
|
||||||
|
ROOT_URLCONF = "config.jwt_signer_urls"
|
||||||
|
del _jwt_has_private, _jwt_source
|
||||||
13
apps/eav/nn-dev/kustomization.yaml
Normal file
13
apps/eav/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: jwt-runtime
|
||||||
|
namespace: eav
|
||||||
|
files:
|
||||||
|
- production.py=jwt/production.py
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/eav:prod_0dcebba6
|
_default: cr.yandex/crp3ccidau046kdj8g9q/eav:production_2f877421
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
@ -55,12 +55,12 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu:
|
cpu:
|
||||||
_default: 20m
|
_default: 500m
|
||||||
memory:
|
memory:
|
||||||
_default: 972Mi
|
_default: 972Mi
|
||||||
requests:
|
requests:
|
||||||
cpu:
|
cpu:
|
||||||
_default: 10m
|
_default: 100m
|
||||||
memory:
|
memory:
|
||||||
_default: 774Mi
|
_default: 774Mi
|
||||||
|
|
||||||
@ -131,11 +131,43 @@ spec:
|
|||||||
|
|
||||||
- name: KAFKA_HOST
|
- name: KAFKA_HOST
|
||||||
value:
|
value:
|
||||||
_default: "wb-stage-kafka-bootstrap.kafka.svc.cluster.local:9093"
|
_default: "wb-prod-kafka-bootstrap.kafka.svc.cluster.local:9093"
|
||||||
|
|
||||||
- name: KAFKA_ENABLED
|
- name: KAFKA_ENABLED
|
||||||
value:
|
value:
|
||||||
_default: "False"
|
_default: "True"
|
||||||
|
|
||||||
|
- name: SECURITY_PROTOCOL
|
||||||
|
value:
|
||||||
|
_default: "SSL"
|
||||||
|
|
||||||
|
- name: SASL_MECHANISM
|
||||||
|
value:
|
||||||
|
_default: "PLAIN"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ATTRIBUTE_CREATED
|
||||||
|
value:
|
||||||
|
_default: "eav.attribute.created.v1"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ATTRIBUTE_UPDATED
|
||||||
|
value:
|
||||||
|
_default: "eav.attribute.updated.v1"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ATTRIBUTE_DELETED
|
||||||
|
value:
|
||||||
|
_default: "eav.attribute.deleted.v1"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ASSET_CREATED
|
||||||
|
value:
|
||||||
|
_default: "eav.asset.created.v1"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ASSET_UPDATED
|
||||||
|
value:
|
||||||
|
_default: "eav.asset.updated.v1"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_ASSET_DELETED
|
||||||
|
value:
|
||||||
|
_default: "eav.asset.deleted.v1"
|
||||||
|
|
||||||
- name: ASSETS_TOPIC
|
- name: ASSETS_TOPIC
|
||||||
value:
|
value:
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
@ -7,32 +6,32 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
kafka.crt: |
|
kafka.crt: |
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIFLTCCAxWgAwIBAgIUA5L48eHPMqNFYE5wIgaOmWgG3okwDQYJKoZIhvcNAQEN
|
MIIFLTCCAxWgAwIBAgIUa4PO/BPk4+3iuMHChzLzNWLuzjowDQYJKoZIhvcNAQEN
|
||||||
BQAwLTETMBEGA1UECgwKaW8uc3RyaW16aTEWMBQGA1UEAwwNY2x1c3Rlci1jYSB2
|
BQAwLTETMBEGA1UECgwKaW8uc3RyaW16aTEWMBQGA1UEAwwNY2x1c3Rlci1jYSB2
|
||||||
MDAeFw0yNTA2MDQxMTMzMTRaFw0yNjA2MDQxMTMzMTRaMC0xEzARBgNVBAoMCmlv
|
MDAeFw0yNjExMTYxNDM1MDlaFw0yNzExMTYxNDM1MDlaMC0xEzARBgNVBAoMCmlv
|
||||||
LnN0cmltemkxFjAUBgNVBAMMDWNsdXN0ZXItY2EgdjAwggIiMA0GCSqGSIb3DQEB
|
LnN0cmltemkxFjAUBgNVBAMMDWNsdXN0ZXItY2EgdjAwggIiMA0GCSqGSIb3DQEB
|
||||||
AQUAA4ICDwAwggIKAoICAQDV2NBVwnXISH9i8K4KxSd2AThwgQyRKyeIfcqeYZ4F
|
AQUAA4ICDwAwggIKAoICAQCfzDZhEzw2pbU5Xpu8OzD+3iQG+DVjU8PQWWQEF27h
|
||||||
7FguEUI7uEtoWd4uO8DsIzoMoLYv5L1DfhNYUFWN3XYQd4XVFnwYQYbwspdC1L8G
|
yjohDkUr3zCZtW7xMKWKUNxBgrKsfe4TDOQN8cij3cS9sy0So+UhMeF7Bq9PU1Yd
|
||||||
u0T7943gRRRomcNP8n5nycfeZgZgmz9IS8vmxgRh4ao0kcCW49uBQMd706087UAI
|
bmTRq8q1PiuNUkiCGJ5wrb3+NZvVxZLJUIFgiealsRw80MgMWWSzy0I35T2Edn/a
|
||||||
qaRJTcabTZq1LTeoH9AOAyT/nawKm+1H5VmrMUBjzz9xKVXF0sCrhjYoZoM4x+fY
|
DU4jhlgQxyzQ621+oGP0n28gCjmm6pCq2tkj/Z8WTdu1gOWyRdK02a2uE2Ts2nLa
|
||||||
AphtxZDB21ZhEcHBbytEQkEm0QTbUP4xbu95yqY6goYi9S9R1uMgVZ9DoJVwyqLm
|
Di32GaZrIbIuD/WUd6Ek66uCeJvh2CT7s+SqgtMbtT7gibUuPQ3hk1VGQsjy22l3
|
||||||
/3ZGPjd9VmdBPO/zE/Bj890DjyKS7AXo9d+Iyv4M2QD1jA+5j4JyHzk7Lroz+HTg
|
hUNpLu86nrwbuf21mY55KnLOcaVq1ag1TpIIKfZAL/KWFCGZ6H6kwEIbCAL0Hei7
|
||||||
mwVpcVGafBWIC4qFt7C3UYt6IV64/MA2v9gxTIdJvOBZxKUiMl7f65jKNEntF6is
|
cJ2Wm2/qlzKUeU869M7YybZAfXl/t6XT4QgFgje+42N980vy5A4GhWi1Z7lPqqOe
|
||||||
86QCkjhvt34AThEoGx8SPjVr3sOBuneqcybeSYLyEWFg9Z1mWfMLHlA/Fp/Y2wpM
|
jPGBstkRZybKz1sTk87+oJx82iQU/ozVmzjSEK1SoYRNbvug8PNpxmPoPnJ2flgG
|
||||||
w1ZXj6uAa/UNUAIfkaLTOKHHaCCVD2G3Vkm94NHOJmDj6ze8P0J0H+Ub6ULD7hHr
|
t2q2+2ZQP3f1aAHVcZ3U5+hWlRmKPXzjrJv7gnhuvqJl7OwB50y+yWiVfZ9xrYl2
|
||||||
8obOSk9OvxoxVzE+UW7DyEL6YD8MBVUQKJIQVgZmpT4akWyz8bNhFRzgTnKAhwNN
|
EpX+yHuFFK+9NnB5taUK8Fz+hQaLU8J4q7P0bRqkoI+LdcEErjuDT/eI2d5+Ql8K
|
||||||
ATrGmjfX/wj7tCpy/PoJjEiu54sXW5xplBIz/ZgYHrPkyrbhQxsRozgQ+UIMIIbJ
|
/JkV823hX2WNB9bdaQ24BelVUbsxGpR7ms6KWrM11kHnbzUlEM+AxZES6F7Qbr55
|
||||||
/wIDAQABo0UwQzAdBgNVHQ4EFgQUkU4HKndgWxhcXMAe5XBc4OJwSgcwEgYDVR0T
|
TwIDAQABo0UwQzAdBgNVHQ4EFgQUM7hshx7e9TFEN82Pf446aBrJUA4wEgYDVR0T
|
||||||
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIB
|
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIB
|
||||||
AFLi5QLawZollou3+m5kYcBe5F8xKG5NlgNmKyIREnwD2AP4xrr2tNFbmP2hpEl4
|
AIZDUvQeimpvHncASAoBxQ6VBfGOYRKRnK7a8yK33M7X0CiZl0FtQM68mM/tkrMV
|
||||||
bWJJ84IHlKjpYxFLboWzgtW/JvdxcEh0K/x8/7cOD3Kk9d/LR9muj57mFYSQGlbo
|
RT7KzTIg2wLCMaQ6RJHOHHD0mevAcsGzqDIvIOk/FH57AWnrD41qJFTnWRBkbWzM
|
||||||
g0+lHNuLam8xGcnGVV5VdfcjFz72/q92ndTlJmz+v6OneTJvIypKoBmNKF25alz9
|
Q/qke9H1+Z0LTt6gJ4qZpoYi33FaPZZ+Q6aMvNYnf1y1SsQy7jBXK/ifB0az8FWI
|
||||||
pR2sTwoG0Pcwm30u/uS6pOewQ4sTiniOcc1MFYF7tl/Zz9Mqza8Rer0B5nm8lE/J
|
C8/QxoGjEhG+/w/8Z0fVOeuU7QQFgefQdZQnS2hfFhs9kGqwg6BKtAt056v/BMGq
|
||||||
Yo9UaEXyVLM8Y5kSOkxMlOK+8/UMeY/lcQYpd5tYVpvarnoPCjmUjt4iVw26ZsAH
|
ONqCNS5mhfZpXYB17oYAixSxGxYsbOAuX9dpvfYeNBAMpGc8+ooU8D6lEBCrgyS0
|
||||||
y4/vNW+wX+Uauarik1jHL/SauAjS3FbJoH06BBnji7J/Rud2DtSd+vVZrIBLJkaH
|
HusnOGHDSBAdj+AiaytZ2+G3oJ/Herx25OPClt9yIpxSeapaVomNeItzegC5DH36
|
||||||
+Xg/roD3xKx0XmhLJmPvxGrkyehbhkbJkPKCHa9P56rnev3MYjyy+SV7Vp8Dq+HF
|
lYIJW0htvpctqV/vXTFS6zUdOzMazDCTch9f8eBizEpsIiH8AamTDqq5/Q5Kn8Sz
|
||||||
Wkswl3QUPWx9reuvF2KMyt04Tw94UAxCUGkX5qg7Dq5d0Fj/AcIrFdLTCV8eG/UI
|
oW6XkxF5DDopzGTXjtI2HJfbCEMe04d7yW3bQ9amIOl3jWpKzRJvWT/FXHcf29s+
|
||||||
1kKRxmZ2/ALINBOlfJOVVovKBlWpPACs8iy6XreOXtoQfzoG2F9Vo3Jmzjpqsmz0
|
viEBP5kybgewVPK7HoKYbHyLvxbTYyauh8aeFrLgklZjK8lQvd0yNPaVYRAJ6C4m
|
||||||
9Ao4s2vcz3UuDtBhpwGp4N3zroyst/kQjtZirj4cS7fu75tB5N5mQ/tTwg0Tiw+Y
|
eBBW+JAJOAELDtC+adA2ucoUmbROaXF3u1hAA9JWbqL9w+1AsX4plinC6ojPFajl
|
||||||
XIdxeE73V5DAf4Dd5V1VdCbA6oQv5qJYvinYydyx4x3V
|
H1L4iq3Pjsfnqnc1VuthdgkPq3qGmybH5a+lCpWecpxV
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
|||||||
67
apps/faas/nn-dev/kustomization.yaml
Normal file
67
apps/faas/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
configMapGenerator:
|
||||||
|
- name: faas-contour-env
|
||||||
|
literals:
|
||||||
|
- BASE_HOST=https://${HOST_PLATFORM}
|
||||||
|
- DJANGO_HOST=https://${HOST_PLATFORM}
|
||||||
|
- REVIEWS_HOST=https://${HOST_PLATFORM}/flows
|
||||||
|
- GATEWAY_HOST=https://${HOST_PLATFORM}/gateway
|
||||||
|
- DOCUMENTATIONS_HOST=https://${HOST_PLATFORM}/documentations
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: faas-contour-env
|
||||||
|
fieldPath: data.BASE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: export-reviews
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=BASE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: faas-contour-env
|
||||||
|
fieldPath: data.DJANGO_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: export-reviews
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=DJANGO_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: faas-contour-env
|
||||||
|
fieldPath: data.REVIEWS_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: export-reviews
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=REVIEWS_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: faas-contour-env
|
||||||
|
fieldPath: data.GATEWAY_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: export-reviews
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=GATEWAY_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: faas-contour-env
|
||||||
|
fieldPath: data.DOCUMENTATIONS_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: export-reviews
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=DOCUMENTATIONS_HOST].value._default
|
||||||
@ -97,7 +97,7 @@ spec:
|
|||||||
envs:
|
envs:
|
||||||
- name: BASE_HOST
|
- name: BASE_HOST
|
||||||
value:
|
value:
|
||||||
_default: "http://frontend-service.django.svc.cluster.local:80"
|
_default: "https://srx.wb.ru"
|
||||||
|
|
||||||
- name: DJANGO_HOST
|
- name: DJANGO_HOST
|
||||||
value:
|
value:
|
||||||
|
|||||||
31
apps/flows/nn-dev/backend.yaml
Normal file
31
apps/flows/nn-dev/backend.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: flows
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/flows-postgresql ] && . /vault/secrets/flows-postgresql
|
||||||
|
[ -f /vault/secrets/flows-documentations-db ] && . /vault/secrets/flows-documentations-db
|
||||||
|
[ -f /vault/secrets/flows-rabbitmq ] && . /vault/secrets/flows-rabbitmq
|
||||||
|
[ -f /vault/secrets/flows-django-auth ] && . /vault/secrets/flows-django-auth
|
||||||
|
[ -f /vault/secrets/flows-kafka ] && . /vault/secrets/flows-kafka
|
||||||
|
[ -f /vault/secrets/flows-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/flows-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec /opt/entrypoint.sh
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-flows-kafka: secrets/data/kafka/apps/flows
|
||||||
|
vault.hashicorp.com/agent-inject-template-flows-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/flows" -}}
|
||||||
|
KAFKA_HOST={{ index .Data.data "bootstrap_servers" }}
|
||||||
|
KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
81
apps/flows/nn-dev/jwt-access.yaml
Normal file
81
apps/flows/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: flows
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-flows-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-flows-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-postgresql ] && . /vault/secrets/flows-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-documentations-db ] && . /vault/secrets/flows-documentations-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-rabbitmq ] && . /vault/secrets/flows-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-django-auth ] && . /vault/secrets/flows-django-auth
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-kafka ] && . /vault/secrets/flows-kafka
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/flows-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /opt/entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: flows
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-flows-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-flows-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-postgresql ] && . /vault/secrets/flows-postgresql
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-documentations-db ] && . /vault/secrets/flows-documentations-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-rabbitmq ] && . /vault/secrets/flows-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-django-auth ] && . /vault/secrets/flows-django-auth
|
||||||
|
|
||||||
|
[ -f /vault/secrets/flows-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/flows-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec celery -A src.worker worker -l INFO -E --concurrency=1 -Q flow
|
||||||
|
|
||||||
|
'
|
||||||
107
apps/flows/nn-dev/kustomization.yaml
Normal file
107
apps/flows/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
|
- path: backend.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: flows-contour-env
|
||||||
|
literals:
|
||||||
|
- BASE_HOST=https://${HOST_PLATFORM}
|
||||||
|
- SERVICE_HOST=https://${HOST_PLATFORM}/flows/api/v1
|
||||||
|
- CHECKLIST_HOST=http://backend-svc.checklists.svc.cluster.local:80
|
||||||
|
- PLANNING_HOST=http://backend-svc.pm.svc.cluster.local:8000/api/pm/msp
|
||||||
|
- GATEWAY_URL=http://pdm-svc.documentations.svc.cluster.local:80
|
||||||
|
- RESOURCE_URL=http://iam-backend.iam.svc.cluster.local:8000
|
||||||
|
- WORKFLOWS_HOST=http://backend-svc.processing.svc.cluster.local:80/api/v1
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.BASE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=BASE_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=BASE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.SERVICE_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SERVICE_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=SERVICE_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.CHECKLIST_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=CHECKLIST_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=CHECKLIST_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.PLANNING_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=PLANNING_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.GATEWAY_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=GATEWAY_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.RESOURCE_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=RESOURCE_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: flows-contour-env
|
||||||
|
fieldPath: data.WORKFLOWS_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=WORKFLOWS_HOST].value._default
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-backend:production_81d0fa17
|
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-backend:production_5b7915a1
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-backend_worker:production_81d0fa17
|
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-backend_worker:production_5b7915a1
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
399
apps/flows/wb/flows-worker-scheduler.yaml
Normal file
399
apps/flows/wb/flows-worker-scheduler.yaml
Normal file
@ -0,0 +1,399 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: flows-worker-scheduler
|
||||||
|
namespace: flows
|
||||||
|
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.7"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
|
||||||
|
services:
|
||||||
|
flows-worker-scheduler:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-backend_worker:production_5b7915a1
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
name:
|
||||||
|
_default: flows-worker-scheduler
|
||||||
|
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
|
||||||
|
command:
|
||||||
|
_default: ["celery", "-A", "src.worker", "beat", "-l", "INFO"]
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu:
|
||||||
|
_default: 60m
|
||||||
|
memory:
|
||||||
|
_default: 465Mi
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 30m
|
||||||
|
memory:
|
||||||
|
_default: 372Mi
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: dockerhub
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: kafka-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/src/flow/kafka.py
|
||||||
|
subPath:
|
||||||
|
_default: kafka.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: kafka-configmap
|
||||||
|
items:
|
||||||
|
- key: kafka.py
|
||||||
|
path:
|
||||||
|
_default: kafka.py
|
||||||
|
|
||||||
|
envs:
|
||||||
|
- name: KAFKA_HOST
|
||||||
|
value:
|
||||||
|
_default: "wb-prod-kafka-bootstrap.kafka.svc.cluster.local:9093"
|
||||||
|
|
||||||
|
- name: KAFKA_SSL_CERT
|
||||||
|
value:
|
||||||
|
_default: |
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFLTCCAxWgAwIBAgIUYDZPxGRsr7IiqHEmfd07QTQlOKYwDQYJKoZIhvcNAQEN
|
||||||
|
BQAwLTETMBEGA1UECgwKaW8uc3RyaW16aTEWMBQGA1UEAwwNY2x1c3Rlci1jYSB2
|
||||||
|
MDAeFw0yNTEyMTYxNDM0NTVaFw0yNjEyMTYxNDM0NTVaMC0xEzARBgNVBAoMCmlv
|
||||||
|
LnN0cmltemkxFjAUBgNVBAMMDWNsdXN0ZXItY2EgdjAwggIiMA0GCSqGSIb3DQEB
|
||||||
|
AQUAA4ICDwAwggIKAoICAQCfzDZhEzw2pbU5Xpu8OzD+3iQG+DVjU8PQWWQEF27h
|
||||||
|
yjohDkUr3zCZtW7xMKWKUNxBgrKsfe4TDOQN8cij3cS9sy0So+UhMeF7Bq9PU1Yd
|
||||||
|
bmTRq8q1PiuNUkiCGJ5wrb3+NZvVxZLJUIFgiealsRw80MgMWWSzy0I35T2Edn/a
|
||||||
|
DU4jhlgQxyzQ621+oGP0n28gCjmm6pCq2tkj/Z8WTdu1gOWyRdK02a2uE2Ts2nLa
|
||||||
|
Di32GaZrIbIuD/WUd6Ek66uCeJvh2CT7s+SqgtMbtT7gibUuPQ3hk1VGQsjy22l3
|
||||||
|
hUNpLu86nrwbuf21mY55KnLOcaVq1ag1TpIIKfZAL/KWFCGZ6H6kwEIbCAL0Hei7
|
||||||
|
cJ2Wm2/qlzKUeU869M7YybZAfXl/t6XT4QgFgje+42N980vy5A4GhWi1Z7lPqqOe
|
||||||
|
jPGBstkRZybKz1sTk87+oJx82iQU/ozVmzjSEK1SoYRNbvug8PNpxmPoPnJ2flgG
|
||||||
|
t2q2+2ZQP3f1aAHVcZ3U5+hWlRmKPXzjrJv7gnhuvqJl7OwB50y+yWiVfZ9xrYl2
|
||||||
|
EpX+yHuFFK+9NnB5taUK8Fz+hQaLU8J4q7P0bRqkoI+LdcEErjuDT/eI2d5+Ql8K
|
||||||
|
/JkV823hX2WNB9bdaQ24BelVUbsxGpR7ms6KWrM11kHnbzUlEM+AxZES6F7Qbr55
|
||||||
|
TwIDAQABo0UwQzAdBgNVHQ4EFgQUM7hshx7e9TFEN82Pf446aBrJUA4wEgYDVR0T
|
||||||
|
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIB
|
||||||
|
AFNHFGPDxY966fz0dxDFFSfeo47y7XQZMK9xAwH73cQoSeqx+IMxzgM8nfJQ9XMN
|
||||||
|
PeLwVRZ7pvRee2ZhUPglBSTHnW2rvfmLBOO9xyKZxRsCkoFxuHH9xfM7bFWb96R6
|
||||||
|
fGrOdEZDB3yj00T+tkubwqt+/dUhQUj8juwyPs55WMb/0BIbapaoQ6QOP13CaXDV
|
||||||
|
ZmAfsEEIBkNxfq7GTr/z0Rq0B4+9FxAf3Jrsmi/dYoFD/prHsvBDkYw1daoFyp5C
|
||||||
|
tbctvB9wtphnCCynekt8UBvpVKHUU/xaUa09TQTToXjBbV1SZeIOHNG0MNbWa4sz
|
||||||
|
AL/cpXdq1EAxiTeAVT9XhCwhe/xJvFZIWuFLmW3J+ZxrOUCKieCYpTqBY2tBkkDY
|
||||||
|
//egic787yTR6zxqQNSzvNU5LhzrN7lu+KHGM06T35+HvpzgPPiRCzsxO62p63op
|
||||||
|
mq04K31yYZgLiqeAj5W+rioRGJNn4TXJpH9KIrzmGM7lVWLYWMAKeZU4r1lDUdcu
|
||||||
|
7jsBH8BRJWJeVK3xVw2HB3lk7Xn0WrR92adeYQ3f0vKbMIAVUnSJ3yCKJ4NMFSki
|
||||||
|
j78nx2mi/G0RhUPGZ9hhLXQKj9BtbpEnwpbGWtf0ShtVOxD/HKLCr7koBtW9TMPS
|
||||||
|
9K0sJhE5VjsQLkDDu9p3GdRcuLNA/oa7xFvRFtqGFsLj
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: "DEBUG"
|
||||||
|
|
||||||
|
- name: FLOWS_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://backend-service.flows.svc.cluster.local:8000"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_PG_PORT
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_PG_DATABASE
|
||||||
|
value:
|
||||||
|
_default: "documentations_db"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_PG_HOST
|
||||||
|
value:
|
||||||
|
_default: "sarex-vpsql-01.xc.wb.ru"
|
||||||
|
|
||||||
|
- name: BASE_HOST
|
||||||
|
value:
|
||||||
|
_default: "https://lk.srx.wb.ru:30443"
|
||||||
|
|
||||||
|
- name: CELERY_QUEUE
|
||||||
|
value:
|
||||||
|
_default: "flow"
|
||||||
|
|
||||||
|
- name: RESOURCES_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://iams.iam.svc.cluster.local:8080"
|
||||||
|
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://backend.django.svc.cluster.local:8000/api"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://documentations-api.documentations.svc.cluster.local:8080/internal/v1"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_EXTERNAL_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://documentations-api.documentations.svc.cluster.local:8080/api/v1"
|
||||||
|
|
||||||
|
- name: ENABLE_ANALYTICS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
|
||||||
|
- name: FLOWS_DB_HOST
|
||||||
|
value:
|
||||||
|
_default: "sarex-vpsql-01.xc.wb.ru"
|
||||||
|
|
||||||
|
- name: FLOWS_DB_PORT
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
|
||||||
|
- name: ISSUES_DB_PORT
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
|
||||||
|
- name: ISSUES_DB_HOST
|
||||||
|
value:
|
||||||
|
_default: "sarex-vpsql-01.xc.wb.ru"
|
||||||
|
|
||||||
|
- name: ENABLE_CELERY
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
|
||||||
|
- name: ENABLE_MAILGUN
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
|
||||||
|
- name: ENABLE_METRICS
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
|
||||||
|
- name: FROM_EMAIL
|
||||||
|
value:
|
||||||
|
_default: "wb@wb.ru"
|
||||||
|
|
||||||
|
- name: GATEWAY_URL
|
||||||
|
value:
|
||||||
|
_default: "http://pdm-api.documentations.svc.cluster.local:8080"
|
||||||
|
|
||||||
|
- name: PG_HOST
|
||||||
|
value:
|
||||||
|
_default: "sarex-vpsql-01.xc.wb.ru"
|
||||||
|
|
||||||
|
- name: PG_PORT
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
|
||||||
|
- name: RABBITMQ_HOST
|
||||||
|
value:
|
||||||
|
_default: "rabbitmq.rabbitmq.svc.cluster.local"
|
||||||
|
|
||||||
|
- name: RABBITMQ_PORT
|
||||||
|
value:
|
||||||
|
_default: "5672"
|
||||||
|
|
||||||
|
- name: DJANGO_BASE_HOST
|
||||||
|
value:
|
||||||
|
_default: "https://srx.wb.ru"
|
||||||
|
|
||||||
|
- name: RESOURCE_URL
|
||||||
|
value:
|
||||||
|
_default: "http://iams.iam.svc.cluster.local:8080"
|
||||||
|
|
||||||
|
- name: SERVICE_HOST
|
||||||
|
value:
|
||||||
|
_default: "https://lk.srx.wb.ru:30443/flows/api/v1"
|
||||||
|
|
||||||
|
- name: SMTP_HOST
|
||||||
|
value:
|
||||||
|
_default: "smtp-relay.wb.com"
|
||||||
|
|
||||||
|
- name: SMTP_PORT
|
||||||
|
value:
|
||||||
|
_default: "587"
|
||||||
|
|
||||||
|
- name: SYNC_RESOURCE_ID
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
|
||||||
|
- name: TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "120"
|
||||||
|
|
||||||
|
- name: WORKFLOWS_HOST
|
||||||
|
value:
|
||||||
|
_default: "http://workflows-api-service.workflow.svc.cluster.local:8000/api/v1"
|
||||||
|
|
||||||
|
- name: WORKFLOWS_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "60"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "60"
|
||||||
|
|
||||||
|
secretEnvs:
|
||||||
|
- name: ADMIN_PANEL_SECRET_KEY
|
||||||
|
secretName:
|
||||||
|
_default: "admin-secret"
|
||||||
|
secretKey: "key"
|
||||||
|
|
||||||
|
- name: JWT_PUBLIC_KEY
|
||||||
|
secretName:
|
||||||
|
_default: "jwt-secret"
|
||||||
|
secretKey: "public_key"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_PG_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret-documentations"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: DOCUMENTATION_PG_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret-documentations"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
- name: FLOWS_DB_DB
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "database"
|
||||||
|
|
||||||
|
- name: FLOWS_DB_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: FLOWS_DB_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
- name: ISSUES_DB_DB
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret-issues"
|
||||||
|
secretKey: "database"
|
||||||
|
|
||||||
|
- name: ISSUES_DB_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret-issues"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: ISSUES_DB_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret-issues"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
- name: DJANGO_AUTH
|
||||||
|
secretName:
|
||||||
|
_default: "django-secret"
|
||||||
|
secretKey: "token"
|
||||||
|
|
||||||
|
- name: DJANGO_TOKEN
|
||||||
|
secretName:
|
||||||
|
_default: "django-secret"
|
||||||
|
secretKey: "token"
|
||||||
|
|
||||||
|
- name: PG_DB
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "database"
|
||||||
|
|
||||||
|
- name: PG_LOGIN
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: PG_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "postgres-secret"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
- name: RABBITMQ_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: "rabbitmq-secret"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: RABBITMQ_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "rabbitmq-secret"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
- name: RABBITMQ_VHOST
|
||||||
|
secretName:
|
||||||
|
_default: "rabbitmq-secret"
|
||||||
|
secretKey: "vhost"
|
||||||
|
|
||||||
|
- name: KAFKA_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: "kafka-secret"
|
||||||
|
secretKey: "username"
|
||||||
|
|
||||||
|
- name: KAFKA_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: "kafka-secret"
|
||||||
|
secretKey: "password"
|
||||||
|
|
||||||
|
commitSha: ""
|
||||||
|
gitlabUri: ""
|
||||||
|
gitlabJobUrl: ""
|
||||||
|
owner: ""
|
||||||
|
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
group: apps
|
||||||
|
version: v1
|
||||||
|
kind: Deployment
|
||||||
|
name: flows-worker-scheduler
|
||||||
|
patch: |-
|
||||||
|
- op: add
|
||||||
|
path: /spec/strategy
|
||||||
|
value:
|
||||||
|
type: Recreate
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-frontend:contour_4652ff61
|
_default: cr.yandex/crp3ccidau046kdj8g9q/flows-frontend:contour_33428cef
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -7,4 +7,5 @@ resources:
|
|||||||
- kafka-configmap.yaml
|
- kafka-configmap.yaml
|
||||||
- backend.yaml
|
- backend.yaml
|
||||||
- celery.yaml
|
- celery.yaml
|
||||||
|
- flows-worker-scheduler.yaml
|
||||||
- frontend.yaml
|
- frontend.yaml
|
||||||
|
|||||||
16
apps/iam/nn-dev/backend.yaml
Normal file
16
apps/iam/nn-dev/backend.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: iam-backend
|
||||||
|
namespace: iam
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-zitadel: secrets/data/zitadel/setup
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-zitadel: |-
|
||||||
|
{{- with secret "secrets/data/zitadel/setup" -}}
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token" }}
|
||||||
|
{{- end -}}
|
||||||
50
apps/iam/nn-dev/kustomization.yaml
Normal file
50
apps/iam/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- spicedb-schema.yaml
|
||||||
|
patches:
|
||||||
|
- path: backend.yaml
|
||||||
|
- path: spicedb.yaml
|
||||||
|
- path: zitadel-org-rules.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: iam-contour-env
|
||||||
|
literals:
|
||||||
|
- ZITADEL_HOST=https://${HOST_LOGIN}
|
||||||
|
- S3_ENDPOINT_URL=http://${MINIO_ENDPOINT}
|
||||||
|
- S3_BUCKET_NAME=django
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: iam-contour-env
|
||||||
|
fieldPath: data.ZITADEL_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: iam-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=ZITADEL_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: iam-contour-env
|
||||||
|
fieldPath: data.S3_ENDPOINT_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: iam-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=S3_ENDPOINT_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: iam-contour-env
|
||||||
|
fieldPath: data.S3_BUCKET_NAME
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: iam-backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=S3_BUCKET_NAME].value._default
|
||||||
29
apps/iam/nn-dev/spicedb-schema.yaml
Normal file
29
apps/iam/nn-dev/spicedb-schema.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: iam-spicedb-schema
|
||||||
|
namespace: iam
|
||||||
|
data:
|
||||||
|
schema.json: '{"schema": "definition auth_group {\n\trelation grants: django_permission\n}\n\n//
|
||||||
|
Org structure. department \u0431\u0435\u0437 parent \u043c\u0435\u0436\u0434\u0443
|
||||||
|
department.\ndefinition department {\n\trelation tenant: tenant\n\trelation member:
|
||||||
|
user\n\trelation service_account: service_account\n\trelation groups: auth_group\n\tpermission
|
||||||
|
group_grants = groups->grants\n}\n\ndefinition django_permission {}\n\ndefinition
|
||||||
|
position {\n\trelation tenant: tenant\n\trelation department: department\n\trelation
|
||||||
|
holder: user\n\trelation service_account: service_account\n\trelation groups:
|
||||||
|
auth_group\n\trelation scoped_resource: resource\n\tpermission group_grants =
|
||||||
|
groups->grants\n}\n\ndefinition resource {\n\trelation tenant: tenant\n\trelation
|
||||||
|
parent: resource\n\n\trelation read: service_account | service_account#member\n\trelation
|
||||||
|
write: service_account | service_account#member\n\trelation admin: service_account
|
||||||
|
| service_account#member\n\trelation view: service_account | service_account#member\n\n\tpermission
|
||||||
|
inherited_read = read + write + admin + parent->inherited_read\n\tpermission inherited_write
|
||||||
|
= write + admin + parent->inherited_write\n\tpermission inherited_admin = admin
|
||||||
|
+ parent->inherited_admin\n\n\tpermission allow_read = inherited_read + view +
|
||||||
|
tenant->unrestricted\n\tpermission allow_write = inherited_write\n\tpermission
|
||||||
|
allow_admin = inherited_admin\n}\n\ndefinition service_account {\n\trelation direct_member:
|
||||||
|
user\n\tpermission member = direct_member\n}\n\ndefinition tenant {\n\trelation
|
||||||
|
unrestricted: service_account | service_account#member\n}\n\ndefinition user {\n\trelation
|
||||||
|
direct: django_permission\n\trelation member: auth_group\n\trelation holder: position\n\trelation
|
||||||
|
department_member: department\n\tpermission global_grant = direct + member->grants
|
||||||
|
+ holder->group_grants + department_member->group_grants\n\tpermission resource_position_grant
|
||||||
|
= holder->group_grants\n}\n"}'
|
||||||
148
apps/iam/nn-dev/spicedb.yaml
Normal file
148
apps/iam/nn-dev/spicedb.yaml
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: iam-backend
|
||||||
|
namespace: iam
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/iams:contour_d5c05e7e
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/iam-db ] && . /vault/secrets/iam-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/iam-zitadel ] && . /vault/secrets/iam-zitadel
|
||||||
|
|
||||||
|
[ -f /vault/secrets/iam-kafka ] && . /vault/secrets/iam-kafka
|
||||||
|
|
||||||
|
[ -f /vault/secrets/iam-s3 ] && . /vault/secrets/iam-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/iam-spicedb ] && . /vault/secrets/iam-spicedb
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec ./server
|
||||||
|
|
||||||
|
'
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
maxSurge: 1
|
||||||
|
probes:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
httpGet:
|
||||||
|
path:
|
||||||
|
_default: /api/health
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
periodSeconds:
|
||||||
|
_default: 5
|
||||||
|
timeoutSeconds:
|
||||||
|
_default: 3
|
||||||
|
envs:
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: prod
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: debug
|
||||||
|
- name: AUTH_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: '8080'
|
||||||
|
- name: HTTP_READ_BUFFER_SIZE
|
||||||
|
value:
|
||||||
|
_default: '131072'
|
||||||
|
- name: DB_MIGRATIONS_PATH
|
||||||
|
value:
|
||||||
|
_default: migrations
|
||||||
|
- name: ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://${HOST_LOGIN}
|
||||||
|
- name: ZITADEL_ORG_RULES_FILE
|
||||||
|
value:
|
||||||
|
_default: config/zitadel/org-rules-prod.json
|
||||||
|
- name: S3_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: S3_ENDPOINT_URL
|
||||||
|
value:
|
||||||
|
_default: http://${MINIO_ENDPOINT}
|
||||||
|
- name: S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: django
|
||||||
|
- name: S3_REGION
|
||||||
|
value:
|
||||||
|
_default: ru-central1
|
||||||
|
- name: S3_PRESIGN_EXPIRES
|
||||||
|
value:
|
||||||
|
_default: 1h
|
||||||
|
- name: KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /etc/ca-certificates/Yandex/ca-cert
|
||||||
|
- name: KAFKA_TOPIC_LEGACY_AMS_SYNC
|
||||||
|
value:
|
||||||
|
_default: ams-sync
|
||||||
|
- name: SPICEDB_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: spicedb.spicedb.svc.cluster.local:50051
|
||||||
|
- name: SPICEDB_INSECURE
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-spicedb: secrets/data/apps/spicedb/auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-spicedb: '{{- with secret
|
||||||
|
"secrets/data/apps/spicedb/auth" -}}
|
||||||
|
|
||||||
|
SPICEDB_TOKEN=''{{ index .Data.data "preshared_key" }}''
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200,8443,50051
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-db: secrets/data/apps/django/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-db: '{{- with secret "secrets/data/apps/django/postgres"
|
||||||
|
-}}
|
||||||
|
|
||||||
|
DB_DSN=postgres://{{ index .Data.data "username" }}:{{ index .Data.data
|
||||||
|
"password" }}@{{ index .Data.data "host" }}:{{ index .Data.data "port"
|
||||||
|
}}/{{ index .Data.data "database" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: Deployment
|
||||||
|
name: iam-backend
|
||||||
|
patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: iam-backend\n\
|
||||||
|
spec:\n template:\n metadata:\n annotations:\n checksum/spicedb-schema:\
|
||||||
|
\ 72606779239bef9fe18170545d8fb3d70581581048aeea55a390d414197f1ce6\n \
|
||||||
|
\ spec:\n initContainers:\n - name: spicedb-schema\n image:\
|
||||||
|
\ cr.yandex/crp3ccidau046kdj8g9q/vault/vault:1.21.2\n command:\n\
|
||||||
|
\ - /bin/sh\n - -ec\n args:\n - \". /vault/secrets/iam-spicedb\\\
|
||||||
|
nfor attempt in $(seq 1 60); do\\n if wget\\\n \\ -qO /tmp/schema-result.json\
|
||||||
|
\ --header=\\\"Authorization: Bearer $SPICEDB_TOKEN\\\"\\\n \\\
|
||||||
|
\ --header=\\\"Content-Type: application/json\\\" --post-file=/schema/schema.json\\\
|
||||||
|
\n \\ http://spicedb.spicedb.svc.cluster.local:8443/v1/schema/write;\
|
||||||
|
\ then\\n\\\n \\ echo \\\"SpiceDB schema loaded\\\"\\n exit\
|
||||||
|
\ 0\\n fi\\n sleep 2\\ndone\\n\\\n exit 1\\n\"\n resources:\n\
|
||||||
|
\ requests:\n cpu: 25m\n memory: 32Mi\n \
|
||||||
|
\ volumeMounts:\n - name: spicedb-schema\n mountPath:\
|
||||||
|
\ /schema\n readOnly: true\n volumes:\n - name: spicedb-schema\n\
|
||||||
|
\ configMap:\n name: iam-spicedb-schema\n"
|
||||||
@ -1,11 +1,11 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
|
||||||
org-rules-prod.json: |
|
|
||||||
{
|
|
||||||
"default_org_id": "383923292894987370",
|
|
||||||
"rules": []
|
|
||||||
}
|
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: iam-zitadel-org-rules
|
name: iam-zitadel-org-rules
|
||||||
namespace: iam
|
namespace: iam
|
||||||
|
data:
|
||||||
|
org-rules-prod.json: |
|
||||||
|
{
|
||||||
|
"default_org_id": "${ZITADEL_ORG_ID}",
|
||||||
|
"rules": []
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ kind: Kustomization
|
|||||||
namespace: iam
|
namespace: iam
|
||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
|
- spicedb-schema.yaml
|
||||||
patches:
|
patches:
|
||||||
- path: backend-s3.yaml
|
- path: backend-s3.yaml
|
||||||
target:
|
target:
|
||||||
@ -12,3 +13,7 @@ patches:
|
|||||||
target:
|
target:
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
name: iam-zitadel-org-rules
|
name: iam-zitadel-org-rules
|
||||||
|
- path: spicedb.yaml
|
||||||
|
target:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: iam-backend
|
||||||
|
|||||||
22
apps/iam/uralkal/spicedb-schema.yaml
Normal file
22
apps/iam/uralkal/spicedb-schema.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: iam-spicedb-schema
|
||||||
|
namespace: iam
|
||||||
|
data:
|
||||||
|
schema.json: '{"schema": "definition auth_group {\n\trelation grants: django_permission\n}\n\n// Org structure.
|
||||||
|
department \u0431\u0435\u0437 parent \u043c\u0435\u0436\u0434\u0443 department.\ndefinition department {\n\trelation
|
||||||
|
tenant: tenant\n\trelation member: user\n\trelation service_account: service_account\n\trelation groups: auth_group\n\tpermission
|
||||||
|
group_grants = groups->grants\n}\n\ndefinition django_permission {}\n\ndefinition position {\n\trelation tenant:
|
||||||
|
tenant\n\trelation department: department\n\trelation holder: user\n\trelation service_account: service_account\n\trelation
|
||||||
|
groups: auth_group\n\trelation scoped_resource: resource\n\tpermission group_grants = groups->grants\n}\n\ndefinition
|
||||||
|
resource {\n\trelation tenant: tenant\n\trelation parent: resource\n\n\trelation read: service_account | service_account#member\n\trelation
|
||||||
|
write: service_account | service_account#member\n\trelation admin: service_account | service_account#member\n\trelation
|
||||||
|
view: service_account | service_account#member\n\n\tpermission inherited_read = read + write + admin + parent->inherited_read\n\tpermission
|
||||||
|
inherited_write = write + admin + parent->inherited_write\n\tpermission inherited_admin = admin + parent->inherited_admin\n\n\tpermission
|
||||||
|
allow_read = inherited_read + view + tenant->unrestricted\n\tpermission allow_write = inherited_write\n\tpermission
|
||||||
|
allow_admin = inherited_admin\n}\n\ndefinition service_account {\n\trelation direct_member: user\n\tpermission
|
||||||
|
member = direct_member\n}\n\ndefinition tenant {\n\trelation unrestricted: service_account | service_account#member\n}\n\ndefinition
|
||||||
|
user {\n\trelation direct: django_permission\n\trelation member: auth_group\n\trelation holder: position\n\trelation
|
||||||
|
department_member: department\n\tpermission global_grant = direct + member->grants + holder->group_grants +
|
||||||
|
department_member->group_grants\n\tpermission resource_position_grant = holder->group_grants\n}\n"}'
|
||||||
153
apps/iam/uralkal/spicedb.yaml
Normal file
153
apps/iam/uralkal/spicedb.yaml
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: iam-backend
|
||||||
|
namespace: iam
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/iams:production_beb901c6
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/iam-db ] && . /vault/secrets/iam-db
|
||||||
|
[ -f /vault/secrets/iam-zitadel ] && . /vault/secrets/iam-zitadel
|
||||||
|
[ -f /vault/secrets/iam-kafka ] && . /vault/secrets/iam-kafka
|
||||||
|
[ -f /vault/secrets/iam-s3 ] && . /vault/secrets/iam-s3
|
||||||
|
[ -f /vault/secrets/iam-spicedb ] && . /vault/secrets/iam-spicedb
|
||||||
|
set +a
|
||||||
|
exec ./server
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
maxSurge: 1
|
||||||
|
probes:
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
httpGet:
|
||||||
|
path:
|
||||||
|
_default: /api/health
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
periodSeconds:
|
||||||
|
_default: 5
|
||||||
|
timeoutSeconds:
|
||||||
|
_default: 3
|
||||||
|
envs:
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: prod
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: debug
|
||||||
|
- name: AUTH_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: '8080'
|
||||||
|
- name: HTTP_READ_BUFFER_SIZE
|
||||||
|
value:
|
||||||
|
_default: '131072'
|
||||||
|
- name: DB_MIGRATIONS_PATH
|
||||||
|
value:
|
||||||
|
_default: migrations
|
||||||
|
- name: ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://login.sarex.local.uralkali.com
|
||||||
|
- name: ZITADEL_ORG_RULES_FILE
|
||||||
|
value:
|
||||||
|
_default: config/zitadel/org-rules-prod.json
|
||||||
|
- name: S3_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: S3_ENDPOINT_URL
|
||||||
|
value:
|
||||||
|
_default: http://s3-proxy.s3-proxy.svc.cluster.local
|
||||||
|
- name: S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: iam
|
||||||
|
- name: ZITADEL_TLS_INSECURE_SKIP_VERIFY
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: S3_REGION
|
||||||
|
value:
|
||||||
|
_default: ru-central1
|
||||||
|
- name: S3_PRESIGN_EXPIRES
|
||||||
|
value:
|
||||||
|
_default: 1h
|
||||||
|
- name: KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /etc/ca-certificates/Yandex/ca-cert
|
||||||
|
- name: KAFKA_TOPIC_LEGACY_AMS_SYNC
|
||||||
|
value:
|
||||||
|
_default: ams-sync
|
||||||
|
- name: SPICEDB_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: spicedb.spicedb.svc.cluster.local:50051
|
||||||
|
- name: SPICEDB_INSECURE
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-spicedb: secrets/data/apps/spicedb/auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-spicedb: |-
|
||||||
|
{{- with secret "secrets/data/apps/spicedb/auth" -}}
|
||||||
|
SPICEDB_TOKEN='{{ index .Data.data "preshared_key" }}'
|
||||||
|
{{- end -}}
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200,8443,50051
|
||||||
|
vault.hashicorp.com/agent-image: cr.yandex/crp3ccidau046kdj8g9q/vault/vault:1.21.2
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: Deployment
|
||||||
|
name: iam-backend
|
||||||
|
patch: |
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: iam-backend
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/spicedb-schema: 72606779239bef9fe18170545d8fb3d70581581048aeea55a390d414197f1ce6
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: spicedb-schema
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/vault/vault:1.21.2
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
args:
|
||||||
|
- ". /vault/secrets/iam-spicedb\nfor attempt in $(seq 1 60); do\n if wget\
|
||||||
|
\ -qO /tmp/schema-result.json --header=\"Authorization: Bearer $SPICEDB_TOKEN\"\
|
||||||
|
\ --header=\"Content-Type: application/json\" --post-file=/schema/schema.json\
|
||||||
|
\ http://spicedb.spicedb.svc.cluster.local:8443/v1/schema/write; then\n\
|
||||||
|
\ echo \"SpiceDB schema loaded\"\n exit 0\n fi\n sleep 2\ndone\n\
|
||||||
|
exit 1\n"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 25m
|
||||||
|
memory: 32Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: spicedb-schema
|
||||||
|
mountPath: /schema
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: spicedb-schema
|
||||||
|
configMap:
|
||||||
|
name: iam-spicedb-schema
|
||||||
@ -1,91 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: iam-backend
|
|
||||||
namespace: iam
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu:
|
|
||||||
_default: 20m
|
|
||||||
memory:
|
|
||||||
_default: 89Mi
|
|
||||||
requests:
|
|
||||||
cpu:
|
|
||||||
_default: 10m
|
|
||||||
memory:
|
|
||||||
_default: 64Mi
|
|
||||||
|
|
||||||
envs:
|
|
||||||
- name: ENVIRONMENT
|
|
||||||
value:
|
|
||||||
_default: "prod"
|
|
||||||
|
|
||||||
- name: LOG_LEVEL
|
|
||||||
value:
|
|
||||||
_default: "debug"
|
|
||||||
|
|
||||||
- name: AUTH_ENABLED
|
|
||||||
value:
|
|
||||||
_default: "true"
|
|
||||||
|
|
||||||
- name: HTTP_PORT
|
|
||||||
value:
|
|
||||||
_default: "8080"
|
|
||||||
|
|
||||||
- name: HTTP_READ_BUFFER_SIZE
|
|
||||||
value:
|
|
||||||
_default: "131072"
|
|
||||||
|
|
||||||
- name: DB_MIGRATIONS_PATH
|
|
||||||
value:
|
|
||||||
_default: "migrations"
|
|
||||||
|
|
||||||
- name: ZITADEL_ENABLED
|
|
||||||
value:
|
|
||||||
_default: "true"
|
|
||||||
|
|
||||||
- name: ZITADEL_HOST
|
|
||||||
value:
|
|
||||||
_default: "https://sarex-login.uralmine.com"
|
|
||||||
|
|
||||||
- name: ZITADEL_ORG_RULES_FILE
|
|
||||||
value:
|
|
||||||
_default: "config/zitadel/org-rules-prod.json"
|
|
||||||
|
|
||||||
- name: S3_ENABLED
|
|
||||||
value:
|
|
||||||
_default: "true"
|
|
||||||
|
|
||||||
- name: S3_ENDPOINT_URL
|
|
||||||
value:
|
|
||||||
_default: "http://10.49.10.90:9000"
|
|
||||||
|
|
||||||
- name: S3_BUCKET_NAME
|
|
||||||
value:
|
|
||||||
_default: "sarex-media-storage"
|
|
||||||
|
|
||||||
- name: S3_REGION
|
|
||||||
value:
|
|
||||||
_default: "ru-central1"
|
|
||||||
|
|
||||||
- name: S3_PRESIGN_EXPIRES
|
|
||||||
value:
|
|
||||||
_default: "1h"
|
|
||||||
|
|
||||||
- name: KAFKA_ENABLED
|
|
||||||
value:
|
|
||||||
_default: "false"
|
|
||||||
|
|
||||||
- name: KAFKA_SSL_CAFILE
|
|
||||||
value:
|
|
||||||
_default: "/etc/ca-certificates/Yandex/ca-cert"
|
|
||||||
|
|
||||||
- name: KAFKA_TOPIC_LEGACY_AMS_SYNC
|
|
||||||
value:
|
|
||||||
_default: "ams-sync"
|
|
||||||
212
apps/iam/wb/backend.yaml
Normal file
212
apps/iam/wb/backend.yaml
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: iams
|
||||||
|
namespace: iam
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
releaseName: iams
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: 0.1.9
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
iams:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/iams:production_beb901c6
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: iams
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 25%
|
||||||
|
maxUnavailable: 25%
|
||||||
|
type: RollingUpdate
|
||||||
|
progressDeadlineSeconds:
|
||||||
|
_default: 600
|
||||||
|
revisionHistoryLimit:
|
||||||
|
_default: 10
|
||||||
|
terminationGracePeriodSeconds:
|
||||||
|
_default: 30
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
httpGet:
|
||||||
|
path:
|
||||||
|
_default: /api/health
|
||||||
|
port:
|
||||||
|
_default: http
|
||||||
|
initialDelaySeconds:
|
||||||
|
_default: 5
|
||||||
|
periodSeconds:
|
||||||
|
_default: 10
|
||||||
|
timeoutSeconds:
|
||||||
|
_default: 8
|
||||||
|
failureThreshold:
|
||||||
|
_default: 3
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: iams
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
targetPort:
|
||||||
|
_default: 8080
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: dockerhub
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
proxy.istio.io/config: "tracing:\n sampling: 100\n zipkin:\n address: signoz-otel-collector-external.signoz.svc.cluster.local:9411\n custom_tags:\n k8s.pod.name:\n environment:\n name: POD_NAME\n k8s.namespace.name:\n environment:\n name: POD_NAMESPACE\n k8s.pod.ip:\n environment:\n name: INSTANCE_IP\n"
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411
|
||||||
|
checksum/spicedb-schema: 72606779239bef9fe18170545d8fb3d70581581048aeea55a390d414197f1ce6
|
||||||
|
envs:
|
||||||
|
- name: SPICEDB_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: spicedb.spicedb.svc.cluster.local:50051
|
||||||
|
- name: SPICEDB_INSECURE
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: prod
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: debug
|
||||||
|
- name: AUTH_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: '8080'
|
||||||
|
- name: HTTP_READ_BUFFER_SIZE
|
||||||
|
value:
|
||||||
|
_default: '131072'
|
||||||
|
- name: DB_MIGRATIONS_PATH
|
||||||
|
value:
|
||||||
|
_default: migrations
|
||||||
|
- name: ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'true'
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://zitadel-srx.wb.ru
|
||||||
|
- name: ZITADEL_ORG_RULES_FILE
|
||||||
|
value:
|
||||||
|
_default: config/zitadel/org-rules-prod.json
|
||||||
|
- name: S3_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: S3_ENDPOINT_URL
|
||||||
|
value:
|
||||||
|
_default: https://storage.yandoud.net
|
||||||
|
- name: S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: sarex-media-storage
|
||||||
|
- name: S3_REGION
|
||||||
|
value:
|
||||||
|
_default: ru-central1
|
||||||
|
- name: S3_PRESIGN_EXPIRES
|
||||||
|
value:
|
||||||
|
_default: 1h
|
||||||
|
- name: KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: 'false'
|
||||||
|
- name: KAFKA_SECURITY_PROTOCOL
|
||||||
|
value:
|
||||||
|
_default: SASL_SSL
|
||||||
|
- name: KAFKA_SASL_MECHANISM
|
||||||
|
value:
|
||||||
|
_default: SCRAM-SHA-512
|
||||||
|
- name: KAFKA_BROKERS
|
||||||
|
value:
|
||||||
|
_default: rc1d-s0a1ujcbj6fdk26b.mdb.yandexcloud.net:9091
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /etc/ca-certificates/Yandex/ca-cert
|
||||||
|
- name: KAFKA_TOPIC_LEGACY_AMS_SYNC
|
||||||
|
value:
|
||||||
|
_default: ams-sync
|
||||||
|
secretEnvs:
|
||||||
|
- name: SPICEDB_TOKEN
|
||||||
|
secretName:
|
||||||
|
_default: spicedb-secret
|
||||||
|
secretKey: grpc-preshared-key
|
||||||
|
- name: DB_DSN
|
||||||
|
secretName:
|
||||||
|
_default: iams-secret
|
||||||
|
secretKey: db-dsn
|
||||||
|
- name: ZITADEL_ACCESS_TOKEN
|
||||||
|
secretName:
|
||||||
|
_default: iams-secret
|
||||||
|
secretKey: zitadel-access-token
|
||||||
|
- name: KAFKA_SASL_PLAIN_USERNAME
|
||||||
|
secretName:
|
||||||
|
_default: iams-secret
|
||||||
|
secretKey: kafka-sasl-plain-username
|
||||||
|
- name: KAFKA_SASL_PLAIN_PASSWORD
|
||||||
|
secretName:
|
||||||
|
_default: iams-secret
|
||||||
|
secretKey: kafka-sasl-plain-password
|
||||||
|
- name: S3_ACCESS_KEY_ID
|
||||||
|
secretName:
|
||||||
|
_default: yc-s3-secret
|
||||||
|
secretKey: key_id
|
||||||
|
- name: S3_SECRET_ACCESS_KEY
|
||||||
|
secretName:
|
||||||
|
_default: yc-s3-secret
|
||||||
|
secretKey: access_key
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- mountPath: /etc/ca-certificates/Yandex
|
||||||
|
name: kafka-ca
|
||||||
|
readOnly: true
|
||||||
|
secret:
|
||||||
|
defaultMode: 420
|
||||||
|
secretName: ya-ca-secret
|
||||||
|
- mountPath: /config/zitadel/org-rules-prod.json
|
||||||
|
name: zitadel-rules
|
||||||
|
readOnly: true
|
||||||
|
subPath: org-rules-prod.json
|
||||||
|
configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
name: iam-zitadel-org-rules
|
||||||
|
postRenderers:
|
||||||
|
- kustomize:
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: Deployment
|
||||||
|
name: iams
|
||||||
|
patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: iams\n namespace: iam\nspec:\n template:\n spec:\n initContainers:\n - name: spicedb-schema\n image: cr.yandex/crp3ccidau046kdj8g9q/authzed/zed:v1.2.0\n imagePullPolicy: IfNotPresent\n command:\n - /usr/local/bin/zed\n args:\n - --insecure\n - --skip-version-check\n - --max-retries\n - '60'\n - schema\n - write\n - /schema/iam.zed\n env:\n - name: ZED_ENDPOINT\n value: spicedb.spicedb.svc.cluster.local:50051\n - name: ZED_TOKEN\n valueFrom:\n secretKeyRef:\n name: spicedb-secret\n key: grpc-preshared-key\n volumeMounts:\n - name: spicedb-schema\n mountPath: /schema\n readOnly: true\n resources:\n requests:\n cpu: 25m\n memory: 32Mi\n limits:\n cpu: 250m\n\
|
||||||
|
\ memory: 128Mi\n volumes:\n - name: spicedb-schema\n configMap:\n name: iam-spicedb-schema\n"
|
||||||
@ -1,11 +1,7 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: iam
|
namespace: iam
|
||||||
resources:
|
resources:
|
||||||
- ../base
|
- org-rules.yaml
|
||||||
patches:
|
- spicedb-schema.yaml
|
||||||
- path: backend-s3.yaml
|
- backend.yaml
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: iam-backend
|
|
||||||
|
|||||||
13
apps/iam/wb/org-rules.yaml
Normal file
13
apps/iam/wb/org-rules.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: iam-zitadel-org-rules
|
||||||
|
namespace: iam
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
data:
|
||||||
|
org-rules-prod.json: |
|
||||||
|
{
|
||||||
|
"default_org_id": "362899668818023622",
|
||||||
|
"rules": []
|
||||||
|
}
|
||||||
23
apps/iam/wb/spicedb-schema.yaml
Normal file
23
apps/iam/wb/spicedb-schema.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: iam-spicedb-schema
|
||||||
|
namespace: iam
|
||||||
|
data:
|
||||||
|
iam.zed: "definition auth_group {\n\trelation grants: django_permission\n}\n\n// Org structure. department без\
|
||||||
|
\ parent между department.\ndefinition department {\n\trelation tenant: tenant\n\trelation member: user\n\t\
|
||||||
|
relation service_account: service_account\n\trelation groups: auth_group\n\tpermission group_grants = groups->grants\n\
|
||||||
|
}\n\ndefinition django_permission {}\n\ndefinition position {\n\trelation tenant: tenant\n\trelation department:\
|
||||||
|
\ department\n\trelation holder: user\n\trelation service_account: service_account\n\trelation groups: auth_group\n\
|
||||||
|
\trelation scoped_resource: resource\n\tpermission group_grants = groups->grants\n}\n\ndefinition resource {\n\
|
||||||
|
\trelation tenant: tenant\n\trelation parent: resource\n\n\trelation read: service_account | service_account#member\n\
|
||||||
|
\trelation write: service_account | service_account#member\n\trelation admin: service_account | service_account#member\n\
|
||||||
|
\trelation view: service_account | service_account#member\n\n\tpermission inherited_read = read + write + admin\
|
||||||
|
\ + parent->inherited_read\n\tpermission inherited_write = write + admin + parent->inherited_write\n\tpermission\
|
||||||
|
\ inherited_admin = admin + parent->inherited_admin\n\n\tpermission allow_read = inherited_read + view + tenant->unrestricted\n\
|
||||||
|
\tpermission allow_write = inherited_write\n\tpermission allow_admin = inherited_admin\n}\n\ndefinition service_account\
|
||||||
|
\ {\n\trelation direct_member: user\n\tpermission member = direct_member\n}\n\ndefinition tenant {\n\trelation\
|
||||||
|
\ unrestricted: service_account | service_account#member\n}\n\ndefinition user {\n\trelation direct: django_permission\n\
|
||||||
|
\trelation member: auth_group\n\trelation holder: position\n\trelation department_member: department\n\tpermission\
|
||||||
|
\ global_grant = direct + member->grants + holder->group_grants + department_member->group_grants\n\tpermission\
|
||||||
|
\ resource_position_grant = holder->group_grants\n}\n"
|
||||||
34
apps/inspections/nn-dev/kustomization.yaml
Normal file
34
apps/inspections/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
configMapGenerator:
|
||||||
|
- name: inspections-contour-env
|
||||||
|
literals:
|
||||||
|
- SERVICE_URL=https://${HOST_PLATFORM}
|
||||||
|
- SAREX_BACKEND_URL=http://backend-svc.django.svc.cluster.local
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: inspections-contour-env
|
||||||
|
fieldPath: data.SERVICE_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SERVICE_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: inspections-contour-env
|
||||||
|
fieldPath: data.SAREX_BACKEND_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SAREX_BACKEND_URL].value._default
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/sarex-inspections:production_1a33f6f4
|
_default: cr.yandex/crp3ccidau046kdj8g9q/inspections-backend:contour_32f00e42
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
18
apps/issues/nn-dev/backend.yaml
Normal file
18
apps/issues/nn-dev/backend.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: issues
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/issues" -}}
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key_id" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_access_key" }}
|
||||||
|
YC_S3_BUCKET_NAME={{ index .Data.data "bucket" }}
|
||||||
|
YC_S3_ENDPOINT_URL=http://${MINIO_ENDPOINT}
|
||||||
|
{{- end -}}
|
||||||
18
apps/issues/nn-dev/celery.yaml
Normal file
18
apps/issues/nn-dev/celery.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: issues
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/issues" -}}
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key_id" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_access_key" }}
|
||||||
|
YC_S3_BUCKET_NAME={{ index .Data.data "bucket" }}
|
||||||
|
YC_S3_ENDPOINT_URL=http://${MINIO_ENDPOINT}
|
||||||
|
{{- end -}}
|
||||||
173
apps/issues/nn-dev/jwt-access.yaml
Normal file
173
apps/issues/nn-dev/jwt-access.yaml
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: issues
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-issues-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-secret-issues-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
checksum/jwt-runtime: bcaa607c06a7f91528e766be4817c96a51a1175ec862fd7b43ee0a4e96f90e6d
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-db ] && . /vault/secrets/issues-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-rabbitmq ] && . /vault/secrets/issues-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-s3 ] && . /vault/secrets/issues-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-django-auth ] && . /vault/secrets/issues-django-auth
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/issues-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec /src/entrypoint.sh
|
||||||
|
|
||||||
|
'
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
name:
|
||||||
|
_default: production-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /jwt-config/original-production.py
|
||||||
|
name: production-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-production
|
||||||
|
mountPath:
|
||||||
|
_default: /src/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-auth
|
||||||
|
mountPath:
|
||||||
|
_default: /src/config/jwt_legacy_auth.py
|
||||||
|
subPath:
|
||||||
|
_default: legacy_auth.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: legacy_auth.py
|
||||||
|
path:
|
||||||
|
_default: legacy_auth.py
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: issues
|
||||||
|
spec:
|
||||||
|
values:
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
vault.hashicorp.com/agent-inject-secret-issues-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-secret-issues-jwt-public: secrets/data/vault/common/jwt_public
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-jwt-private: null
|
||||||
|
vault.hashicorp.com/agent-inject-template-issues-jwt-public: '{{- with
|
||||||
|
secret "secrets/data/vault/common/jwt_public" -}}
|
||||||
|
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
|
||||||
|
{{- end -}}'
|
||||||
|
checksum/jwt-runtime: bcaa607c06a7f91528e766be4817c96a51a1175ec862fd7b43ee0a4e96f90e6d
|
||||||
|
deployment:
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- 'set -a
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-db ] && . /vault/secrets/issues-db
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-rabbitmq ] && . /vault/secrets/issues-rabbitmq
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-s3 ] && . /vault/secrets/issues-s3
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-django-auth ] && . /vault/secrets/issues-django-auth
|
||||||
|
|
||||||
|
[ -f /vault/secrets/issues-jwt-public ] && export JWT_PUBLIC_KEY="$(cat
|
||||||
|
/vault/secrets/issues-jwt-public)"
|
||||||
|
|
||||||
|
set +a
|
||||||
|
|
||||||
|
exec celery -A config worker -l info -E
|
||||||
|
|
||||||
|
'
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- configMap:
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
name:
|
||||||
|
_default: production-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /jwt-config/original-production.py
|
||||||
|
name: production-configmap
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-production
|
||||||
|
mountPath:
|
||||||
|
_default: /src/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
- name: jwt-runtime-auth
|
||||||
|
mountPath:
|
||||||
|
_default: /src/config/jwt_legacy_auth.py
|
||||||
|
subPath:
|
||||||
|
_default: legacy_auth.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: jwt-runtime
|
||||||
|
items:
|
||||||
|
- key: legacy_auth.py
|
||||||
|
path:
|
||||||
|
_default: legacy_auth.py
|
||||||
13
apps/issues/nn-dev/jwt/legacy_auth.py
Normal file
13
apps/issues/nn-dev/jwt/legacy_auth.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
|
||||||
|
from rest_framework_simplejwt.tokens import AccessToken
|
||||||
|
|
||||||
|
from core.auth import JWTStatelessUserAuthentication as OriginalAuthentication
|
||||||
|
|
||||||
|
|
||||||
|
class VerifiedJWTStatelessUserAuthentication(OriginalAuthentication):
|
||||||
|
def get_validated_token(self, raw_token):
|
||||||
|
try:
|
||||||
|
AccessToken(raw_token, verify=True)
|
||||||
|
except TokenError:
|
||||||
|
raise InvalidToken("Invalid or expired access token") from None
|
||||||
|
return super().get_validated_token(raw_token)
|
||||||
27
apps/issues/nn-dev/jwt/production.py
Normal file
27
apps/issues/nn-dev/jwt/production.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import os as _jwt_os
|
||||||
|
from pathlib import Path as _JwtPath
|
||||||
|
|
||||||
|
|
||||||
|
def _read_secret_file(path):
|
||||||
|
try:
|
||||||
|
return _JwtPath(path).read_text().strip()
|
||||||
|
except FileNotFoundError:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
_jwt_has_private = bool(_jwt_os.environ.get("JWT_PRIVATE_KEY"))
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ["JWT_PRIVATE_KEY"] = ""
|
||||||
|
with open("/jwt-config/original-production.py") as _jwt_source:
|
||||||
|
exec(compile(_jwt_source.read(), "/jwt-config/original-production.py", "exec"), globals())
|
||||||
|
if not _jwt_has_private:
|
||||||
|
_jwt_os.environ.pop("JWT_PRIVATE_KEY", None)
|
||||||
|
SIMPLE_JWT["SIGNING_KEY"] = ""
|
||||||
|
if _jwt_os.environ.get("JWT_SIGNER_MODE") == "server":
|
||||||
|
ROOT_URLCONF = "config.jwt_signer_urls"
|
||||||
|
del _jwt_has_private, _jwt_source
|
||||||
|
|
||||||
|
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"] = [
|
||||||
|
"config.jwt_legacy_auth.VerifiedJWTStatelessUserAuthentication"
|
||||||
|
if name == "core.auth.JWTStatelessUserAuthentication" else name
|
||||||
|
for name in REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"]
|
||||||
|
]
|
||||||
135
apps/issues/nn-dev/kustomization.yaml
Normal file
135
apps/issues/nn-dev/kustomization.yaml
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches:
|
||||||
|
- path: jwt-access.yaml
|
||||||
|
- path: backend.yaml
|
||||||
|
- path: celery.yaml
|
||||||
|
configMapGenerator:
|
||||||
|
- name: jwt-runtime
|
||||||
|
namespace: issues
|
||||||
|
files:
|
||||||
|
- production.py=jwt/production.py
|
||||||
|
- legacy_auth.py=jwt/legacy_auth.py
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
- name: issues-contour-env
|
||||||
|
literals:
|
||||||
|
- AERO_PUBLIC_HOST=https://${HOST_PLATFORM}
|
||||||
|
- AERO_HOST=https://${HOST_PLATFORM}
|
||||||
|
- BASE_AERO_URL=http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- SAREX_API=http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- DOCUMENTATIONS_URL=http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- WORKFLOWS_HOST=http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- WORKFLOWS_URL=http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
options:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/local-config: "true"
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.AERO_PUBLIC_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=AERO_PUBLIC_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=AERO_PUBLIC_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.AERO_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=AERO_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=AERO_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.BASE_AERO_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=BASE_AERO_URL].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=BASE_AERO_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.SAREX_API
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=SAREX_API].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=SAREX_API].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.DOCUMENTATIONS_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=DOCUMENTATIONS_URL].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=DOCUMENTATIONS_URL].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.WORKFLOWS_HOST
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=WORKFLOWS_HOST].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=WORKFLOWS_HOST].value._default
|
||||||
|
- source:
|
||||||
|
kind: ConfigMap
|
||||||
|
name: issues-contour-env
|
||||||
|
fieldPath: data.WORKFLOWS_URL
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: backend
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.backend.envs.[name=WORKFLOWS_URL].value._default
|
||||||
|
- select:
|
||||||
|
kind: HelmRelease
|
||||||
|
name: celery
|
||||||
|
fieldPaths:
|
||||||
|
- spec.values.services.celery.envs.[name=WORKFLOWS_URL].value._default
|
||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/issues:production_bbb9d29a
|
_default: cr.yandex/crp3ccidau046kdj8g9q/issues:production_2b20944c
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/issues:production_bbb9d29a
|
_default: cr.yandex/crp3ccidau046kdj8g9q/issues:production_2b20944c
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/contour_issues-frontend:b56b9da1
|
_default: cr.yandex/crp3ccidau046kdj8g9q/contour_issues-frontend:a377d409
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user