diff --git a/.rmk-render/render.py b/.rmk-render/render.py new file mode 100644 index 0000000..be47658 --- /dev/null +++ b/.rmk-render/render.py @@ -0,0 +1,178 @@ +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() diff --git a/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-identity-env-vars.yaml b/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-identity-env-vars.yaml new file mode 100644 index 0000000..a0c18ba --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-identity-env-vars.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +data: + CAMUNDA_IDENTITY_BASEURL: http://camunda-identity:80 + CAMUNDA_IDENTITY_ISSUER: https://camunda-keycloak.stand.sarex.tech/auth/realms/camunda-platform + CAMUNDA_IDENTITY_ISSUER_BACKEND_URL: http://camunda-keycloak:80/auth/realms/camunda-platform + CAMUNDA_IDENTITY_TYPE: KEYCLOAK +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-camunda-contour-identity-env-vars diff --git a/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-release.yaml b/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-release.yaml new file mode 100644 index 0000000..7b55978 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-camunda-contour-release.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +data: + info: "- name: camunda\n namespace: camunda\n version: 11.0.14\n components:\n - name: Keycloak\n id: keycloak\n version: 25.0.6\n url: http://localhost:18080/auth\n - name: Identity\n id: identity\n version: 8.6.4\n url: http://localhost:8080\n readiness: http://camunda-identity.camunda:82/actuator/health\n metrics: http://camunda-identity.camunda:82/actuator/prometheus\n - name: Operate\n id: operate\n version: 8.6.5\n url: http://localhost:8081\n readiness: http://camunda-operate.camunda:9600/actuator/health/readiness\n metrics: http://camunda-operate.camunda:9600/actuator/prometheus\n - name: Optimize\n id: optimize\n version: 8.6.2\n url: http://localhost:8083\n readiness: http://camunda-optimize.camunda:80/api/readyz\n metrics: http://camunda-optimize.camunda:8092/actuator/prometheus\n - name: Tasklist\n id: tasklist\n version: 8.6.5\n url: http://localhost:8082\n readiness: http://camunda-tasklist.camunda:9600/actuator/health/readiness\n metrics: http://camunda-tasklist.camunda:9600/actuator/prometheus\n - name: Zeebe Gateway\n id: zeebeGateway\n version: 8.6.5\n urls:\n grpc: http://localhost:26500\n http: http://localhost:8088\n readiness: http://camunda-zeebe-gateway.camunda:9600/actuator/health/readiness\n metrics: http://camunda-zeebe-gateway.camunda:9600/actuator/prometheus\n - name: Zeebe\n id: zeebe\n version: 8.6.5\n readiness: http://camunda-zeebe.camunda:9600/actuator/health/readiness\n metrics: http://camunda-zeebe.camunda:9600/actuator/prometheus" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-camunda-contour-release diff --git a/rmk/infrastructure/camunda/configmap-camunda-connectors-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-connectors-configuration.yaml new file mode 100644 index 0000000..62467d6 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-connectors-configuration.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + application.yml: "server:\n port: 8080\ncamunda:\n operate:\n client:\n url: \"http://camunda-operate:80\"\n identity:\n audience: \"operate-api\"\n client-id: \"connectors\"\n\nzeebe:\n client:\n broker:\n gateway-address: \"camunda-zeebe-gateway:26500\"\n security:\n plaintext: true\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-connectors-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-identity-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-identity-configuration.yaml new file mode 100644 index 0000000..257642e --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-identity-configuration.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + application.yaml: "identity:\n url: \"https://camunda-identity.stand.sarex.tech\"\n flags:\n multi-tenancy: \"false\"\n\n authProvider:\n issuer-url: \"https://camunda-keycloak.stand.sarex.tech/auth/realms/camunda-platform\"\n backend-url: \"http://camunda-keycloak:80/auth/realms/camunda-platform\"\n\n component-presets:\n connectors:\n applications:\n - name: Connectors\n id: ${CAMUNDA_CONNECTORS_CLIENT_ID:${KEYCLOAK_INIT_CONNECTORS_CLIENT_ID:connectors}}\n type: m2m\n secret: ${CAMUNDA_CONNECTORS_SECRET:${KEYCLOAK_INIT_CONNECTORS_SECRET:}}\n permissions:\n - audience: \"operate-api\"\n definition: read:*\n console:\n applications:\n - name: \"Console\"\n id: ${CAMUNDA_CONSOLE_CLIENT_ID:${KEYCLOAK_INIT_CONSOLE_CLIENT_ID:console}}\n type: public\n root-url: \"http://localhost:8080\"\n redirect-uris:\n - \"/\"\n apis:\n - name: Console API\n audience: \"console-api\"\n permissions:\n - definition: write:*\n description: \"Write permission\"\n roles:\n - name: \"Console\"\n description: \"Grants full access to Console\"\n permissions:\n - audience: \"console-api\"\n definition: write:*\n identity:\n apis:\n - name: \"Camunda Identity Resource Server\"\n audience: \"camunda-identity-resource-server\"\n permissions:\n - definition: read\n description: \"Read permission\"\n - definition: \"read:users\"\n description: \"Read users permission\"\n - definition: write\n description: \"Write permission\"\n roles:\n - name: \"Identity\"\n description: \"Provides full access to Identity\"\n permissions:\n - audience: \"camunda-identity-resource-server\"\n definition: read\n - audience: \"camunda-identity-resource-server\"\n definition: write\n operate:\n applications:\n - name: Operate\n id: ${CAMUNDA_OPERATE_CLIENT_ID:${KEYCLOAK_INIT_OPERATE_CLIENT_ID:operate}}\n type: confidential\n secret: ${CAMUNDA_OPERATE_SECRET:${KEYCLOAK_INIT_OPERATE_SECRET:}}\n root-url: \"https://camunda-operate.stand.sarex.tech\"\n redirect-uris:\n - \"/identity-callback\"\n apis:\n - name: Operate API\n audience: \"operate-api\"\n permissions:\n - definition: read:*\n description: \"Read permission\"\n - definition: write:*\n description: \"Write permission\"\n roles:\n - name: \"Operate\"\n description: \"Grants full access to Operate\"\n permissions:\n - audience: \"operate-api\"\n definition: read:*\n - audience: \"operate-api\"\n definition: write:*\n optimize:\n applications:\n - name: Optimize\n id: ${CAMUNDA_OPTIMIZE_CLIENT_ID:${KEYCLOAK_INIT_OPTIMIZE_CLIENT_ID:optimize}}\n type: confidential\n secret: ${CAMUNDA_OPTIMIZE_SECRET:${KEYCLOAK_INIT_OPTIMIZE_SECRET:}}\n root-url: \"https://camunda-optimize.stand.sarex.tech\"\n redirect-uris:\n - \"/api/authentication/callback\"\n apis:\n - name: Optimize API\n audience: \"optimize-api\"\n permissions:\n - definition: write:*\n description: \"Write permission\"\n roles:\n - name: \"Optimize\"\n description: \"Grants full access to Optimize\"\n permissions:\n - audience: \"optimize-api\"\n definition: write:*\n - audience: \"camunda-identity-resource-server\"\n definition: read:users\n tasklist:\n applications:\n - name: Tasklist\n id: ${CAMUNDA_TASKLIST_CLIENT_ID:${KEYCLOAK_INIT_TASKLIST_CLIENT_ID:tasklist}}\n\ + \ type: confidential\n secret: ${CAMUNDA_TASKLIST_SECRET:${KEYCLOAK_INIT_TASKLIST_SECRET:}}\n root-url: \"https://camunda-tasklist.stand.sarex.tech\"\n redirect-uris:\n - \"/identity-callback\"\n apis:\n - name: Tasklist API\n audience: \"tasklist-api\"\n permissions:\n - definition: read:*\n description: \"Read permission\"\n - definition: write:*\n description: \"Write permission\"\n roles:\n - name: \"Tasklist\"\n description: \"Grants full access to Tasklist\"\n permissions:\n - audience: \"tasklist-api\"\n definition: read:*\n - audience: \"tasklist-api\"\n definition: write:*\n webmodeler:\n applications:\n - name: \"Web Modeler\"\n id: ${CAMUNDA_WEBMODELER_CLIENT_ID:${KEYCLOAK_INIT_WEBMODELER_CLIENT_ID:web-modeler}}\n type: public\n root-url: \"http://localhost:8084\"\n redirect-uris:\n - \"/login-callback\"\n apis:\n - name: Web Modeler Internal API\n audience: \"web-modeler-api\"\n permissions:\n - definition: write:*\n description: \"Write permission\"\n - definition: admin:*\n description: \"Admin permission\"\n - name: Web Modeler API\n audience: \"web-modeler-public-api\"\n permissions:\n - definition: create:*\n description: \"Allows create access for all resources\"\n - definition: read:*\n description: \"Allows read access to all resources\"\n - definition: update:*\n description: \"Allows update access to all resources\"\n - definition: delete:*\n description: \"Allows delete access for all resources\"\n roles:\n - name: \"Web Modeler\"\n description: \"Grants full access to Web Modeler\"\n permissions:\n - audience: \"web-modeler-api\"\n definition: write:*\n - audience: \"camunda-identity-resource-server\"\n definition: read:users\n - name: \"Web Modeler Admin\"\n description: \"Grants elevated access to Web Modeler\"\n permissions:\n - audience: \"camunda-identity-resource-server\"\n definition: read:users\n - audience: \"web-modeler-api\"\n definition: write:*\n - audience: \"web-modeler-api\"\n definition: admin:*\n zeebe:\n apis:\n - name: Zeebe API\n audience: \"zeebe-api\"\n permissions:\n - definition: write:*\n description: \"Write permission\"\n roles:\n - name: \"Zeebe\"\n description: \"Grants full access to the Zeebe API\"\n permissions:\n - audience: \"zeebe-api\"\n definition: write:*\nkeycloak:\n environment:\n clients:\n - name: Identity\n id: \"camunda-identity\"\n type: CONFIDENTIAL\n secret: ${CAMUNDA_IDENTITY_CLIENT_SECRET:}\n root-url: \"https://camunda-identity.stand.sarex.tech\"\n redirect-uris:\n - \"/auth/login-callback\"\n # The presets key should be removed when 8.6.0 of the applications are released\n presets:\n tasklist:\n clients:\n - name: Tasklist\n id: tasklist\n type: confidential\n secret: ${KEYCLOAK_INIT_TASKLIST_SECRET:}\n root-url: \"https://camunda-tasklist.stand.sarex.tech\"\n redirect-uris:\n - \"/identity-callback\"\n operate:\n clients:\n - name: Operate\n id: ${KEYCLOAK_INIT_OPERATE_CLIENT_ID:operate}\n type: confidential\n secret: ${KEYCLOAK_INIT_OPERATE_SECRET:}\n root-url: \"https://camunda-operate.stand.sarex.tech\"\n redirect-uris:\n - \"/identity-callback\"\n optimize:\n clients:\n \ + \ - name: Optimize\n id: ${KEYCLOAK_INIT_OPTIMIZE_CLIENT_ID:optimize}\n type: confidential\n secret: ${KEYCLOAK_INIT_OPTIMIZE_SECRET:}\n root-url: \"https://camunda-optimize.stand.sarex.tech\"\n redirect-uris:\n - \"/api/authentication/callback\"\n console:\n clients:\n - name: \"Console\"\n id: ${KEYCLOAK_INIT_CONSOLE_CLIENT_ID:console}\n type: public\n root-url: \"http://localhost:8080\"\n redirect-uris:\n - \"/\"\nserver:\n port: 8080\n\nspring:\n profiles:\n active: keycloak\n datasource:\n url: \"jdbc:postgresql://postgres.local.example.com:5432/identity\"\n username: \"identity\"\n\ncamunda:\n identity:\n audience: \"camunda-identity-resource-server\"\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-identity-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-keycloak-env-vars.yaml b/rmk/infrastructure/camunda/configmap-camunda-keycloak-env-vars.yaml new file mode 100644 index 0000000..40306cd --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-keycloak-env-vars.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +data: + JAVA_OPTS_APPEND: -Djgroups.dns.query=camunda-keycloak-headless.camunda.svc.cluster.local + KEYCLOAK_ADMIN: admin + KEYCLOAK_CACHE_STACK: kubernetes + KEYCLOAK_CACHE_TYPE: ispn + KEYCLOAK_DATABASE_HOST: postgres.local.example.com + KEYCLOAK_DATABASE_NAME: bitnami_keycloak + KEYCLOAK_DATABASE_PORT: '5432' + KEYCLOAK_DATABASE_USER: bn_keycloak + KEYCLOAK_ENABLE_HTTPS: 'false' + KEYCLOAK_ENABLE_STATISTICS: 'false' + KEYCLOAK_HTTP_PORT: '8080' + KEYCLOAK_LOG_LEVEL: INFO,org.keycloak.storage.ldap:debug + KEYCLOAK_LOG_OUTPUT: default + KEYCLOAK_PRODUCTION: 'false' + KEYCLOAK_PROXY_HEADERS: xforwarded +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak-env-vars + namespace: camunda diff --git a/rmk/infrastructure/camunda/configmap-camunda-operate-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-operate-configuration.yaml new file mode 100644 index 0000000..f2dd392 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-operate-configuration.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + application.yaml: "spring:\n profiles:\n active: \"identity-auth\"\n security:\n oauth2:\n resourceserver:\n jwt:\n issuer-uri: \"http://camunda-keycloak:80/auth/realms/camunda-platform\"\n jwk-set-uri: \"http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/certs\"\n\ncamunda:\n identity:\n clientId: \"operate\"\n audience: \"operate-api\"\n\n# Camunda Database configuration\ncamunda.database:\n type: elasticsearch\n # Cluster name\n clusterName: elasticsearch\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n\n# Operate configuration file\ncamunda.operate:\n identity:\n redirectRootUrl: \"https://camunda-operate.stand.sarex.tech\"\n\n # ELS instance to store Operate data\n elasticsearch:\n # Cluster name\n clusterName: elasticsearch\n # Host\n host: camunda-elasticsearch\n # Transport port\n port: 9200\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n # ELS instance to export Zeebe data to\n zeebeElasticsearch:\n # Cluster name\n clusterName: elasticsearch\n # Host\n host: camunda-elasticsearch\n # Transport port\n port: 9200\n # Index prefix, configured in Zeebe Elasticsearch exporter\n prefix: zeebe-record\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n # Zeebe instance\n zeebe:\n # Gateway address\n gatewayAddress: \"camunda-zeebe-gateway:26500\"\n archiver:\n ilmEnabled: true\n ilmMinAgeForDeleteArchivedIndices: 240d\nlogging:\n level:\n ROOT: INFO\n io.camunda.operate: INFO\n#Spring Boot Actuator endpoints to be exposed\nmanagement.endpoints.web.exposure.include: health,info,conditions,configprops,prometheus,loggers,usage-metrics,backups\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-operate-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-optimize-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-optimize-configuration.yaml new file mode 100644 index 0000000..0ff5fc6 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-optimize-configuration.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +data: + application-ccsm.yaml: "camunda:\n identity:\n clientId: \"optimize\"\n audience: \"optimize-api\"\n issuer: \"https://camunda-keycloak.stand.sarex.tech/auth/realms/camunda-platform\"\n issuerBackendUrl: \"http://camunda-keycloak:80/auth/realms/camunda-platform\"\n" + environment-config.yaml: "\nzeebe:\n enabled: true\n partitionCount: 3\n name: zeebe-record\nes:\n connection:\n nodes:\n - host: \"camunda-elasticsearch\"\n httpPort: 9200\n\nspring:\n profiles:\n active: \"ccsm\"\n\nsecurity:\n auth:\n cookie:\n same-site:\n enabled: false\n ccsm:\n redirectRootUrl: \"https://camunda-optimize.stand.sarex.tech\"\napi:\n audience: \"optimize-api\"\n jwtSetUri: \"http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/certs\"\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.2 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-optimize-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-tasklist-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-tasklist-configuration.yaml new file mode 100644 index 0000000..d55887e --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-tasklist-configuration.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + application.yaml: "spring:\n profiles:\n active: identity-auth\n security:\n oauth2:\n resourceserver:\n jwt:\n issuer-uri: \"http://camunda-keycloak:80/auth/realms/camunda-platform\"\n jwk-set-uri: \"http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/certs\"\n\ncamunda:\n identity:\n clientId: \"tasklist\"\n audience: \"tasklist-api\"\n\n# Camunda Database configuration\ncamunda.database:\n type: elasticsearch\n # Cluster name\n clusterName: elasticsearch\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n\n# Tasklist configuration file\ncamunda.tasklist:\n\n identity:\n redirectRootUrl: \"https://camunda-tasklist.stand.sarex.tech\"\n userAccessRestrictions:\n enabled: \"true\"\n\n # Set Tasklist username and password.\n # If user with does not exists it will be created.\n # Default: demo/demo\n #username:\n #password:\n # ELS instance to store Tasklist data\n elasticsearch:\n # Cluster name\n clusterName: elasticsearch\n # Host\n host: camunda-elasticsearch\n # Transport port\n port: 9200\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n # ELS instance to export Zeebe data to\n zeebeElasticsearch:\n # Cluster name\n clusterName: elasticsearch\n # Host\n host: camunda-elasticsearch\n # Transport port\n port: 9200\n # Index prefix, configured in Zeebe Elasticsearch exporter\n prefix: zeebe-record\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n # Zeebe instance\n zeebe:\n # Gateway address\n gatewayAddress: \"camunda-zeebe-gateway:26500\"\n restAddress: \"http://camunda-zeebe-gateway:8080\"\n archiver:\n ilmEnabled: true\n ilmMinAgeForDeleteArchivedIndices: 240d\n#Spring Boot Actuator endpoints to be exposed\nmanagement.endpoints.web.exposure.include: health,info,conditions,configprops,prometheus,loggers,usage-metrics,backups\n# Enable or disable metrics\n#management.metrics.export.prometheus.enabled: false\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-tasklist-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-zeebe-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-zeebe-configuration.yaml new file mode 100644 index 0000000..a2c1de3 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-zeebe-configuration.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + application.yaml: "zeebe:\n broker:\n exporters:\n elasticsearch:\n className: \"io.camunda.zeebe.exporter.ElasticsearchExporter\"\n args:\n url: \"http://camunda-elasticsearch:9200\"\n index:\n prefix: \"zeebe-record\"\n retention:\n enabled: true\n minimumAge: \"240d\"\n policyName: \"zeebe-record-retention-policy\"\n gateway:\n enable: true\n network:\n port: 26500\n security:\n enabled: false\n authentication:\n mode: none\n network:\n host: 0.0.0.0\n commandApi:\n port: 26501\n internalApi:\n port: 26502\n monitoringApi:\n port: \"9600\"\n cluster:\n clusterSize: \"1\"\n replicationFactor: \"1\"\n partitionsCount: \"1\"\n clusterName: camunda-zeebe\n threads:\n cpuThreadCount: \"3\"\n ioThreadCount: \"3\"\n\n# Camunda Database configuration\ncamunda.database:\n type: elasticsearch\n # Cluster name\n clusterName: elasticsearch\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n" + broker-log4j2.xml: '' + startup.sh: "#!/usr/bin/env bash\nset -eux -o pipefail\nexport ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID:-$[${K8S_NAME##*-} * 1 + 0]}\n\nif [ \"$(ls -A /exporters/)\" ]; then\n mkdir -p /usr/local/zeebe/exporters/\n cp -a /exporters/*.jar /usr/local/zeebe/exporters/\nelse\n echo \"No exporters available.\"\nfi\nexec /usr/local/zeebe/bin/broker\n" +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe-configuration diff --git a/rmk/infrastructure/camunda/configmap-camunda-zeebe-gateway-configuration.yaml b/rmk/infrastructure/camunda/configmap-camunda-zeebe-gateway-configuration.yaml new file mode 100644 index 0000000..6020e71 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-camunda-zeebe-gateway-configuration.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +data: + application.yaml: "spring:\n profiles:\n active: \"identity-auth\"\n\n# Camunda Database configuration\ncamunda.database:\n type: elasticsearch\n # Cluster name\n clusterName: elasticsearch\n # Elasticsearch full url\n url: \"http://camunda-elasticsearch:9200\"\n\nserver:\n address: \"0.0.0.0\"\n port: \"8080\"\ncamunda:\n identity:\n type: \"KEYCLOAK\"\n issuerBackendUrl: \"http://camunda-keycloak:80/auth/realms/camunda-platform\"\n audience: \"zeebe-api\"\n baseUrl: \"http://camunda-identity:80\"\nzeebe:\n gateway:\n security:\n authentication:\n mode: identity\n monitoring:\n host: 0.0.0.0\n port: \"9600\"\n cluster:\n clusterName: camunda-zeebe\n port: \"26502\"\n network:\n host: 0.0.0.0\n port: \"26500\"\n" + gateway-log4j2.xml: '' +kind: ConfigMap +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe-gateway-configuration diff --git a/rmk/infrastructure/camunda/configmap-corporate-ca.yaml b/rmk/infrastructure/camunda/configmap-corporate-ca.yaml new file mode 100644 index 0000000..241eebb --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-corporate-ca.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: corporate-ca + namespace: camunda +data: + corporate-ca.crt: '# REPLACE: corporate root CA certificate in PEM format + + ' diff --git a/rmk/infrastructure/camunda/configmap-keycloak-krb5.yaml b/rmk/infrastructure/camunda/configmap-keycloak-krb5.yaml new file mode 100644 index 0000000..19bfc93 --- /dev/null +++ b/rmk/infrastructure/camunda/configmap-keycloak-krb5.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: keycloak-krb5 + namespace: camunda +data: + krb5.conf: "[libdefaults]\n default_realm = LOCAL.EXAMPLE.COM\n dns_lookup_kdc = false\n dns_lookup_realm = false\n rdns = false\n default_tkt_enctypes = aes256-cts-hmac-sha1-96\n default_tgs_enctypes = aes256-cts-hmac-sha1-96\n permitted_enctypes = aes256-cts-hmac-sha1-96\n\n[realms]\n LOCAL.EXAMPLE.COM = {\n kdc = dc1.local.example.com\n admin_server = dc1.local.example.com\n }\n\n[domain_realm]\n .local.example.com = LOCAL.EXAMPLE.COM\n local.example.com = LOCAL.EXAMPLE.COM\n" diff --git a/rmk/infrastructure/camunda/deployment-camunda-connectors.yaml b/rmk/infrastructure/camunda/deployment-camunda-connectors.yaml new file mode 100644 index 0000000..bb8e480 --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-connectors.yaml @@ -0,0 +1,137 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-connectors +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 3fc87851e67a7bfbd35b3dc1d63ad4f499c66b301c0ccd05e8c72af0649242e6 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-CAMUNDA_IDENTITY_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-ZEEBE_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-CAMUNDA_IDENTITY_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "connectors-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-ZEEBE_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "zeebe-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + spec: + containers: + - command: + - /bin/sh + - -ec + - "\n\nif [ -f \"/vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/camunda_identity_client_secret\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/camunda_identity_client_secret)\"\nfi\nif [ -f \"/vault/secrets/ZEEBE_CLIENT_SECRET\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/ZEEBE_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/zeebe_client_secret\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/zeebe_client_secret)\"\nfi\n exec '/start.sh'\n" + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: ZEEBE_CLIENT_ID + value: zeebe + - name: ZEEBE_AUTHORIZATION_SERVER_URL + value: http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/token + - name: ZEEBE_TOKEN_AUDIENCE + value: zeebe-api + envFrom: + - configMapRef: + name: camunda-camunda-contour-identity-env-vars + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/connectors-bundle:8.6.4 + imagePullPolicy: IfNotPresent + name: connectors + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health/readiness + port: http + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /config/application.yml + name: config + subPath: application.yml + imagePullSecrets: + - name: regcred + initContainers: [] + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-connectors + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: tmp + - configMap: + name: camunda-connectors-configuration + name: config diff --git a/rmk/infrastructure/camunda/deployment-camunda-identity.yaml b/rmk/infrastructure/camunda/deployment-camunda-identity.yaml new file mode 100644 index 0000000..116d4ce --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-identity.yaml @@ -0,0 +1,226 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-identity +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 7d868b655864efe4e322bab146d9b48dae782b955a282bf13d7fc8f9b719db4a + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-IDENTITY_DATABASE_PASSWORD: secrets/data/camunda/postgresql + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_CLIENTS_0_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_CLIENTS_1_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_INIT_CONSOLE_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_INIT_OPERATE_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_INIT_OPTIMIZE_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_INIT_TASKLIST_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_SETUP_PASSWORD: secrets/data/camunda/keycloak-admin + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_USERS_0_PASSWORD: secrets/data/camunda/identity-firstuser + vault.hashicorp.com/agent-inject-template-IDENTITY_DATABASE_PASSWORD: '{{- with secret "secrets/data/camunda/postgresql" -}} + + {{ index .Data.data "password" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_CLIENTS_0_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "connectors-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_CLIENTS_1_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "zeebe-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_INIT_CONSOLE_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "console-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_INIT_OPERATE_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "operate-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_INIT_OPTIMIZE_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "optimize-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_INIT_TASKLIST_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "tasklist-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_SETUP_PASSWORD: '{{- with secret "secrets/data/camunda/keycloak-admin" -}} + + {{ index .Data.data "admin-password" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_USERS_0_PASSWORD: '{{- with secret "secrets/data/camunda/identity-firstuser" -}} + + {{ index .Data.data "identity-firstuser-password" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + spec: + containers: + - command: + - /bin/sh + - -ec + - "\n\nif [ -f \"/vault/secrets/KEYCLOAK_INIT_OPERATE_SECRET\" ]; then\n export KEYCLOAK_INIT_OPERATE_SECRET=\"$(cat /vault/secrets/KEYCLOAK_INIT_OPERATE_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_init_operate_secret\" ]; then\n export KEYCLOAK_INIT_OPERATE_SECRET=\"$(cat /vault/secrets/keycloak_init_operate_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_INIT_CONSOLE_SECRET\" ]; then\n export KEYCLOAK_INIT_CONSOLE_SECRET=\"$(cat /vault/secrets/KEYCLOAK_INIT_CONSOLE_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_init_console_secret\" ]; then\n export KEYCLOAK_INIT_CONSOLE_SECRET=\"$(cat /vault/secrets/keycloak_init_console_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_INIT_TASKLIST_SECRET\" ]; then\n export KEYCLOAK_INIT_TASKLIST_SECRET=\"$(cat /vault/secrets/KEYCLOAK_INIT_TASKLIST_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_init_tasklist_secret\" ]; then\n export KEYCLOAK_INIT_TASKLIST_SECRET=\"$(cat /vault/secrets/keycloak_init_tasklist_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_INIT_OPTIMIZE_SECRET\" ]; then\n export KEYCLOAK_INIT_OPTIMIZE_SECRET=\"$(cat /vault/secrets/KEYCLOAK_INIT_OPTIMIZE_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_init_optimize_secret\" ]; then\n export KEYCLOAK_INIT_OPTIMIZE_SECRET=\"$(cat /vault/secrets/keycloak_init_optimize_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_CLIENTS_0_SECRET\" ]; then\n export KEYCLOAK_CLIENTS_0_SECRET=\"$(cat /vault/secrets/KEYCLOAK_CLIENTS_0_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_clients_0_secret\" ]; then\n export KEYCLOAK_CLIENTS_0_SECRET=\"$(cat /vault/secrets/keycloak_clients_0_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_CLIENTS_1_SECRET\" ]; then\n export KEYCLOAK_CLIENTS_1_SECRET=\"$(cat /vault/secrets/KEYCLOAK_CLIENTS_1_SECRET)\"\nelif [ -f \"/vault/secrets/keycloak_clients_1_secret\" ]; then\n export KEYCLOAK_CLIENTS_1_SECRET=\"$(cat /vault/secrets/keycloak_clients_1_secret)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_SETUP_PASSWORD\" ]; then\n export KEYCLOAK_SETUP_PASSWORD=\"$(cat /vault/secrets/KEYCLOAK_SETUP_PASSWORD)\"\nelif [ -f \"/vault/secrets/keycloak_setup_password\" ]; then\n export KEYCLOAK_SETUP_PASSWORD=\"$(cat /vault/secrets/keycloak_setup_password)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_USERS_0_PASSWORD\" ]; then\n export KEYCLOAK_USERS_0_PASSWORD=\"$(cat /vault/secrets/KEYCLOAK_USERS_0_PASSWORD)\"\nelif [ -f \"/vault/secrets/keycloak_users_0_password\" ]; then\n export KEYCLOAK_USERS_0_PASSWORD=\"$(cat /vault/secrets/keycloak_users_0_password)\"\nfi\nif [ -f \"/vault/secrets/IDENTITY_DATABASE_PASSWORD\" ]; then\n export IDENTITY_DATABASE_PASSWORD=\"$(cat /vault/secrets/IDENTITY_DATABASE_PASSWORD)\"\nelif [ -f \"/vault/secrets/identity_database_password\" ]; then\n export IDENTITY_DATABASE_PASSWORD=\"$(cat /vault/secrets/identity_database_password)\"\nfi\n exec 'java' '-jar' 'identity.jar'\n" + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: KEYCLOAK_INIT_WEBMODELER_ROOT_URL + value: http://localhost:8084 + - name: KEYCLOAK_INIT_ZEEBE_NAME + value: Zeebe + - name: KEYCLOAK_CLIENTS_0_NAME + value: Connectors + - name: KEYCLOAK_CLIENTS_0_ID + value: connectors + - name: KEYCLOAK_CLIENTS_0_ROOT_URL + value: http://placeholder + - name: KEYCLOAK_CLIENTS_0_REDIRECT_URIS_0 + value: / + - name: KEYCLOAK_CLIENTS_0_PERMISSIONS_0_RESOURCE_SERVER_ID + value: operate-api + - name: KEYCLOAK_CLIENTS_0_PERMISSIONS_0_DEFINITION + value: read:* + - name: KEYCLOAK_CLIENTS_1_NAME + value: Zeebe + - name: KEYCLOAK_CLIENTS_1_ID + value: zeebe + - name: KEYCLOAK_CLIENTS_1_TYPE + value: M2M + - name: KEYCLOAK_CLIENTS_1_PERMISSIONS_0_RESOURCE_SERVER_ID + value: zeebe-api + - name: KEYCLOAK_CLIENTS_1_PERMISSIONS_0_DEFINITION + value: write:* + - name: KEYCLOAK_URL + value: http://camunda-keycloak:80/auth + - name: KEYCLOAK_SETUP_USER + value: admin + - name: KEYCLOAK_USERS_0_USERNAME + value: sarex + - name: KEYCLOAK_USERS_0_EMAIL + value: camunda@sarex.io + - name: KEYCLOAK_USERS_0_FIRST_NAME + value: Sarex + - name: KEYCLOAK_USERS_0_LAST_NAME + value: LLC + - name: KEYCLOAK_USERS_0_ROLES_0 + value: Identity + - name: KEYCLOAK_USERS_0_ROLES_1 + value: Operate + - name: KEYCLOAK_USERS_0_ROLES_2 + value: Tasklist + - name: KEYCLOAK_USERS_0_ROLES_3 + value: Optimize + - name: KEYCLOAK_USERS_0_ROLES_4 + value: Web Modeler + - name: KEYCLOAK_USERS_0_ROLES_5 + value: Web Modeler Admin + - name: KEYCLOAK_USERS_0_ROLES_6 + value: Console + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/identity:8.6.4 + imagePullPolicy: IfNotPresent + name: camunda-contour + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 8082 + name: metrics + protocol: TCP + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health + port: metrics + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 400Mi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /app/config/application.yaml + name: config + subPath: application.yaml + imagePullSecrets: + - name: regcred + initContainers: [] + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-identity + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: tmp + - configMap: + name: camunda-identity-configuration + name: config diff --git a/rmk/infrastructure/camunda/deployment-camunda-operate.yaml b/rmk/infrastructure/camunda/deployment-camunda-operate.yaml new file mode 100644 index 0000000..148a2f5 --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-operate.yaml @@ -0,0 +1,195 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-operate +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/config: 6e0ffe489419a1159fe8d2387792cc4cdcb5d94733aa836e187dfb419f1af88d + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-CAMUNDA_IDENTITY_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-ZEEBE_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-CAMUNDA_IDENTITY_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "operate-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-ZEEBE_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "zeebe-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + spec: + containers: + - command: + - /bin/sh + - -ec + - "\n\nif [ -f \"/vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/camunda_identity_client_secret\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/camunda_identity_client_secret)\"\nfi\nif [ -f \"/vault/secrets/ZEEBE_CLIENT_SECRET\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/ZEEBE_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/zeebe_client_secret\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/zeebe_client_secret)\"\nfi\n exec '/sbin/tini' '--' '/usr/local/operate/bin/operate'\n" + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: ZEEBE_CLIENT_ID + value: zeebe + - name: ZEEBE_AUTHORIZATION_SERVER_URL + value: http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/token + - name: ZEEBE_TOKEN_AUDIENCE + value: zeebe-api + - name: ZEEBE_CLIENT_CONFIG_PATH + value: /tmp/zeebe_auth_cache + - name: ZEEBE_GATEWAY_CLUSTER_HOST + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: ZEEBE_GATEWAY_CLUSTER_MEMBERID + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: ZEEBE_GATEWAY_CLUSTER_CLUSTERNAME + value: camunda-zeebe + - name: ZEEBE_GATEWAY_CLUSTER_PORT + value: '26502' + - name: ZEEBE_GATEWAY_CLUSTER_INITIALCONTACTPOINTS + value: camunda-zeebe:26502 + envFrom: + - configMapRef: + name: camunda-camunda-contour-identity-env-vars + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/operate:8.6.5 + imagePullPolicy: IfNotPresent + name: operate + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9600 + name: management + - containerPort: 26502 + name: internal + protocol: TCP + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health/readiness + port: management + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 400Mi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /usr/local/operate/config/application.yaml + name: config + subPath: application.yaml + - mountPath: /tmp + name: tmp + - mountPath: /camunda + name: camunda + imagePullSecrets: + - name: regcred + initContainers: + - command: + - /bin/sh + - /usr/local/operate/bin/migrate + env: null + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/operate:8.6.5 + name: migration + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /usr/local/operate/config/application.yaml + name: config + subPath: application.yaml + - mountPath: /tmp + name: tmp + - mountPath: /camunda + name: camunda + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-operate + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - configMap: + defaultMode: 484 + name: camunda-operate-configuration + name: config + - emptyDir: {} + name: tmp + - emptyDir: {} + name: camunda diff --git a/rmk/infrastructure/camunda/deployment-camunda-optimize.yaml b/rmk/infrastructure/camunda/deployment-camunda-optimize.yaml new file mode 100644 index 0000000..f82db56 --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-optimize.yaml @@ -0,0 +1,184 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.2 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-optimize +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/config: fd69979d256b53dfe55bc903d3905582eed9e59ced7f7a947ca1524066905a60 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-CAMUNDA_IDENTITY_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-CAMUNDA_IDENTITY_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "optimize-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.2 + helm.sh/chart: camunda-contour-11.0.14 + spec: + containers: + - command: + - /bin/sh + - -ec + - "\n\nif [ -f \"/vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/camunda_identity_client_secret\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/camunda_identity_client_secret)\"\nfi\n exec '/sbin/tini' '--' './optimize.sh'\n" + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: OPTIMIZE_ELASTICSEARCH_HOST + value: camunda-elasticsearch + - name: OPTIMIZE_ELASTICSEARCH_HTTP_PORT + value: '9200' + - name: SPRING_PROFILES_ACTIVE + value: ccsm + envFrom: + - configMapRef: + name: camunda-camunda-contour-identity-env-vars + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/optimize:8.6.2 + imagePullPolicy: IfNotPresent + name: optimize + ports: + - containerPort: 8090 + name: http + protocol: TCP + - containerPort: 8092 + name: management + protocol: TCP + readinessProbe: + failureThreshold: 5 + httpGet: + path: /api/readyz + port: http + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /camunda + name: camunda + - mountPath: /optimize/config/environment-config.yaml + name: environment-config + subPath: environment-config.yaml + - mountPath: /optimize/config/application-ccsm.yaml + name: environment-config + subPath: application-ccsm.yaml + imagePullSecrets: + - name: regcred + initContainers: + - command: + - ./upgrade/upgrade.sh + - --skip-warning + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: OPTIMIZE_ELASTICSEARCH_HOST + value: camunda-elasticsearch + - name: OPTIMIZE_ELASTICSEARCH_HTTP_PORT + value: '9200' + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/optimize:8.6.2 + name: migration + resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 600m + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /camunda + name: camunda + - mountPath: /optimize/config/environment-config.yaml + name: environment-config + subPath: environment-config.yaml + - mountPath: /optimize/config/application-ccsm.yaml + name: environment-config + subPath: application-ccsm.yaml + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-optimize + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: tmp + - emptyDir: {} + name: camunda + - configMap: + defaultMode: 492 + name: camunda-optimize-configuration + name: environment-config diff --git a/rmk/infrastructure/camunda/deployment-camunda-tasklist.yaml b/rmk/infrastructure/camunda/deployment-camunda-tasklist.yaml new file mode 100644 index 0000000..f77c006 --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-tasklist.yaml @@ -0,0 +1,168 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-tasklist +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/config: 891491d3233b297242a5a7c8b168bc96ef6619ead43b5211a54d9a48dd8bd197 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-CAMUNDA_IDENTITY_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-secret-ZEEBE_CLIENT_SECRET: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-CAMUNDA_IDENTITY_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "tasklist-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-ZEEBE_CLIENT_SECRET: '{{- with secret "secrets/data/camunda/identity-components" -}} + + {{ index .Data.data "zeebe-secret" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + spec: + containers: + - command: + - /bin/sh + - -ec + - "\n\nif [ -f \"/vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/CAMUNDA_IDENTITY_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/camunda_identity_client_secret\" ]; then\n export CAMUNDA_IDENTITY_CLIENT_SECRET=\"$(cat /vault/secrets/camunda_identity_client_secret)\"\nfi\nif [ -f \"/vault/secrets/ZEEBE_CLIENT_SECRET\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/ZEEBE_CLIENT_SECRET)\"\nelif [ -f \"/vault/secrets/zeebe_client_secret\" ]; then\n export ZEEBE_CLIENT_SECRET=\"$(cat /vault/secrets/zeebe_client_secret)\"\nfi\n exec '/sbin/tini' '--' '/usr/local/tasklist/bin/tasklist'\n" + env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: ZEEBE_CLIENT_ID + value: zeebe + - name: ZEEBE_AUTHORIZATION_SERVER_URL + value: http://camunda-keycloak:80/auth/realms/camunda-platform/protocol/openid-connect/token + - name: ZEEBE_TOKEN_AUDIENCE + value: zeebe-api + - name: HOME + value: /parent + - name: ZEEBE_CLIENT_CONFIG_PATH + value: /tmp/zeebe_auth_cache + - name: ZEEBE_GATEWAY_CLUSTER_HOST + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: ZEEBE_GATEWAY_CLUSTER_MEMBERID + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: ZEEBE_GATEWAY_CLUSTER_CLUSTERNAME + value: camunda-zeebe + - name: ZEEBE_GATEWAY_CLUSTER_PORT + value: '26502' + - name: ZEEBE_GATEWAY_CLUSTER_INITIALCONTACTPOINTS + value: camunda-zeebe:26502 + envFrom: + - configMapRef: + name: camunda-camunda-contour-identity-env-vars + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/tasklist:8.6.5 + imagePullPolicy: IfNotPresent + name: tasklist + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9600 + name: management + - containerPort: 26502 + name: internal + protocol: TCP + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health/readiness + port: management + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: + cpu: 1000m + memory: 2Gi + requests: + cpu: 400m + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /usr/local/tasklist/config/application.yaml + name: config + subPath: application.yaml + - mountPath: /tmp + name: tmp + - mountPath: /camunda + name: camunda + imagePullSecrets: + - name: regcred + initContainers: [] + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-tasklist + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - configMap: + defaultMode: 484 + name: camunda-tasklist-configuration + name: config + - emptyDir: {} + name: tmp + - emptyDir: {} + name: camunda diff --git a/rmk/infrastructure/camunda/deployment-camunda-zeebe-gateway.yaml b/rmk/infrastructure/camunda/deployment-camunda-zeebe-gateway.yaml new file mode 100644 index 0000000..993becc --- /dev/null +++ b/rmk/infrastructure/camunda/deployment-camunda-zeebe-gateway.yaml @@ -0,0 +1,139 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + strategy: + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 64caf0fd8c28e8cbfa139acebd13b47c60a3c600613e007bdcc456017e0550eb + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/component + operator: In + values: + - zeebe-gateway + topologyKey: kubernetes.io/hostname + containers: + - env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: ZEEBE_STANDALONE_GATEWAY + value: 'true' + - name: ZEEBE_GATEWAY_CLUSTER_MEMBERID + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: ZEEBE_LOG_LEVEL + value: info + - name: JAVA_TOOL_OPTIONS + value: -XX:+ExitOnOutOfMemoryError + - name: ZEEBE_GATEWAY_CLUSTER_INITIALCONTACTPOINTS + value: camunda-zeebe:26502 + - name: ZEEBE_GATEWAY_CLUSTER_HOST + valueFrom: + fieldRef: + fieldPath: status.podIP + envFrom: null + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/zeebe:8.6.5 + imagePullPolicy: IfNotPresent + name: zeebe-gateway + ports: + - containerPort: 9600 + name: http + - containerPort: 26500 + name: gateway + - containerPort: 26502 + name: internal + - containerPort: 8080 + name: rest + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health/readiness + port: 9600 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 400m + memory: 450Mi + requests: + cpu: 400m + memory: 450Mi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /usr/local/zeebe/config/application.yaml + name: config + subPath: application.yaml + imagePullSecrets: + - name: regcred + initContainers: [] + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-zeebe-gateway + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: tmp + - configMap: + defaultMode: 484 + name: camunda-zeebe-gateway-configuration + name: config diff --git a/rmk/infrastructure/camunda/namespace-camunda.yaml b/rmk/infrastructure/camunda/namespace-camunda.yaml new file mode 100644 index 0000000..5029883 --- /dev/null +++ b/rmk/infrastructure/camunda/namespace-camunda.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: camunda + labels: + istio-injection: enabled diff --git a/rmk/infrastructure/camunda/networkpolicy-camunda-elasticsearch-master.yaml b/rmk/infrastructure/camunda/networkpolicy-camunda-elasticsearch-master.yaml new file mode 100644 index 0000000..25a6b14 --- /dev/null +++ b/rmk/infrastructure/camunda/networkpolicy-camunda-elasticsearch-master.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch-master + namespace: camunda +spec: + egress: + - {} + ingress: + - ports: + - port: 9200 + - port: 9300 + podSelector: + matchLabels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch + policyTypes: + - Ingress + - Egress diff --git a/rmk/infrastructure/camunda/networkpolicy-camunda-keycloak.yaml b/rmk/infrastructure/camunda/networkpolicy-camunda-keycloak.yaml new file mode 100644 index 0000000..519ab9a --- /dev/null +++ b/rmk/infrastructure/camunda/networkpolicy-camunda-keycloak.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak + namespace: camunda +spec: + egress: + - {} + ingress: + - ports: + - port: 7800 + - port: 8080 + podSelector: + matchLabels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak + policyTypes: + - Ingress + - Egress diff --git a/rmk/infrastructure/camunda/pod-camunda-identity-test-connection.yaml b/rmk/infrastructure/camunda/pod-camunda-identity-test-connection.yaml new file mode 100644 index 0000000..795af2e --- /dev/null +++ b/rmk/infrastructure/camunda/pod-camunda-identity-test-connection.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + helm.sh/hook: test-success + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-identity-test-connection +spec: + containers: + - args: + - camunda-identity:80 + command: + - wget + image: busybox + name: wget + restartPolicy: Never diff --git a/rmk/infrastructure/camunda/pod-camunda-operate-test-connection.yaml b/rmk/infrastructure/camunda/pod-camunda-operate-test-connection.yaml new file mode 100644 index 0000000..c3967e6 --- /dev/null +++ b/rmk/infrastructure/camunda/pod-camunda-operate-test-connection.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + helm.sh/hook: test-success + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-operate-test-connection +spec: + containers: + - args: + - camunda-operate:80 + command: + - wget + image: busybox + name: wget + restartPolicy: Never diff --git a/rmk/infrastructure/camunda/poddisruptionbudget-camunda-elasticsearch-master.yaml b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-elasticsearch-master.yaml new file mode 100644 index 0000000..568b8b6 --- /dev/null +++ b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-elasticsearch-master.yaml @@ -0,0 +1,19 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch-master + namespace: camunda +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch diff --git a/rmk/infrastructure/camunda/poddisruptionbudget-camunda-keycloak.yaml b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-keycloak.yaml new file mode 100644 index 0000000..3b784bb --- /dev/null +++ b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-keycloak.yaml @@ -0,0 +1,19 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak + namespace: camunda +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak diff --git a/rmk/infrastructure/camunda/poddisruptionbudget-camunda-zeebe.yaml b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-zeebe.yaml new file mode 100644 index 0000000..10ee7a7 --- /dev/null +++ b/rmk/infrastructure/camunda/poddisruptionbudget-camunda-zeebe.yaml @@ -0,0 +1,23 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe +spec: + maxUnavailable: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform diff --git a/rmk/infrastructure/camunda/secret-camunda-camunda-contour-license.yaml b/rmk/infrastructure/camunda/secret-camunda-camunda-contour-license.yaml new file mode 100644 index 0000000..65049e1 --- /dev/null +++ b/rmk/infrastructure/camunda/secret-camunda-camunda-contour-license.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +data: + CAMUNDA_LICENSE_KEY: '' +kind: Secret +metadata: + labels: + app: camunda-platform + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-camunda-contour-license +type: Opaque diff --git a/rmk/infrastructure/camunda/service-camunda-connectors.yaml b/rmk/infrastructure/camunda/service-camunda-connectors.yaml new file mode 100644 index 0000000..d5b2640 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-connectors.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-connectors +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-elasticsearch-master-hl.yaml b/rmk/infrastructure/camunda/service-camunda-elasticsearch-master-hl.yaml new file mode 100644 index 0000000..47f9752 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-elasticsearch-master-hl.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch-master-hl + namespace: camunda +spec: + clusterIP: None + ports: + - name: tcp-rest-api + port: 9200 + targetPort: rest-api + - name: tcp-transport + port: 9300 + targetPort: transport + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-elasticsearch.yaml b/rmk/infrastructure/camunda/service-camunda-elasticsearch.yaml new file mode 100644 index 0000000..c284a12 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-elasticsearch.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch + namespace: camunda +spec: + ports: + - name: tcp-rest-api + nodePort: null + port: 9200 + targetPort: rest-api + - name: tcp-transport + nodePort: null + port: 9300 + selector: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch + sessionAffinity: None + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-identity.yaml b/rmk/infrastructure/camunda/service-camunda-identity.yaml new file mode 100644 index 0000000..a0452c0 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-identity.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-identity +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + - name: metrics + port: 82 + protocol: TCP + targetPort: 8082 + selector: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-keycloak-headless.yaml b/rmk/infrastructure/camunda/service-camunda-keycloak-headless.yaml new file mode 100644 index 0000000..a90dd51 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-keycloak-headless.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak-headless + namespace: camunda +spec: + clusterIP: None + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-keycloak.yaml b/rmk/infrastructure/camunda/service-camunda-keycloak.yaml new file mode 100644 index 0000000..dad6c51 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-keycloak.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak + namespace: camunda +spec: + ports: + - name: http + nodePort: null + port: 80 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak + sessionAffinity: None + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-operate.yaml b/rmk/infrastructure/camunda/service-camunda-operate.yaml new file mode 100644 index 0000000..44fcded --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-operate.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-operate +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + - name: management + port: 9600 + protocol: TCP + targetPort: 9600 + selector: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-optimize.yaml b/rmk/infrastructure/camunda/service-camunda-optimize.yaml new file mode 100644 index 0000000..2a6b6a5 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-optimize.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.2 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-optimize +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8090 + - name: management + port: 8092 + protocol: TCP + targetPort: 8092 + selector: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-tasklist.yaml b/rmk/infrastructure/camunda/service-camunda-tasklist.yaml new file mode 100644 index 0000000..6a3c093 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-tasklist.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-tasklist +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + - name: management + port: 9600 + protocol: TCP + targetPort: 9600 + selector: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-zeebe-gateway.yaml b/rmk/infrastructure/camunda/service-camunda-zeebe-gateway.yaml new file mode 100644 index 0000000..21c898b --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-zeebe-gateway.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe-gateway +spec: + ports: + - name: http + port: 9600 + protocol: TCP + - name: gateway + port: 26500 + protocol: TCP + - name: rest + port: 8080 + protocol: TCP + selector: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/service-camunda-zeebe.yaml b/rmk/infrastructure/camunda/service-camunda-zeebe.yaml new file mode 100644 index 0000000..c111561 --- /dev/null +++ b/rmk/infrastructure/camunda/service-camunda-zeebe.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe +spec: + clusterIP: None + ports: + - name: http + port: 9600 + protocol: TCP + - name: internal + port: 26502 + protocol: TCP + - name: command + port: 26501 + protocol: TCP + publishNotReadyAddresses: true + selector: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + type: ClusterIP diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-connectors.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-connectors.yaml new file mode 100644 index 0000000..27b733b --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-connectors.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: connectors + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-connectors diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-elasticsearch-master.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-elasticsearch-master.yaml new file mode 100644 index 0000000..d5b0e9a --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-elasticsearch-master.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch-master + namespace: camunda diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-identity.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-identity.yaml new file mode 100644 index 0000000..87a3018 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-identity.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: identity + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.4 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-identity diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-keycloak.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-keycloak.yaml new file mode 100644 index 0000000..0986a25 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-keycloak.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak + namespace: camunda diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-operate.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-operate.yaml new file mode 100644 index 0000000..ca3ff98 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-operate.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: operate + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-operate diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-optimize.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-optimize.yaml new file mode 100644 index 0000000..a7cc192 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-optimize.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: optimize + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.2 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-optimize diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-tasklist.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-tasklist.yaml new file mode 100644 index 0000000..8afe776 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-tasklist.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: true +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: tasklist + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-tasklist diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe-gateway.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe-gateway.yaml new file mode 100644 index 0000000..d029937 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe-gateway.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-gateway + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe-gateway diff --git a/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe.yaml b/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe.yaml new file mode 100644 index 0000000..ba83752 --- /dev/null +++ b/rmk/infrastructure/camunda/serviceaccount-camunda-zeebe.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe diff --git a/rmk/infrastructure/camunda/statefulset-camunda-elasticsearch-master.yaml b/rmk/infrastructure/camunda/statefulset-camunda-elasticsearch-master.yaml new file mode 100644 index 0000000..9414331 --- /dev/null +++ b/rmk/infrastructure/camunda/statefulset-camunda-elasticsearch-master.yaml @@ -0,0 +1,218 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app: master + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + name: camunda-elasticsearch-master + namespace: camunda +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch + serviceName: camunda-elasticsearch-master-hl + template: + metadata: + annotations: null + labels: + app: master + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/version: 8.15.3 + helm.sh/chart: elasticsearch-21.3.23 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/component: master + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: elasticsearch + topologyKey: kubernetes.io/hostname + weight: 1 + automountServiceAccountToken: false + containers: + - env: + - name: BITNAMI_DEBUG + value: 'false' + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: ELASTICSEARCH_IS_DEDICATED_NODE + value: 'no' + - name: ELASTICSEARCH_NODE_ROLES + value: master + - name: ELASTICSEARCH_TRANSPORT_PORT_NUMBER + value: '9300' + - name: ELASTICSEARCH_HTTP_PORT_NUMBER + value: '9200' + - name: ELASTICSEARCH_CLUSTER_NAME + value: elastic + - name: ELASTICSEARCH_HEAP_SIZE + value: 128m + - name: ELASTICSEARCH_ENABLE_REST_TLS + value: 'false' + - name: ES_JAVA_OPTS + value: -Xms7g -Xmx7g + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/elasticsearch:8.15.3 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 5 + initialDelaySeconds: 180 + periodSeconds: 10 + successThreshold: 1 + tcpSocket: + port: rest-api + timeoutSeconds: 5 + name: elasticsearch + ports: + - containerPort: 9200 + name: rest-api + - containerPort: 9300 + name: transport + readinessProbe: + exec: + command: + - /opt/bitnami/scripts/elasticsearch/healthcheck.sh + failureThreshold: 5 + initialDelaySeconds: 90 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: {} + requests: + cpu: 1 + memory: 2Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: empty-dir + subPath: tmp-dir + - mountPath: /opt/bitnami/elasticsearch/config + name: empty-dir + subPath: app-conf-dir + - mountPath: /opt/bitnami/elasticsearch/tmp + name: empty-dir + subPath: app-tmp-dir + - mountPath: /opt/bitnami/elasticsearch/logs + name: empty-dir + subPath: app-logs-dir + - mountPath: /opt/bitnami/elasticsearch/plugins + name: empty-dir + subPath: app-plugins-dir + - mountPath: /bitnami/elasticsearch/data + name: data + imagePullSecrets: + - name: regcred + initContainers: + - command: + - /bin/bash + - -ec + - "CURRENT=`sysctl -n vm.max_map_count`;\nDESIRED=\"262144\";\nif [ \"$DESIRED\" -gt \"$CURRENT\" ]; then\n sysctl -w vm.max_map_count=262144;\nfi;\nCURRENT=`sysctl -n fs.file-max`;\nDESIRED=\"65536\";\nif [ \"$DESIRED\" -gt \"$CURRENT\" ]; then\n sysctl -w fs.file-max=65536;\nfi;\n" + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/os-shell:12-debian-12-r32 + imagePullPolicy: IfNotPresent + name: sysctl + resources: + limits: + cpu: 150m + ephemeral-storage: 2Gi + memory: 192Mi + requests: + cpu: 100m + ephemeral-storage: 50Mi + memory: 128Mi + securityContext: + privileged: true + runAsUser: 0 + - args: + - -ec + - "#!/bin/bash\n\n. /opt/bitnami/scripts/libfs.sh\n. /opt/bitnami/scripts/elasticsearch-env.sh\n\nif ! is_dir_empty \"$DB_DEFAULT_PLUGINS_DIR\"; then\n cp -nr \"$DB_DEFAULT_PLUGINS_DIR\"/* /plugins\nfi\n" + command: + - /bin/bash + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/elasticsearch:8.15.3 + imagePullPolicy: IfNotPresent + name: copy-default-plugins + resources: + limits: {} + requests: + cpu: 1 + memory: 2Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: empty-dir + subPath: tmp-dir + - mountPath: /plugins + name: empty-dir + subPath: app-plugins-dir + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + fsGroupChangePolicy: Always + supplementalGroups: [] + sysctls: [] + serviceAccountName: camunda-elasticsearch-master + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: empty-dir + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: local-path diff --git a/rmk/infrastructure/camunda/statefulset-camunda-keycloak.yaml b/rmk/infrastructure/camunda/statefulset-camunda-keycloak.yaml new file mode 100644 index 0000000..531b9ac --- /dev/null +++ b/rmk/infrastructure/camunda/statefulset-camunda-keycloak.yaml @@ -0,0 +1,253 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + name: camunda-keycloak + namespace: camunda +spec: + podManagementPolicy: Parallel + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak + serviceName: camunda-keycloak-headless + template: + metadata: + annotations: + checksum/configmap-env-vars: 6205ea66a502445065c57d8b22cd591d98b778157986a4cb091568dd26c43930 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_ADMIN_PASSWORD: secrets/data/camunda/keycloak-admin + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_DATABASE_PASSWORD: secrets/data/camunda/postgresql + vault.hashicorp.com/agent-inject-secret-KEYCLOAK_PASSWORD: secrets/data/camunda/keycloak-admin + vault.hashicorp.com/agent-inject-template-KEYCLOAK_ADMIN_PASSWORD: '{{- with secret "secrets/data/camunda/keycloak-admin" -}} + + {{ index .Data.data "admin-password" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_DATABASE_PASSWORD: '{{- with secret "secrets/data/camunda/postgresql" -}} + + {{ index .Data.data "keycloak-password" }} + + {{- end -}}' + vault.hashicorp.com/agent-inject-template-KEYCLOAK_PASSWORD: '{{- with secret "secrets/data/camunda/keycloak-admin" -}} + + {{ index .Data.data "admin-password" }} + + {{- end -}}' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: camunda + labels: + app.kubernetes.io/component: keycloak + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: keycloak + app.kubernetes.io/version: 25.0.6 + helm.sh/chart: identityKeycloak-22.2.6 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/instance: camunda + app.kubernetes.io/name: keycloak + topologyKey: kubernetes.io/hostname + weight: 1 + automountServiceAccountToken: true + containers: + - args: + - "\nif [ -f \"/vault/secrets/KEYCLOAK_ADMIN_PASSWORD\" ]; then\n export KEYCLOAK_ADMIN_PASSWORD=\"$(cat /vault/secrets/KEYCLOAK_ADMIN_PASSWORD)\"\nelif [ -f \"/vault/secrets/keycloak_admin_password\" ]; then\n export KEYCLOAK_ADMIN_PASSWORD=\"$(cat /vault/secrets/keycloak_admin_password)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_DATABASE_PASSWORD\" ]; then\n export KEYCLOAK_DATABASE_PASSWORD=\"$(cat /vault/secrets/KEYCLOAK_DATABASE_PASSWORD)\"\nelif [ -f \"/vault/secrets/keycloak_database_password\" ]; then\n export KEYCLOAK_DATABASE_PASSWORD=\"$(cat /vault/secrets/keycloak_database_password)\"\nfi\nif [ -f \"/vault/secrets/KEYCLOAK_PASSWORD\" ]; then\n export KEYCLOAK_PASSWORD=\"$(cat /vault/secrets/KEYCLOAK_PASSWORD)\"\nelif [ -f \"/vault/secrets/keycloak_password\" ]; then\n export KEYCLOAK_PASSWORD=\"$(cat /vault/secrets/keycloak_password)\"\nfi\nexec '/opt/bitnami/scripts/keycloak/entrypoint.sh' '/opt/bitnami/scripts/keycloak/run.sh'\n" + command: + - /bin/sh + - -ec + env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: BITNAMI_DEBUG + value: 'false' + - name: KEYCLOAK_HTTP_RELATIVE_PATH + value: /auth/ + - name: KC_SPI_ADMIN_REALM + value: master + - name: KC_TRUSTSTORE_PATHS + value: /opt/corporate-ca/corporate-ca.crt + - name: KC_LOG_LEVEL + value: INFO,org.keycloak.storage.ldap:debug + envFrom: + - configMapRef: + name: camunda-keycloak-env-vars + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/keycloak:25.0.6 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 300 + periodSeconds: 1 + successThreshold: 1 + tcpSocket: + port: http + timeoutSeconds: 5 + name: keycloak + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 7800 + name: discovery + readinessProbe: + failureThreshold: 3 + httpGet: + path: /auth/realms/master + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 750m + ephemeral-storage: 2Gi + memory: 768Mi + requests: + cpu: 500m + ephemeral-storage: 50Mi + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: empty-dir + subPath: tmp-dir + - mountPath: /bitnami/keycloak + name: empty-dir + subPath: app-volume-dir + - mountPath: /opt/bitnami/keycloak/conf + name: empty-dir + subPath: app-conf-dir + - mountPath: /opt/bitnami/keycloak/lib/quarkus + name: empty-dir + subPath: app-quarkus-dir + - mountPath: /opt/bitnami/keycloak/data + name: empty-dir + subPath: app-data-dir + - mountPath: /opt/corporate-ca + name: corporate-ca + readOnly: true + - mountPath: /opt/keytab + name: keytab + readOnly: true + - mountPath: /etc/krb5.conf + name: krb5 + readOnly: true + subPath: krb5.conf + enableServiceLinks: true + imagePullSecrets: + - name: regcred + initContainers: + - args: + - -ec + - '. /opt/bitnami/scripts/liblog.sh + + + info "Copying writable dirs to empty dir" + + # In order to not break the application functionality we need to make some + + # directories writable, so we need to copy it to an empty dir volume + + cp -r --preserve=mode /opt/bitnami/keycloak/lib/quarkus /emptydir/app-quarkus-dir + + cp -r --preserve=mode /opt/bitnami/keycloak/data /emptydir/app-data-dir + + info "Copy operation completed" + + ' + command: + - /bin/bash + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/keycloak:25.0.6 + imagePullPolicy: IfNotPresent + name: prepare-write-dirs + resources: + limits: + cpu: 750m + ephemeral-storage: 2Gi + memory: 768Mi + requests: + cpu: 500m + ephemeral-storage: 50Mi + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /emptydir + name: empty-dir + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + fsGroupChangePolicy: Always + runAsNonRoot: true + supplementalGroups: [] + sysctls: [] + serviceAccountName: camunda-keycloak + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - emptyDir: {} + name: empty-dir + - name: keytab + secret: + optional: true + secretName: keycloak-keytab + - configMap: + name: keycloak-krb5 + name: krb5 + - configMap: + name: corporate-ca + name: corporate-ca + updateStrategy: + rollingUpdate: {} + type: RollingUpdate diff --git a/rmk/infrastructure/camunda/statefulset-camunda-zeebe.yaml b/rmk/infrastructure/camunda/statefulset-camunda-zeebe.yaml new file mode 100644 index 0000000..eb75230 --- /dev/null +++ b/rmk/infrastructure/camunda/statefulset-camunda-zeebe.yaml @@ -0,0 +1,178 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + name: camunda-zeebe +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + serviceName: camunda-zeebe + template: + metadata: + annotations: + checksum/config: 29fbe9b5e57004e6752639f7a95d1df252edb192093a74161d8a13e866bc0d5c + labels: + app: camunda-platform + app.kubernetes.io/component: zeebe-broker + app.kubernetes.io/instance: camunda + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: camunda-contour + app.kubernetes.io/part-of: camunda-platform + app.kubernetes.io/version: 8.6.5 + helm.sh/chart: camunda-contour-11.0.14 + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/component + operator: In + values: + - zeebe-broker + topologyKey: kubernetes.io/hostname + containers: + - env: + - name: CAMUNDA_LICENSE_KEY + valueFrom: + secretKeyRef: + key: CAMUNDA_LICENSE_KEY + name: camunda-camunda-contour-license + - name: LC_ALL + value: C.UTF-8 + - name: K8S_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: K8S_SERVICE_NAME + value: camunda-zeebe + - name: K8S_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: ZEEBE_BROKER_NETWORK_ADVERTISEDHOST + value: $(K8S_NAME).$(K8S_SERVICE_NAME) + - name: ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS + value: $(K8S_SERVICE_NAME)-0.$(K8S_SERVICE_NAME):26502, + - name: ZEEBE_LOG_LEVEL + value: info + - name: ZEEBE_BROKER_GATEWAY_ENABLE + value: 'false' + - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_CLASSNAME + value: io.camunda.zeebe.exporter.ElasticsearchExporter + - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_URL + value: http://camunda-elasticsearch:9200 + - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_PREFIX + value: zeebe-record + - name: JAVA_TOOL_OPTIONS + value: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/zeebe/data -XX:ErrorFile=/usr/local/zeebe/data/zeebe_error%p.log -XX:+ExitOnOutOfMemoryError + - name: K8S_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: ZEEBE_BROKER_DATA_SNAPSHOTPERIOD + value: 5m + - name: ZEEBE_BROKER_DATA_DISK_FREESPACE_REPLICATION + value: 2GB + - name: ZEEBE_BROKER_DATA_DISK_FREESPACE_PROCESSING + value: 3GB + image: cr.yandex/crp3ccidau046kdj8g9q/contour/camunda/zeebe:8.6.5 + imagePullPolicy: IfNotPresent + name: zeebe + ports: + - containerPort: 9600 + name: http + - containerPort: 26501 + name: command + - containerPort: 26502 + name: internal + readinessProbe: + failureThreshold: 5 + httpGet: + path: /actuator/health/readiness + port: 9600 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + memory: 3Gi + requests: + memory: 1200Mi + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /usr/local/bin/startup.sh + name: config + subPath: startup.sh + - mountPath: /usr/local/zeebe/data + name: data + - mountPath: /exporters + name: exporters + - mountPath: /tmp + name: tmp + - mountPath: /usr/local/zeebe/config/application.yaml + name: config + subPath: application.yaml + imagePullSecrets: + - name: regcred + initContainers: [] + nodeSelector: + dedicated: processing + securityContext: + fsGroup: 1001 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: camunda-zeebe + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - configMap: + defaultMode: 492 + name: camunda-zeebe-configuration + name: config + - emptyDir: {} + name: exporters + - emptyDir: {} + name: tmp + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + annotations: {} + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 32Gi + storageClassName: local-path diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-authorizationpolicies.security.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-authorizationpolicies.security.istio.io.yaml new file mode 100644 index 0000000..0ecddae --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-authorizationpolicies.security.istio.io.yaml @@ -0,0 +1,700 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: authorizationpolicies.security.istio.io +spec: + group: security.istio.io + names: + categories: + - istio-io + - security-istio-io + kind: AuthorizationPolicy + listKind: AuthorizationPolicyList + plural: authorizationpolicies + shortNames: + - ap + singular: authorizationpolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The operation to take. + jsonPath: .spec.action + name: Action + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html' + oneOf: + - not: + anyOf: + - required: + - provider + - required: + - provider + properties: + action: + description: 'Optional. + + + Valid Options: ALLOW, DENY, AUDIT, CUSTOM' + enum: + - ALLOW + - DENY + - AUDIT + - CUSTOM + type: string + provider: + description: Specifies detailed configuration of the CUSTOM action. + properties: + name: + description: Specifies the name of the extension provider. + type: string + type: object + rules: + description: Optional. + items: + properties: + from: + description: Optional. + items: + properties: + source: + description: Source specifies the source of a request. + properties: + ipBlocks: + description: Optional. + items: + type: string + type: array + namespaces: + description: Optional. + items: + type: string + type: array + notIpBlocks: + description: Optional. + items: + type: string + type: array + notNamespaces: + description: Optional. + items: + type: string + type: array + notPrincipals: + description: Optional. + items: + type: string + type: array + notRemoteIpBlocks: + description: Optional. + items: + type: string + type: array + notRequestPrincipals: + description: Optional. + items: + type: string + type: array + principals: + description: Optional. + items: + type: string + type: array + remoteIpBlocks: + description: Optional. + items: + type: string + type: array + requestPrincipals: + description: Optional. + items: + type: string + type: array + type: object + type: object + type: array + to: + description: Optional. + items: + properties: + operation: + description: Operation specifies the operation of a request. + properties: + hosts: + description: Optional. + items: + type: string + type: array + methods: + description: Optional. + items: + type: string + type: array + notHosts: + description: Optional. + items: + type: string + type: array + notMethods: + description: Optional. + items: + type: string + type: array + notPaths: + description: Optional. + items: + type: string + type: array + notPorts: + description: Optional. + items: + type: string + type: array + paths: + description: Optional. + items: + type: string + type: array + ports: + description: Optional. + items: + type: string + type: array + type: object + type: object + type: array + when: + description: Optional. + items: + properties: + key: + description: The name of an Istio attribute. + type: string + notValues: + description: Optional. + items: + type: string + type: array + values: + description: Optional. + items: + type: string + type: array + required: + - key + type: object + type: array + type: object + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The operation to take. + jsonPath: .spec.action + name: Action + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html' + oneOf: + - not: + anyOf: + - required: + - provider + - required: + - provider + properties: + action: + description: 'Optional. + + + Valid Options: ALLOW, DENY, AUDIT, CUSTOM' + enum: + - ALLOW + - DENY + - AUDIT + - CUSTOM + type: string + provider: + description: Specifies detailed configuration of the CUSTOM action. + properties: + name: + description: Specifies the name of the extension provider. + type: string + type: object + rules: + description: Optional. + items: + properties: + from: + description: Optional. + items: + properties: + source: + description: Source specifies the source of a request. + properties: + ipBlocks: + description: Optional. + items: + type: string + type: array + namespaces: + description: Optional. + items: + type: string + type: array + notIpBlocks: + description: Optional. + items: + type: string + type: array + notNamespaces: + description: Optional. + items: + type: string + type: array + notPrincipals: + description: Optional. + items: + type: string + type: array + notRemoteIpBlocks: + description: Optional. + items: + type: string + type: array + notRequestPrincipals: + description: Optional. + items: + type: string + type: array + principals: + description: Optional. + items: + type: string + type: array + remoteIpBlocks: + description: Optional. + items: + type: string + type: array + requestPrincipals: + description: Optional. + items: + type: string + type: array + type: object + type: object + type: array + to: + description: Optional. + items: + properties: + operation: + description: Operation specifies the operation of a request. + properties: + hosts: + description: Optional. + items: + type: string + type: array + methods: + description: Optional. + items: + type: string + type: array + notHosts: + description: Optional. + items: + type: string + type: array + notMethods: + description: Optional. + items: + type: string + type: array + notPaths: + description: Optional. + items: + type: string + type: array + notPorts: + description: Optional. + items: + type: string + type: array + paths: + description: Optional. + items: + type: string + type: array + ports: + description: Optional. + items: + type: string + type: array + type: object + type: object + type: array + when: + description: Optional. + items: + properties: + key: + description: The name of an Istio attribute. + type: string + notValues: + description: Optional. + items: + type: string + type: array + values: + description: Optional. + items: + type: string + type: array + required: + - key + type: object + type: array + type: object + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-destinationrules.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-destinationrules.networking.istio.io.yaml new file mode 100644 index 0000000..a7db809 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-destinationrules.networking.istio.io.yaml @@ -0,0 +1,5006 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: destinationrules.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + shortNames: + - dr + singular: destinationrule + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The name of a service from the service registry + jsonPath: .spec.host + name: Host + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html' + properties: + exportTo: + description: A list of namespaces to which this destination rule is exported. + items: + type: string + type: array + host: + description: The name of a service from the service registry. + type: string + subsets: + description: One or more named sets that represent individual versions of a service. + items: + properties: + labels: + additionalProperties: + type: string + description: Labels apply a filter over the endpoints of a service in the service registry. + type: object + name: + description: Name of the subset. + type: string + trafficPolicy: + description: Traffic policies that apply to this subset. + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + required: + - name + type: object + type: array + trafficPolicy: + description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + required: + - host + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The name of a service from the service registry + jsonPath: .spec.host + name: Host + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html' + properties: + exportTo: + description: A list of namespaces to which this destination rule is exported. + items: + type: string + type: array + host: + description: The name of a service from the service registry. + type: string + subsets: + description: One or more named sets that represent individual versions of a service. + items: + properties: + labels: + additionalProperties: + type: string + description: Labels apply a filter over the endpoints of a service in the service registry. + type: object + name: + description: Name of the subset. + type: string + trafficPolicy: + description: Traffic policies that apply to this subset. + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + required: + - name + type: object + type: array + trafficPolicy: + description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + required: + - host + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The name of a service from the service registry + jsonPath: .spec.host + name: Host + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html' + properties: + exportTo: + description: A list of namespaces to which this destination rule is exported. + items: + type: string + type: array + host: + description: The name of a service from the service registry. + type: string + subsets: + description: One or more named sets that represent individual versions of a service. + items: + properties: + labels: + additionalProperties: + type: string + description: Labels apply a filter over the endpoints of a service in the service registry. + type: object + name: + description: Name of the subset. + type: string + trafficPolicy: + description: Traffic policies that apply to this subset. + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + required: + - name + type: object + type: array + trafficPolicy: + description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + portLevelSettings: + description: Traffic policies specific to individual ports. + items: + properties: + connectionPool: + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + loadBalancer: + description: Settings controlling the load balancer algorithms. + oneOf: + - not: + anyOf: + - required: + - simple + - required: + - consistentHash + - required: + - simple + - required: + - consistentHash + properties: + consistentHash: + allOf: + - oneOf: + - not: + anyOf: + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - required: + - httpHeaderName + - required: + - httpCookie + - required: + - useSourceIp + - required: + - httpQueryParameterName + - oneOf: + - not: + anyOf: + - required: + - ringHash + - required: + - maglev + - required: + - ringHash + - required: + - maglev + properties: + httpCookie: + description: Hash based on HTTP cookie. + properties: + name: + description: Name of the cookie. + type: string + path: + description: Path to set for the cookie. + type: string + ttl: + description: Lifetime of the cookie. + type: string + required: + - name + type: object + httpHeaderName: + description: Hash based on a specific HTTP header. + type: string + httpQueryParameterName: + description: Hash based on a specific HTTP query parameter. + type: string + maglev: + description: The Maglev load balancer implements consistent hashing to backend hosts. + properties: + tableSize: + description: The table size for Maglev hashing. + minimum: 0 + type: integer + type: object + minimumRingSize: + description: Deprecated. + minimum: 0 + type: integer + ringHash: + description: The ring/modulo hash load balancer implements consistent hashing to backend hosts. + properties: + minimumRingSize: + description: The minimum number of virtual nodes to use for the hash ring. + minimum: 0 + type: integer + type: object + useSourceIp: + description: Hash based on the source IP address. + type: boolean + type: object + localityLbSetting: + properties: + distribute: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating locality, '/' separated, e.g. + type: string + to: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + description: Map of upstream localities to traffic distribution weights. + type: object + type: object + type: array + enabled: + description: enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. + nullable: true + type: boolean + failover: + description: 'Optional: only one of distribute, failover or failoverPriority can be set.' + items: + properties: + from: + description: Originating region. + type: string + to: + description: Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy. + type: string + type: object + type: array + failoverPriority: + description: failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing. + items: + type: string + type: array + type: object + simple: + description: ' + + + Valid Options: LEAST_CONN, RANDOM, PASSTHROUGH, ROUND_ROBIN, LEAST_REQUEST' + enum: + - UNSPECIFIED + - LEAST_CONN + - RANDOM + - PASSTHROUGH + - ROUND_ROBIN + - LEAST_REQUEST + type: string + warmup: + description: Represents the warmup configuration of Service. + properties: + aggression: + description: This parameter controls the speed of traffic increase over the warmup duration. + format: double + minimum: 1 + nullable: true + type: number + duration: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + minimumPercent: + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + required: + - duration + type: object + warmupDurationSecs: + description: 'Deprecated: use `warmup` instead.' + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + outlierDetection: + properties: + baseEjectionTime: + description: Minimum ejection duration. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + consecutive5xxErrors: + description: Number of 5xx errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveErrors: + format: int32 + type: integer + consecutiveGatewayErrors: + description: Number of gateway errors before a host is ejected from the connection pool. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + consecutiveLocalOriginFailures: + description: The number of consecutive locally originated failures before ejection occurs. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + interval: + description: Time interval between ejection sweep analysis. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxEjectionPercent: + description: Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. + format: int32 + type: integer + minHealthPercent: + description: Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. + format: int32 + type: integer + splitExternalLocalOriginErrors: + description: Determines whether to distinguish local origin failures from external errors. + type: boolean + type: object + port: + description: Specifies the number of a port on the destination service on which this policy is being applied. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + type: object + maxItems: 4096 + type: array + proxyProtocol: + description: The upstream PROXY protocol settings. + properties: + version: + description: 'The PROXY protocol version to use. + + + Valid Options: V1, V2' + enum: + - V1 + - V2 + type: string + type: object + tls: + description: TLS related settings for connections to the upstream service. + properties: + caCertificates: + description: 'OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.' + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.' + type: string + clientCertificate: + description: REQUIRED if mode is `MUTUAL`. + type: string + credentialName: + description: The name of the secret that holds the TLS certs for the client including the CA certificates. + type: string + insecureSkipVerify: + description: '`insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.' + nullable: true + type: boolean + mode: + description: 'Indicates whether connections to this port should be secured using TLS. + + + Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL' + enum: + - DISABLE + - SIMPLE + - MUTUAL + - ISTIO_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `MUTUAL`. + type: string + sni: + description: SNI string to present to the server during TLS handshake. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate. + items: + type: string + type: array + type: object + tunnel: + description: Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule. + properties: + protocol: + description: Specifies which protocol to use for tunneling the downstream connection. + type: string + targetHost: + description: Specifies a host to which the downstream connection is tunneled. + type: string + targetPort: + description: Specifies a port to which the downstream connection is tunneled. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - targetHost + - targetPort + type: object + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + required: + - host + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-envoyfilters.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-envoyfilters.networking.istio.io.yaml new file mode 100644 index 0000000..00751d6 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-envoyfilters.networking.istio.io.yaml @@ -0,0 +1,372 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: envoyfilters.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: EnvoyFilter + listKind: EnvoyFilterList + plural: envoyfilters + singular: envoyfilter + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Customizing Envoy configuration generated by Istio. See more details at: https://istio.io/docs/reference/config/networking/envoy-filter.html' + properties: + configPatches: + description: One or more patches with match conditions. + items: + properties: + applyTo: + description: 'Specifies where in the Envoy configuration, the patch should be applied. + + + Valid Options: LISTENER, FILTER_CHAIN, NETWORK_FILTER, HTTP_FILTER, ROUTE_CONFIGURATION, VIRTUAL_HOST, HTTP_ROUTE, CLUSTER, EXTENSION_CONFIG, BOOTSTRAP, LISTENER_FILTER' + enum: + - INVALID + - LISTENER + - FILTER_CHAIN + - NETWORK_FILTER + - HTTP_FILTER + - ROUTE_CONFIGURATION + - VIRTUAL_HOST + - HTTP_ROUTE + - CLUSTER + - EXTENSION_CONFIG + - BOOTSTRAP + - LISTENER_FILTER + type: string + match: + description: Match on listener/route configuration/cluster. + oneOf: + - not: + anyOf: + - required: + - listener + - required: + - routeConfiguration + - required: + - cluster + - required: + - listener + - required: + - routeConfiguration + - required: + - cluster + properties: + cluster: + description: Match on envoy cluster attributes. + properties: + name: + description: The exact name of the cluster to match. + type: string + portNumber: + description: The service port for which this cluster was generated. + maximum: 4294967295 + minimum: 0 + type: integer + service: + description: The fully qualified service name for this cluster. + type: string + subset: + description: The subset associated with the service. + type: string + type: object + context: + description: 'The specific config generation context to match on. + + + Valid Options: ANY, SIDECAR_INBOUND, SIDECAR_OUTBOUND, GATEWAY' + enum: + - ANY + - SIDECAR_INBOUND + - SIDECAR_OUTBOUND + - GATEWAY + type: string + listener: + description: Match on envoy listener attributes. + properties: + filterChain: + description: Match a specific filter chain in a listener. + properties: + applicationProtocols: + description: Applies only to sidecars. + type: string + destinationPort: + description: The destination_port value used by a filter chain's match condition. + maximum: 4294967295 + minimum: 0 + type: integer + filter: + description: The name of a specific filter to apply the patch to. + properties: + name: + description: The filter name to match on. + type: string + subFilter: + description: The next level filter within this filter to match upon. + properties: + name: + description: The filter name to match on. + type: string + type: object + type: object + name: + description: The name assigned to the filter chain. + type: string + sni: + description: The SNI value used by a filter chain's match condition. + type: string + transportProtocol: + description: Applies only to `SIDECAR_INBOUND` context. + type: string + type: object + listenerFilter: + description: Match a specific listener filter. + type: string + name: + description: Match a specific listener by its name. + type: string + portName: + type: string + portNumber: + description: The service port/gateway port to which traffic is being sent/received. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + proxy: + description: Match on properties associated with a proxy. + properties: + metadata: + additionalProperties: + type: string + description: Match on the node metadata supplied by a proxy when connecting to Istio Pilot. + type: object + proxyVersion: + description: A regular expression in golang regex format (RE2) that can be used to select proxies using a specific version of istio proxy. + type: string + type: object + routeConfiguration: + description: Match on envoy HTTP route configuration attributes. + properties: + gateway: + description: The Istio gateway config's namespace/name for which this route configuration was generated. + type: string + name: + description: Route configuration name to match on. + type: string + portName: + description: Applicable only for GATEWAY context. + type: string + portNumber: + description: The service port number or gateway server port number for which this route configuration was generated. + maximum: 4294967295 + minimum: 0 + type: integer + vhost: + description: Match a specific virtual host in a route configuration and apply the patch to the virtual host. + properties: + name: + description: The VirtualHosts objects generated by Istio are named as host:port, where the host typically corresponds to the VirtualService's host field or the hostname of a service in the registry. + type: string + route: + description: Match a specific route within the virtual host. + properties: + action: + description: 'Match a route with specific action type. + + + Valid Options: ANY, ROUTE, REDIRECT, DIRECT_RESPONSE' + enum: + - ANY + - ROUTE + - REDIRECT + - DIRECT_RESPONSE + type: string + name: + description: The Route objects generated by default are named as default. + type: string + type: object + type: object + type: object + type: object + patch: + description: The patch to apply along with the operation. + properties: + filterClass: + description: 'Determines the filter insertion order. + + + Valid Options: AUTHN, AUTHZ, STATS' + enum: + - UNSPECIFIED + - AUTHN + - AUTHZ + - STATS + type: string + operation: + description: 'Determines how the patch should be applied. + + + Valid Options: MERGE, ADD, REMOVE, INSERT_BEFORE, INSERT_AFTER, INSERT_FIRST, REPLACE' + enum: + - INVALID + - MERGE + - ADD + - REMOVE + - INSERT_BEFORE + - INSERT_AFTER + - INSERT_FIRST + - REPLACE + type: string + value: + description: The JSON config of the object being patched. + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + priority: + description: Priority defines the order in which patch sets are applied within a context. + format: int32 + type: integer + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this patch configuration should be applied. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + type: object + x-kubernetes-validations: + - message: only one of targetRefs or workloadSelector can be set + rule: (has(self.workloadSelector)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-gateways.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-gateways.networking.istio.io.yaml new file mode 100644 index 0000000..25238f1 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-gateways.networking.istio.io.yaml @@ -0,0 +1,647 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: gateways.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: Gateway + listKind: GatewayList + plural: gateways + shortNames: + - gw + singular: gateway + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting edge load balancer. See more details at: https://istio.io/docs/reference/config/networking/gateway.html' + properties: + selector: + additionalProperties: + type: string + description: One or more labels that indicate a specific set of pods/VMs on which this gateway configuration should be applied. + type: object + servers: + description: A list of server specifications. + items: + properties: + bind: + description: The ip or the Unix domain socket to which the listener should be bound to. + type: string + defaultEndpoint: + type: string + hosts: + description: One or more hosts exposed by this gateway. + items: + type: string + type: array + name: + description: An optional name of the server, when set must be unique across all servers. + type: string + port: + description: The Port on which the proxy should listen for incoming connections. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + required: + - number + - protocol + - name + type: object + tls: + description: Set of TLS related options that govern the server's behavior. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + - hosts + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting edge load balancer. See more details at: https://istio.io/docs/reference/config/networking/gateway.html' + properties: + selector: + additionalProperties: + type: string + description: One or more labels that indicate a specific set of pods/VMs on which this gateway configuration should be applied. + type: object + servers: + description: A list of server specifications. + items: + properties: + bind: + description: The ip or the Unix domain socket to which the listener should be bound to. + type: string + defaultEndpoint: + type: string + hosts: + description: One or more hosts exposed by this gateway. + items: + type: string + type: array + name: + description: An optional name of the server, when set must be unique across all servers. + type: string + port: + description: The Port on which the proxy should listen for incoming connections. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + required: + - number + - protocol + - name + type: object + tls: + description: Set of TLS related options that govern the server's behavior. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + - hosts + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting edge load balancer. See more details at: https://istio.io/docs/reference/config/networking/gateway.html' + properties: + selector: + additionalProperties: + type: string + description: One or more labels that indicate a specific set of pods/VMs on which this gateway configuration should be applied. + type: object + servers: + description: A list of server specifications. + items: + properties: + bind: + description: The ip or the Unix domain socket to which the listener should be bound to. + type: string + defaultEndpoint: + type: string + hosts: + description: One or more hosts exposed by this gateway. + items: + type: string + type: array + name: + description: An optional name of the server, when set must be unique across all servers. + type: string + port: + description: The Port on which the proxy should listen for incoming connections. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + required: + - number + - protocol + - name + type: object + tls: + description: Set of TLS related options that govern the server's behavior. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + - hosts + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-peerauthentications.security.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-peerauthentications.security.istio.io.yaml new file mode 100644 index 0000000..8305530 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-peerauthentications.security.istio.io.yaml @@ -0,0 +1,316 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: peerauthentications.security.istio.io +spec: + group: security.istio.io + names: + categories: + - istio-io + - security-istio-io + kind: PeerAuthentication + listKind: PeerAuthenticationList + plural: peerauthentications + shortNames: + - pa + singular: peerauthentication + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Defines the mTLS mode used for peer authentication. + jsonPath: .spec.mtls.mode + name: Mode + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Peer authentication configuration for workloads. See more details at: https://istio.io/docs/reference/config/security/peer_authentication.html' + properties: + mtls: + description: Mutual TLS settings for workload. + properties: + mode: + description: 'Defines the mTLS mode used for peer authentication. + + + Valid Options: DISABLE, PERMISSIVE, STRICT' + enum: + - UNSET + - DISABLE + - PERMISSIVE + - STRICT + type: string + type: object + portLevelMtls: + additionalProperties: + properties: + mode: + description: 'Defines the mTLS mode used for peer authentication. + + + Valid Options: DISABLE, PERMISSIVE, STRICT' + enum: + - UNSET + - DISABLE + - PERMISSIVE + - STRICT + type: string + type: object + description: Port specific mutual TLS settings. + minProperties: 1 + type: object + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: self.all(key, 0 < int(key) && int(key) <= 65535) + selector: + description: The selector determines the workloads to apply the PeerAuthentication on. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + type: object + x-kubernetes-validations: + - message: portLevelMtls requires selector + rule: (has(self.selector) && has(self.selector.matchLabels) && self.selector.matchLabels.size() > 0) || !has(self.portLevelMtls) + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Defines the mTLS mode used for peer authentication. + jsonPath: .spec.mtls.mode + name: Mode + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Peer authentication configuration for workloads. See more details at: https://istio.io/docs/reference/config/security/peer_authentication.html' + properties: + mtls: + description: Mutual TLS settings for workload. + properties: + mode: + description: 'Defines the mTLS mode used for peer authentication. + + + Valid Options: DISABLE, PERMISSIVE, STRICT' + enum: + - UNSET + - DISABLE + - PERMISSIVE + - STRICT + type: string + type: object + portLevelMtls: + additionalProperties: + properties: + mode: + description: 'Defines the mTLS mode used for peer authentication. + + + Valid Options: DISABLE, PERMISSIVE, STRICT' + enum: + - UNSET + - DISABLE + - PERMISSIVE + - STRICT + type: string + type: object + description: Port specific mutual TLS settings. + minProperties: 1 + type: object + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: self.all(key, 0 < int(key) && int(key) <= 65535) + selector: + description: The selector determines the workloads to apply the PeerAuthentication on. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + type: object + x-kubernetes-validations: + - message: portLevelMtls requires selector + rule: (has(self.selector) && has(self.selector.matchLabels) && self.selector.matchLabels.size() > 0) || !has(self.portLevelMtls) + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-proxyconfigs.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-proxyconfigs.networking.istio.io.yaml new file mode 100644 index 0000000..9fd62d6 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-proxyconfigs.networking.istio.io.yaml @@ -0,0 +1,140 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: proxyconfigs.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: ProxyConfig + listKind: ProxyConfigList + plural: proxyconfigs + singular: proxyconfig + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Provides configuration for individual workloads. See more details at: https://istio.io/docs/reference/config/networking/proxy-config.html' + properties: + concurrency: + description: The number of worker threads to run. + format: int32 + minimum: 0 + nullable: true + type: integer + environmentVariables: + additionalProperties: + maxLength: 2048 + type: string + description: Additional environment variables for the proxy. + type: object + image: + description: Specifies the details of the proxy image. + properties: + imageType: + description: The image type of the image. + type: string + type: object + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-requestauthentications.security.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-requestauthentications.security.istio.io.yaml new file mode 100644 index 0000000..d7611af --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-requestauthentications.security.istio.io.yaml @@ -0,0 +1,554 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: requestauthentications.security.istio.io +spec: + group: security.istio.io + names: + categories: + - istio-io + - security-istio-io + kind: RequestAuthentication + listKind: RequestAuthenticationList + plural: requestauthentications + shortNames: + - ra + singular: requestauthentication + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Request authentication configuration for workloads. See more details at: https://istio.io/docs/reference/config/security/request_authentication.html' + properties: + jwtRules: + description: Define the list of JWTs that can be validated at the selected workloads' proxy. + items: + properties: + audiences: + description: The list of JWT [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) that are allowed to access. + items: + minLength: 1 + type: string + type: array + forwardOriginalToken: + description: If set to true, the original token will be kept for the upstream request. + type: boolean + fromCookies: + description: List of cookie names from which JWT is expected. + items: + minLength: 1 + type: string + type: array + fromHeaders: + description: List of header locations from which JWT is expected. + items: + properties: + name: + description: The HTTP header name. + minLength: 1 + type: string + prefix: + description: The prefix that should be stripped before decoding the token. + type: string + required: + - name + type: object + type: array + fromParams: + description: List of query parameters from which JWT is expected. + items: + minLength: 1 + type: string + type: array + issuer: + description: Identifies the issuer that issued the JWT. + minLength: 1 + type: string + jwks: + description: JSON Web Key Set of public keys to validate signature of the JWT. + type: string + jwks_uri: + description: URL of the provider's public key set to validate signature of the JWT. + maxLength: 2048 + minLength: 1 + type: string + x-kubernetes-validations: + - message: url must have scheme http:// or https:// + rule: url(self).getScheme() in ['http', 'https'] + jwksUri: + description: URL of the provider's public key set to validate signature of the JWT. + maxLength: 2048 + minLength: 1 + type: string + x-kubernetes-validations: + - message: url must have scheme http:// or https:// + rule: url(self).getScheme() in ['http', 'https'] + outputClaimToHeaders: + description: This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + items: + properties: + claim: + description: The name of the claim to be copied from. + minLength: 1 + type: string + header: + description: The name of the header to be created. + minLength: 1 + pattern: ^[-_A-Za-z0-9]+$ + type: string + required: + - header + - claim + type: object + type: array + outputPayloadToHeader: + description: This field specifies the header name to output a successfully verified JWT payload to the backend. + type: string + timeout: + description: The maximum amount of time that the resolver, determined by the PILOT_JWT_ENABLE_REMOTE_JWKS environment variable, will spend waiting for the JWKS to be fetched. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + required: + - issuer + type: object + x-kubernetes-validations: + - message: only one of jwks or jwksUri can be set + rule: (has(self.jwksUri)?1:0)+(has(self.jwks_uri)?1:0)+(has(self.jwks)?1:0)<=1 + maxItems: 4096 + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Request authentication configuration for workloads. See more details at: https://istio.io/docs/reference/config/security/request_authentication.html' + properties: + jwtRules: + description: Define the list of JWTs that can be validated at the selected workloads' proxy. + items: + properties: + audiences: + description: The list of JWT [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) that are allowed to access. + items: + minLength: 1 + type: string + type: array + forwardOriginalToken: + description: If set to true, the original token will be kept for the upstream request. + type: boolean + fromCookies: + description: List of cookie names from which JWT is expected. + items: + minLength: 1 + type: string + type: array + fromHeaders: + description: List of header locations from which JWT is expected. + items: + properties: + name: + description: The HTTP header name. + minLength: 1 + type: string + prefix: + description: The prefix that should be stripped before decoding the token. + type: string + required: + - name + type: object + type: array + fromParams: + description: List of query parameters from which JWT is expected. + items: + minLength: 1 + type: string + type: array + issuer: + description: Identifies the issuer that issued the JWT. + minLength: 1 + type: string + jwks: + description: JSON Web Key Set of public keys to validate signature of the JWT. + type: string + jwks_uri: + description: URL of the provider's public key set to validate signature of the JWT. + maxLength: 2048 + minLength: 1 + type: string + x-kubernetes-validations: + - message: url must have scheme http:// or https:// + rule: url(self).getScheme() in ['http', 'https'] + jwksUri: + description: URL of the provider's public key set to validate signature of the JWT. + maxLength: 2048 + minLength: 1 + type: string + x-kubernetes-validations: + - message: url must have scheme http:// or https:// + rule: url(self).getScheme() in ['http', 'https'] + outputClaimToHeaders: + description: This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + items: + properties: + claim: + description: The name of the claim to be copied from. + minLength: 1 + type: string + header: + description: The name of the header to be created. + minLength: 1 + pattern: ^[-_A-Za-z0-9]+$ + type: string + required: + - header + - claim + type: object + type: array + outputPayloadToHeader: + description: This field specifies the header name to output a successfully verified JWT payload to the backend. + type: string + timeout: + description: The maximum amount of time that the resolver, determined by the PILOT_JWT_ENABLE_REMOTE_JWKS environment variable, will spend waiting for the JWKS to be fetched. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + required: + - issuer + type: object + x-kubernetes-validations: + - message: only one of jwks or jwksUri can be set + rule: (has(self.jwksUri)?1:0)+(has(self.jwks_uri)?1:0)+(has(self.jwks)?1:0)<=1 + maxItems: 4096 + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-serviceentries.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-serviceentries.networking.istio.io.yaml new file mode 100644 index 0000000..b182eb3 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-serviceentries.networking.istio.io.yaml @@ -0,0 +1,827 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: serviceentries.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + shortNames: + - se + singular: serviceentry + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The hosts associated with the ServiceEntry + jsonPath: .spec.hosts + name: Hosts + type: string + - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + jsonPath: .spec.location + name: Location + type: string + - description: Service resolution mode for the hosts (NONE, STATIC, or DNS) + jsonPath: .spec.resolution + name: Resolution + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting service registry. See more details at: https://istio.io/docs/reference/config/networking/service-entry.html' + properties: + addresses: + description: The virtual IP addresses associated with the service. + items: + maxLength: 64 + type: string + maxItems: 256 + type: array + endpoints: + description: One or more endpoints associated with the service. + items: + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + maxItems: 4096 + type: array + exportTo: + description: A list of namespaces to which this service is exported. + items: + type: string + type: array + hosts: + description: The hosts associated with the ServiceEntry. + items: + type: string + x-kubernetes-validations: + - message: hostname cannot be wildcard + rule: self != '*' + maxItems: 256 + minItems: 1 + type: array + location: + description: 'Specify whether the service should be considered external to the mesh or part of the mesh. + + + Valid Options: MESH_EXTERNAL, MESH_INTERNAL' + enum: + - MESH_EXTERNAL + - MESH_INTERNAL + type: string + ports: + description: The ports associated with the external service. + items: + properties: + name: + description: Label assigned to the port. + maxLength: 256 + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + protocol: + description: The protocol exposed on the port. + maxLength: 256 + type: string + targetPort: + description: The port number on the endpoint where the traffic will be received. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - number + - name + type: object + maxItems: 256 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: port number cannot be duplicated + rule: self.all(l1, self.exists_one(l2, l1.number == l2.number)) + resolution: + description: 'Service resolution mode for the hosts. + + + Valid Options: NONE, STATIC, DNS, DNS_ROUND_ROBIN' + enum: + - NONE + - STATIC + - DNS + - DNS_ROUND_ROBIN + type: string + subjectAltNames: + description: If specified, the proxy will verify that the server certificate's subject alternate name matches one of the specified values. + items: + type: string + type: array + workloadSelector: + description: Applicable only for MESH_INTERNAL services. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + required: + - hosts + type: object + x-kubernetes-validations: + - message: only one of WorkloadSelector or Endpoints can be set + rule: (has(self.workloadSelector)?1:0)+(has(self.endpoints)?1:0)<=1 + - message: CIDR addresses are allowed only for NONE/STATIC resolution types + rule: '!(has(self.addresses) && self.addresses.exists(k, k.contains(''/'')) && (has(self.resolution) && self.resolution != ''STATIC'' && self.resolution != ''NONE''))' + - message: NONE mode cannot set endpoints + rule: '(!has(self.resolution) || self.resolution == ''NONE'') ? !has(self.endpoints) : true' + - message: DNS_ROUND_ROBIN mode cannot have multiple endpoints + rule: '(has(self.resolution) && self.resolution == ''DNS_ROUND_ROBIN'') ? (!has(self.endpoints) || size(self.endpoints) == 1) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The hosts associated with the ServiceEntry + jsonPath: .spec.hosts + name: Hosts + type: string + - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + jsonPath: .spec.location + name: Location + type: string + - description: Service resolution mode for the hosts (NONE, STATIC, or DNS) + jsonPath: .spec.resolution + name: Resolution + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting service registry. See more details at: https://istio.io/docs/reference/config/networking/service-entry.html' + properties: + addresses: + description: The virtual IP addresses associated with the service. + items: + maxLength: 64 + type: string + maxItems: 256 + type: array + endpoints: + description: One or more endpoints associated with the service. + items: + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + maxItems: 4096 + type: array + exportTo: + description: A list of namespaces to which this service is exported. + items: + type: string + type: array + hosts: + description: The hosts associated with the ServiceEntry. + items: + type: string + x-kubernetes-validations: + - message: hostname cannot be wildcard + rule: self != '*' + maxItems: 256 + minItems: 1 + type: array + location: + description: 'Specify whether the service should be considered external to the mesh or part of the mesh. + + + Valid Options: MESH_EXTERNAL, MESH_INTERNAL' + enum: + - MESH_EXTERNAL + - MESH_INTERNAL + type: string + ports: + description: The ports associated with the external service. + items: + properties: + name: + description: Label assigned to the port. + maxLength: 256 + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + protocol: + description: The protocol exposed on the port. + maxLength: 256 + type: string + targetPort: + description: The port number on the endpoint where the traffic will be received. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - number + - name + type: object + maxItems: 256 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: port number cannot be duplicated + rule: self.all(l1, self.exists_one(l2, l1.number == l2.number)) + resolution: + description: 'Service resolution mode for the hosts. + + + Valid Options: NONE, STATIC, DNS, DNS_ROUND_ROBIN' + enum: + - NONE + - STATIC + - DNS + - DNS_ROUND_ROBIN + type: string + subjectAltNames: + description: If specified, the proxy will verify that the server certificate's subject alternate name matches one of the specified values. + items: + type: string + type: array + workloadSelector: + description: Applicable only for MESH_INTERNAL services. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + required: + - hosts + type: object + x-kubernetes-validations: + - message: only one of WorkloadSelector or Endpoints can be set + rule: (has(self.workloadSelector)?1:0)+(has(self.endpoints)?1:0)<=1 + - message: CIDR addresses are allowed only for NONE/STATIC resolution types + rule: '!(has(self.addresses) && self.addresses.exists(k, k.contains(''/'')) && (has(self.resolution) && self.resolution != ''STATIC'' && self.resolution != ''NONE''))' + - message: NONE mode cannot set endpoints + rule: '(!has(self.resolution) || self.resolution == ''NONE'') ? !has(self.endpoints) : true' + - message: DNS_ROUND_ROBIN mode cannot have multiple endpoints + rule: '(has(self.resolution) && self.resolution == ''DNS_ROUND_ROBIN'') ? (!has(self.endpoints) || size(self.endpoints) == 1) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The hosts associated with the ServiceEntry + jsonPath: .spec.hosts + name: Hosts + type: string + - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + jsonPath: .spec.location + name: Location + type: string + - description: Service resolution mode for the hosts (NONE, STATIC, or DNS) + jsonPath: .spec.resolution + name: Resolution + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting service registry. See more details at: https://istio.io/docs/reference/config/networking/service-entry.html' + properties: + addresses: + description: The virtual IP addresses associated with the service. + items: + maxLength: 64 + type: string + maxItems: 256 + type: array + endpoints: + description: One or more endpoints associated with the service. + items: + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + maxItems: 4096 + type: array + exportTo: + description: A list of namespaces to which this service is exported. + items: + type: string + type: array + hosts: + description: The hosts associated with the ServiceEntry. + items: + type: string + x-kubernetes-validations: + - message: hostname cannot be wildcard + rule: self != '*' + maxItems: 256 + minItems: 1 + type: array + location: + description: 'Specify whether the service should be considered external to the mesh or part of the mesh. + + + Valid Options: MESH_EXTERNAL, MESH_INTERNAL' + enum: + - MESH_EXTERNAL + - MESH_INTERNAL + type: string + ports: + description: The ports associated with the external service. + items: + properties: + name: + description: Label assigned to the port. + maxLength: 256 + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + protocol: + description: The protocol exposed on the port. + maxLength: 256 + type: string + targetPort: + description: The port number on the endpoint where the traffic will be received. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - number + - name + type: object + maxItems: 256 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + x-kubernetes-validations: + - message: port number cannot be duplicated + rule: self.all(l1, self.exists_one(l2, l1.number == l2.number)) + resolution: + description: 'Service resolution mode for the hosts. + + + Valid Options: NONE, STATIC, DNS, DNS_ROUND_ROBIN' + enum: + - NONE + - STATIC + - DNS + - DNS_ROUND_ROBIN + type: string + subjectAltNames: + description: If specified, the proxy will verify that the server certificate's subject alternate name matches one of the specified values. + items: + type: string + type: array + workloadSelector: + description: Applicable only for MESH_INTERNAL services. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + required: + - hosts + type: object + x-kubernetes-validations: + - message: only one of WorkloadSelector or Endpoints can be set + rule: (has(self.workloadSelector)?1:0)+(has(self.endpoints)?1:0)<=1 + - message: CIDR addresses are allowed only for NONE/STATIC resolution types + rule: '!(has(self.addresses) && self.addresses.exists(k, k.contains(''/'')) && (has(self.resolution) && self.resolution != ''STATIC'' && self.resolution != ''NONE''))' + - message: NONE mode cannot set endpoints + rule: '(!has(self.resolution) || self.resolution == ''NONE'') ? !has(self.endpoints) : true' + - message: DNS_ROUND_ROBIN mode cannot have multiple endpoints + rule: '(has(self.resolution) && self.resolution == ''DNS_ROUND_ROBIN'') ? (!has(self.endpoints) || size(self.endpoints) == 1) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-sidecars.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-sidecars.networking.istio.io.yaml new file mode 100644 index 0000000..d10b03a --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-sidecars.networking.istio.io.yaml @@ -0,0 +1,1461 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: sidecars.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: Sidecar + listKind: SidecarList + plural: sidecars + singular: sidecar + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html' + properties: + egress: + description: Egress specifies the configuration of the sidecar for processing outbound traffic from the attached workload instance to other services in the mesh. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) or the Unix domain socket to which the listener should be bound to. + type: string + captureMode: + description: 'When the bind address is an IP, the captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + hosts: + description: One or more service hosts exposed by the listener in `namespace/dnsName` format. + items: + type: string + type: array + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + required: + - hosts + type: object + type: array + inboundConnectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + ingress: + description: Ingress specifies the configuration of the sidecar for processing inbound traffic to the attached workload instance. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) to which the listener should be bound. + type: string + captureMode: + description: 'The captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + connectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + defaultEndpoint: + description: The IP endpoint or Unix domain socket to which traffic should be forwarded to. + type: string + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: Set of TLS related options that will enable TLS termination on the sidecar for requests originating from outside the mesh. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + type: object + type: array + outboundTrafficPolicy: + description: Set the default behavior of the sidecar for handling outbound traffic from the application. + properties: + egressProxy: + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mode: + description: ' + + + Valid Options: REGISTRY_ONLY, ALLOW_ANY' + enum: + - REGISTRY_ONLY + - ALLOW_ANY + type: string + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `Sidecar` configuration should be applied. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html' + properties: + egress: + description: Egress specifies the configuration of the sidecar for processing outbound traffic from the attached workload instance to other services in the mesh. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) or the Unix domain socket to which the listener should be bound to. + type: string + captureMode: + description: 'When the bind address is an IP, the captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + hosts: + description: One or more service hosts exposed by the listener in `namespace/dnsName` format. + items: + type: string + type: array + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + required: + - hosts + type: object + type: array + inboundConnectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + ingress: + description: Ingress specifies the configuration of the sidecar for processing inbound traffic to the attached workload instance. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) to which the listener should be bound. + type: string + captureMode: + description: 'The captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + connectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + defaultEndpoint: + description: The IP endpoint or Unix domain socket to which traffic should be forwarded to. + type: string + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: Set of TLS related options that will enable TLS termination on the sidecar for requests originating from outside the mesh. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + type: object + type: array + outboundTrafficPolicy: + description: Set the default behavior of the sidecar for handling outbound traffic from the application. + properties: + egressProxy: + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mode: + description: ' + + + Valid Options: REGISTRY_ONLY, ALLOW_ANY' + enum: + - REGISTRY_ONLY + - ALLOW_ANY + type: string + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `Sidecar` configuration should be applied. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html' + properties: + egress: + description: Egress specifies the configuration of the sidecar for processing outbound traffic from the attached workload instance to other services in the mesh. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) or the Unix domain socket to which the listener should be bound to. + type: string + captureMode: + description: 'When the bind address is an IP, the captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + hosts: + description: One or more service hosts exposed by the listener in `namespace/dnsName` format. + items: + type: string + type: array + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + required: + - hosts + type: object + type: array + inboundConnectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + ingress: + description: Ingress specifies the configuration of the sidecar for processing inbound traffic to the attached workload instance. + items: + properties: + bind: + description: The IP(IPv4 or IPv6) to which the listener should be bound. + type: string + captureMode: + description: 'The captureMode option dictates how traffic to the listener is expected to be captured (or not). + + + Valid Options: DEFAULT, IPTABLES, NONE' + enum: + - DEFAULT + - IPTABLES + - NONE + type: string + connectionPool: + description: Settings controlling the volume of connections Envoy will accept from the network. + properties: + http: + description: HTTP connection pool settings. + properties: + h2UpgradePolicy: + description: 'Specify if http1.1 connection should be upgraded to http2 for the associated destination. + + + Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE' + enum: + - DEFAULT + - DO_NOT_UPGRADE + - UPGRADE + type: string + http1MaxPendingRequests: + description: Maximum number of requests that will be queued while waiting for a ready connection pool connection. + format: int32 + type: integer + http2MaxRequests: + description: Maximum number of active requests to a destination. + format: int32 + type: integer + idleTimeout: + description: The idle timeout for upstream connection pool connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrentStreams: + description: The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection. + format: int32 + type: integer + maxRequestsPerConnection: + description: Maximum number of requests per connection to a backend. + format: int32 + type: integer + maxRetries: + description: Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. + format: int32 + type: integer + useClientProtocol: + description: If set to true, client protocol will be preserved while initiating connection to backend. + type: boolean + type: object + tcp: + description: Settings common to both HTTP and TCP upstream connections. + properties: + connectTimeout: + description: TCP connection timeout. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + idleTimeout: + description: The idle timeout for TCP connections. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnectionDuration: + description: The maximum duration of a connection. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConnections: + description: Maximum number of HTTP1 /TCP connections to a destination host. + format: int32 + type: integer + tcpKeepalive: + description: If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + properties: + interval: + description: The time duration between keep-alive probes. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + probes: + description: Maximum number of keepalive probes to send without response before deciding the connection is dead. + maximum: 4294967295 + minimum: 0 + type: integer + time: + description: The time duration a connection needs to be idle before keep-alive probes start being sent. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: object + type: object + defaultEndpoint: + description: The IP endpoint or Unix domain socket to which traffic should be forwarded to. + type: string + port: + description: The port associated with the listener. + properties: + name: + description: Label assigned to the port. + type: string + number: + description: A valid non-negative integer port number. + maximum: 4294967295 + minimum: 0 + type: integer + protocol: + description: The protocol exposed on the port. + type: string + targetPort: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + tls: + description: Set of TLS related options that will enable TLS termination on the sidecar for requests originating from outside the mesh. + properties: + caCertificates: + description: REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`. + type: string + caCrl: + description: 'OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented client side certificate.' + type: string + cipherSuites: + description: 'Optional: If specified, only support the specified cipher list.' + items: + type: string + type: array + credentialName: + description: For gateways running on Kubernetes, the name of the secret that holds the TLS certs including the CA certificates. + type: string + httpsRedirect: + description: If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS. + type: boolean + maxProtocolVersion: + description: 'Optional: Maximum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + minProtocolVersion: + description: 'Optional: Minimum TLS protocol version. + + + Valid Options: TLS_AUTO, TLSV1_0, TLSV1_1, TLSV1_2, TLSV1_3' + enum: + - TLS_AUTO + - TLSV1_0 + - TLSV1_1 + - TLSV1_2 + - TLSV1_3 + type: string + mode: + description: 'Optional: Indicates whether connections to this port should be secured using TLS. + + + Valid Options: PASSTHROUGH, SIMPLE, MUTUAL, AUTO_PASSTHROUGH, ISTIO_MUTUAL, OPTIONAL_MUTUAL' + enum: + - PASSTHROUGH + - SIMPLE + - MUTUAL + - AUTO_PASSTHROUGH + - ISTIO_MUTUAL + - OPTIONAL_MUTUAL + type: string + privateKey: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + serverCertificate: + description: REQUIRED if mode is `SIMPLE` or `MUTUAL`. + type: string + subjectAltNames: + description: A list of alternate names to verify the subject identity in the certificate presented by the client. + items: + type: string + type: array + verifyCertificateHash: + description: An optional list of hex-encoded SHA-256 hashes of the authorized client certificates. + items: + type: string + type: array + verifyCertificateSpki: + description: An optional list of base64-encoded SHA-256 hashes of the SPKIs of authorized client certificates. + items: + type: string + type: array + type: object + required: + - port + type: object + type: array + outboundTrafficPolicy: + description: Set the default behavior of the sidecar for handling outbound traffic from the application. + properties: + egressProxy: + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mode: + description: ' + + + Valid Options: REGISTRY_ONLY, ALLOW_ANY' + enum: + - REGISTRY_ONLY + - ALLOW_ANY + type: string + type: object + workloadSelector: + description: Criteria used to select the specific set of pods/VMs on which this `Sidecar` configuration should be applied. + properties: + labels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard is not supported in selector + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which the configuration should be applied. + maxProperties: 256 + type: object + type: object + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-telemetries.telemetry.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-telemetries.telemetry.istio.io.yaml new file mode 100644 index 0000000..3a11682 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-telemetries.telemetry.istio.io.yaml @@ -0,0 +1,868 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: telemetries.telemetry.istio.io +spec: + group: telemetry.istio.io + names: + categories: + - istio-io + - telemetry-istio-io + kind: Telemetry + listKind: TelemetryList + plural: telemetries + shortNames: + - telemetry + singular: telemetry + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Telemetry configuration for workloads. See more details at: https://istio.io/docs/reference/config/telemetry.html' + properties: + accessLogging: + description: Optional. + items: + properties: + disabled: + description: Controls logging. + nullable: true + type: boolean + filter: + description: Optional. + properties: + expression: + description: CEL expression for selecting when requests/connections should be logged. + type: string + type: object + match: + description: Allows tailoring of logging behavior to specific conditions. + properties: + mode: + description: 'This determines whether or not to apply the access logging configuration based on the direction of traffic relative to the proxied workload. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + type: object + type: array + metrics: + description: Optional. + items: + properties: + overrides: + description: Optional. + items: + properties: + disabled: + description: Optional. + nullable: true + type: boolean + match: + description: Match allows providing the scope of the override. + oneOf: + - not: + anyOf: + - required: + - metric + - required: + - customMetric + - required: + - metric + - required: + - customMetric + properties: + customMetric: + description: Allows free-form specification of a metric. + minLength: 1 + type: string + metric: + description: 'One of the well-known [Istio Standard Metrics](https://istio.io/latest/docs/reference/config/metrics/). + + + Valid Options: ALL_METRICS, REQUEST_COUNT, REQUEST_DURATION, REQUEST_SIZE, RESPONSE_SIZE, TCP_OPENED_CONNECTIONS, TCP_CLOSED_CONNECTIONS, TCP_SENT_BYTES, TCP_RECEIVED_BYTES, GRPC_REQUEST_MESSAGES, GRPC_RESPONSE_MESSAGES' + enum: + - ALL_METRICS + - REQUEST_COUNT + - REQUEST_DURATION + - REQUEST_SIZE + - RESPONSE_SIZE + - TCP_OPENED_CONNECTIONS + - TCP_CLOSED_CONNECTIONS + - TCP_SENT_BYTES + - TCP_RECEIVED_BYTES + - GRPC_REQUEST_MESSAGES + - GRPC_RESPONSE_MESSAGES + type: string + mode: + description: 'Controls which mode of metrics generation is selected: `CLIENT`, `SERVER`, or `CLIENT_AND_SERVER`. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + tagOverrides: + additionalProperties: + properties: + operation: + description: 'Operation controls whether or not to update/add a tag, or to remove it. + + + Valid Options: UPSERT, REMOVE' + enum: + - UPSERT + - REMOVE + type: string + value: + description: Value is only considered if the operation is `UPSERT`. + type: string + type: object + x-kubernetes-validations: + - message: value must be set when operation is UPSERT + rule: '((has(self.operation) ? self.operation : '''') == ''UPSERT'') ? self.value != '''' : true' + - message: value must not be set when operation is REMOVE + rule: '((has(self.operation) ? self.operation : '''') == ''REMOVE'') ? !has(self.value) : true' + description: Optional. + type: object + type: object + type: array + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + reportingInterval: + description: Optional. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + tracing: + description: Optional. + items: + properties: + customTags: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - literal + - required: + - environment + - required: + - header + - required: + - literal + - required: + - environment + - required: + - header + properties: + environment: + description: Environment adds the value of an environment variable to each span. + properties: + defaultValue: + description: Optional. + type: string + name: + description: Name of the environment variable from which to extract the tag value. + minLength: 1 + type: string + required: + - name + type: object + header: + description: RequestHeader adds the value of an header from the request to each span. + properties: + defaultValue: + description: Optional. + type: string + name: + description: Name of the header from which to extract the tag value. + minLength: 1 + type: string + required: + - name + type: object + literal: + description: Literal adds the same, hard-coded value to each span. + properties: + value: + description: The tag value to use. + minLength: 1 + type: string + required: + - value + type: object + type: object + description: Optional. + type: object + disableSpanReporting: + description: Controls span reporting. + nullable: true + type: boolean + match: + description: Allows tailoring of behavior to specific conditions. + properties: + mode: + description: 'This determines whether or not to apply the tracing configuration based on the direction of traffic relative to the proxied workload. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + randomSamplingPercentage: + description: Controls the rate at which traffic will be selected for tracing if no prior sampling decision has been made. + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + useRequestIdForTraceSampling: + nullable: true + type: boolean + type: object + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Telemetry configuration for workloads. See more details at: https://istio.io/docs/reference/config/telemetry.html' + properties: + accessLogging: + description: Optional. + items: + properties: + disabled: + description: Controls logging. + nullable: true + type: boolean + filter: + description: Optional. + properties: + expression: + description: CEL expression for selecting when requests/connections should be logged. + type: string + type: object + match: + description: Allows tailoring of logging behavior to specific conditions. + properties: + mode: + description: 'This determines whether or not to apply the access logging configuration based on the direction of traffic relative to the proxied workload. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + type: object + type: array + metrics: + description: Optional. + items: + properties: + overrides: + description: Optional. + items: + properties: + disabled: + description: Optional. + nullable: true + type: boolean + match: + description: Match allows providing the scope of the override. + oneOf: + - not: + anyOf: + - required: + - metric + - required: + - customMetric + - required: + - metric + - required: + - customMetric + properties: + customMetric: + description: Allows free-form specification of a metric. + minLength: 1 + type: string + metric: + description: 'One of the well-known [Istio Standard Metrics](https://istio.io/latest/docs/reference/config/metrics/). + + + Valid Options: ALL_METRICS, REQUEST_COUNT, REQUEST_DURATION, REQUEST_SIZE, RESPONSE_SIZE, TCP_OPENED_CONNECTIONS, TCP_CLOSED_CONNECTIONS, TCP_SENT_BYTES, TCP_RECEIVED_BYTES, GRPC_REQUEST_MESSAGES, GRPC_RESPONSE_MESSAGES' + enum: + - ALL_METRICS + - REQUEST_COUNT + - REQUEST_DURATION + - REQUEST_SIZE + - RESPONSE_SIZE + - TCP_OPENED_CONNECTIONS + - TCP_CLOSED_CONNECTIONS + - TCP_SENT_BYTES + - TCP_RECEIVED_BYTES + - GRPC_REQUEST_MESSAGES + - GRPC_RESPONSE_MESSAGES + type: string + mode: + description: 'Controls which mode of metrics generation is selected: `CLIENT`, `SERVER`, or `CLIENT_AND_SERVER`. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + tagOverrides: + additionalProperties: + properties: + operation: + description: 'Operation controls whether or not to update/add a tag, or to remove it. + + + Valid Options: UPSERT, REMOVE' + enum: + - UPSERT + - REMOVE + type: string + value: + description: Value is only considered if the operation is `UPSERT`. + type: string + type: object + x-kubernetes-validations: + - message: value must be set when operation is UPSERT + rule: '((has(self.operation) ? self.operation : '''') == ''UPSERT'') ? self.value != '''' : true' + - message: value must not be set when operation is REMOVE + rule: '((has(self.operation) ? self.operation : '''') == ''REMOVE'') ? !has(self.value) : true' + description: Optional. + type: object + type: object + type: array + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + reportingInterval: + description: Optional. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: array + selector: + description: Optional. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + tracing: + description: Optional. + items: + properties: + customTags: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - literal + - required: + - environment + - required: + - header + - required: + - literal + - required: + - environment + - required: + - header + properties: + environment: + description: Environment adds the value of an environment variable to each span. + properties: + defaultValue: + description: Optional. + type: string + name: + description: Name of the environment variable from which to extract the tag value. + minLength: 1 + type: string + required: + - name + type: object + header: + description: RequestHeader adds the value of an header from the request to each span. + properties: + defaultValue: + description: Optional. + type: string + name: + description: Name of the header from which to extract the tag value. + minLength: 1 + type: string + required: + - name + type: object + literal: + description: Literal adds the same, hard-coded value to each span. + properties: + value: + description: The tag value to use. + minLength: 1 + type: string + required: + - value + type: object + type: object + description: Optional. + type: object + disableSpanReporting: + description: Controls span reporting. + nullable: true + type: boolean + match: + description: Allows tailoring of behavior to specific conditions. + properties: + mode: + description: 'This determines whether or not to apply the tracing configuration based on the direction of traffic relative to the proxied workload. + + + Valid Options: CLIENT_AND_SERVER, CLIENT, SERVER' + enum: + - CLIENT_AND_SERVER + - CLIENT + - SERVER + type: string + type: object + providers: + description: Optional. + items: + properties: + name: + description: Required. + minLength: 1 + type: string + required: + - name + type: object + type: array + randomSamplingPercentage: + description: Controls the rate at which traffic will be selected for tracing if no prior sampling decision has been made. + format: double + maximum: 100 + minimum: 0 + nullable: true + type: number + useRequestIdForTraceSampling: + nullable: true + type: boolean + type: object + type: array + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-virtualservices.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-virtualservices.networking.istio.io.yaml new file mode 100644 index 0000000..c1677db --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-virtualservices.networking.istio.io.yaml @@ -0,0 +1,2816 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: virtualservices.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + shortNames: + - vs + singular: virtualservice + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The names of gateways and sidecars that should apply these routes + jsonPath: .spec.gateways + name: Gateways + type: string + - description: The destination hosts to which traffic is being sent + jsonPath: .spec.hosts + name: Hosts + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html' + properties: + exportTo: + description: A list of namespaces to which this virtual service is exported. + items: + type: string + type: array + gateways: + description: The names of gateways and sidecars that should apply these routes. + items: + type: string + type: array + hosts: + description: The destination hosts to which traffic is being sent. + items: + type: string + type: array + http: + description: An ordered list of route rules for HTTP traffic. + items: + properties: + corsPolicy: + description: Cross-Origin Resource Sharing policy (CORS). + properties: + allowCredentials: + description: Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. + nullable: true + type: boolean + allowHeaders: + description: List of HTTP headers that can be used when requesting the resource. + items: + type: string + type: array + allowMethods: + description: List of HTTP methods allowed to access the resource. + items: + type: string + type: array + allowOrigin: + items: + type: string + type: array + allowOrigins: + description: String patterns that match allowed origins. + items: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + type: array + exposeHeaders: + description: A list of HTTP headers that the browsers are allowed to access. + items: + type: string + type: array + maxAge: + description: Specifies how long the results of a preflight request can be cached. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + unmatchedPreflights: + description: 'Indicates whether preflight requests not matching the configured allowed origin shouldn''t be forwarded to the upstream. + + + Valid Options: FORWARD, IGNORE' + enum: + - UNSPECIFIED + - FORWARD + - IGNORE + type: string + type: object + delegate: + description: Delegate is used to specify the particular VirtualService which can be used to define delegate HTTPRoute. + properties: + name: + description: Name specifies the name of the delegate VirtualService. + type: string + namespace: + description: Namespace specifies the namespace where the delegate VirtualService resides. + type: string + type: object + directResponse: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + properties: + body: + description: Specifies the content of the response body. + oneOf: + - not: + anyOf: + - required: + - string + - required: + - bytes + - required: + - string + - required: + - bytes + properties: + bytes: + description: response body as base64 encoded bytes. + format: binary + type: string + string: + type: string + type: object + status: + description: Specifies the HTTP response status to be returned. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - status + type: object + fault: + description: Fault injection policy to apply on HTTP traffic at the client side. + properties: + abort: + description: Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty. + oneOf: + - not: + anyOf: + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + properties: + grpcStatus: + description: GRPC status code to use to abort the request. + type: string + http2Error: + type: string + httpStatus: + description: HTTP status code to use to abort the Http request. + format: int32 + type: integer + percentage: + description: Percentage of requests to be aborted with the error code provided. + properties: + value: + format: double + type: number + type: object + type: object + delay: + description: Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc. + oneOf: + - not: + anyOf: + - required: + - fixedDelay + - required: + - exponentialDelay + - required: + - fixedDelay + - required: + - exponentialDelay + properties: + exponentialDelay: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + fixedDelay: + description: Add a fixed delay before forwarding the request. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + percent: + description: Percentage of requests on which the delay will be injected (0-100). + format: int32 + type: integer + percentage: + description: Percentage of requests on which the delay will be injected. + properties: + value: + format: double + type: number + type: object + type: object + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + authority: + description: 'HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + headers: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: The header keys must be lowercase and use hyphen as the separator, e.g. + type: object + ignoreUriCase: + description: Flag to specify whether the URI matching should be case-insensitive. + type: boolean + method: + description: 'HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + name: + description: The name assigned to a match. + type: string + port: + description: Specifies the ports on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + queryParams: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: Query parameters for matching. + type: object + scheme: + description: 'URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to source (client) workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + statPrefix: + description: The human readable prefix to use when emitting statistics for this route. + type: string + uri: + description: 'URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + withoutHeaders: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: withoutHeader has the same syntax with the header, but has opposite meaning. + type: object + type: object + type: array + mirror: + description: Mirror HTTP traffic to a another destination in addition to forwarding the requests to the intended destination. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mirror_percent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercentage: + description: Percentage of the traffic to be mirrored by the `mirror` field. + properties: + value: + format: double + type: number + type: object + mirrors: + description: Specifies the destinations to mirror HTTP traffic in addition to the original destination. + items: + properties: + destination: + description: Destination specifies the target of the mirror operation. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + percentage: + description: Percentage of the traffic to be mirrored by the `destination` field. + properties: + value: + format: double + type: number + type: object + required: + - destination + type: object + type: array + name: + description: The name assigned to the route for debugging purposes. + type: string + redirect: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + oneOf: + - not: + anyOf: + - required: + - port + - required: + - derivePort + - required: + - port + - required: + - derivePort + properties: + authority: + description: On a redirect, overwrite the Authority/Host portion of the URL with this value. + type: string + derivePort: + description: 'On a redirect, dynamically set the port: * FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and 443 for HTTPS. + + + Valid Options: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT' + enum: + - FROM_PROTOCOL_DEFAULT + - FROM_REQUEST_PORT + type: string + port: + description: On a redirect, overwrite the port portion of the URL with this value. + maximum: 4294967295 + minimum: 0 + type: integer + redirectCode: + description: On a redirect, Specifies the HTTP status code to use in the redirect response. + maximum: 4294967295 + minimum: 0 + type: integer + scheme: + description: On a redirect, overwrite the scheme portion of the URL with this value. + type: string + uri: + description: On a redirect, overwrite the Path portion of the URL with this value. + type: string + type: object + retries: + description: Retry policy for HTTP requests. + properties: + attempts: + description: Number of retries to be allowed for a given request. + format: int32 + type: integer + perTryTimeout: + description: Timeout per attempt for a given request, including the initial call and any retries. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + retryOn: + description: Specifies the conditions under which retry takes place. + type: string + retryRemoteLocalities: + description: Flag to specify whether the retries should retry to other localities. + nullable: true + type: boolean + type: object + rewrite: + description: Rewrite HTTP URIs and Authority headers. + properties: + authority: + description: rewrite the Authority/Host header with this value. + type: string + uri: + description: rewrite the path (or the prefix) portion of the URI with this value. + type: string + uriRegexRewrite: + description: rewrite the path portion of the URI with the specified regex. + properties: + match: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + rewrite: + description: The string that should replace into matching portions of original URI. + type: string + type: object + type: object + route: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + timeout: + description: Timeout for HTTP requests, default is disabled. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: array + tcp: + description: An ordered list of route rules for opaque TCP traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + sourceSubnet: + type: string + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + type: object + type: array + tls: + description: An ordered list of route rule for non-terminated TLS & HTTPS traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sniHosts: + description: SNI (server name indicator) to match on. + items: + type: string + type: array + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + required: + - sniHosts + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + required: + - match + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The names of gateways and sidecars that should apply these routes + jsonPath: .spec.gateways + name: Gateways + type: string + - description: The destination hosts to which traffic is being sent + jsonPath: .spec.hosts + name: Hosts + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html' + properties: + exportTo: + description: A list of namespaces to which this virtual service is exported. + items: + type: string + type: array + gateways: + description: The names of gateways and sidecars that should apply these routes. + items: + type: string + type: array + hosts: + description: The destination hosts to which traffic is being sent. + items: + type: string + type: array + http: + description: An ordered list of route rules for HTTP traffic. + items: + properties: + corsPolicy: + description: Cross-Origin Resource Sharing policy (CORS). + properties: + allowCredentials: + description: Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. + nullable: true + type: boolean + allowHeaders: + description: List of HTTP headers that can be used when requesting the resource. + items: + type: string + type: array + allowMethods: + description: List of HTTP methods allowed to access the resource. + items: + type: string + type: array + allowOrigin: + items: + type: string + type: array + allowOrigins: + description: String patterns that match allowed origins. + items: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + type: array + exposeHeaders: + description: A list of HTTP headers that the browsers are allowed to access. + items: + type: string + type: array + maxAge: + description: Specifies how long the results of a preflight request can be cached. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + unmatchedPreflights: + description: 'Indicates whether preflight requests not matching the configured allowed origin shouldn''t be forwarded to the upstream. + + + Valid Options: FORWARD, IGNORE' + enum: + - UNSPECIFIED + - FORWARD + - IGNORE + type: string + type: object + delegate: + description: Delegate is used to specify the particular VirtualService which can be used to define delegate HTTPRoute. + properties: + name: + description: Name specifies the name of the delegate VirtualService. + type: string + namespace: + description: Namespace specifies the namespace where the delegate VirtualService resides. + type: string + type: object + directResponse: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + properties: + body: + description: Specifies the content of the response body. + oneOf: + - not: + anyOf: + - required: + - string + - required: + - bytes + - required: + - string + - required: + - bytes + properties: + bytes: + description: response body as base64 encoded bytes. + format: binary + type: string + string: + type: string + type: object + status: + description: Specifies the HTTP response status to be returned. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - status + type: object + fault: + description: Fault injection policy to apply on HTTP traffic at the client side. + properties: + abort: + description: Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty. + oneOf: + - not: + anyOf: + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + properties: + grpcStatus: + description: GRPC status code to use to abort the request. + type: string + http2Error: + type: string + httpStatus: + description: HTTP status code to use to abort the Http request. + format: int32 + type: integer + percentage: + description: Percentage of requests to be aborted with the error code provided. + properties: + value: + format: double + type: number + type: object + type: object + delay: + description: Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc. + oneOf: + - not: + anyOf: + - required: + - fixedDelay + - required: + - exponentialDelay + - required: + - fixedDelay + - required: + - exponentialDelay + properties: + exponentialDelay: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + fixedDelay: + description: Add a fixed delay before forwarding the request. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + percent: + description: Percentage of requests on which the delay will be injected (0-100). + format: int32 + type: integer + percentage: + description: Percentage of requests on which the delay will be injected. + properties: + value: + format: double + type: number + type: object + type: object + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + authority: + description: 'HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + headers: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: The header keys must be lowercase and use hyphen as the separator, e.g. + type: object + ignoreUriCase: + description: Flag to specify whether the URI matching should be case-insensitive. + type: boolean + method: + description: 'HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + name: + description: The name assigned to a match. + type: string + port: + description: Specifies the ports on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + queryParams: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: Query parameters for matching. + type: object + scheme: + description: 'URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to source (client) workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + statPrefix: + description: The human readable prefix to use when emitting statistics for this route. + type: string + uri: + description: 'URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + withoutHeaders: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: withoutHeader has the same syntax with the header, but has opposite meaning. + type: object + type: object + type: array + mirror: + description: Mirror HTTP traffic to a another destination in addition to forwarding the requests to the intended destination. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mirror_percent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercentage: + description: Percentage of the traffic to be mirrored by the `mirror` field. + properties: + value: + format: double + type: number + type: object + mirrors: + description: Specifies the destinations to mirror HTTP traffic in addition to the original destination. + items: + properties: + destination: + description: Destination specifies the target of the mirror operation. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + percentage: + description: Percentage of the traffic to be mirrored by the `destination` field. + properties: + value: + format: double + type: number + type: object + required: + - destination + type: object + type: array + name: + description: The name assigned to the route for debugging purposes. + type: string + redirect: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + oneOf: + - not: + anyOf: + - required: + - port + - required: + - derivePort + - required: + - port + - required: + - derivePort + properties: + authority: + description: On a redirect, overwrite the Authority/Host portion of the URL with this value. + type: string + derivePort: + description: 'On a redirect, dynamically set the port: * FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and 443 for HTTPS. + + + Valid Options: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT' + enum: + - FROM_PROTOCOL_DEFAULT + - FROM_REQUEST_PORT + type: string + port: + description: On a redirect, overwrite the port portion of the URL with this value. + maximum: 4294967295 + minimum: 0 + type: integer + redirectCode: + description: On a redirect, Specifies the HTTP status code to use in the redirect response. + maximum: 4294967295 + minimum: 0 + type: integer + scheme: + description: On a redirect, overwrite the scheme portion of the URL with this value. + type: string + uri: + description: On a redirect, overwrite the Path portion of the URL with this value. + type: string + type: object + retries: + description: Retry policy for HTTP requests. + properties: + attempts: + description: Number of retries to be allowed for a given request. + format: int32 + type: integer + perTryTimeout: + description: Timeout per attempt for a given request, including the initial call and any retries. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + retryOn: + description: Specifies the conditions under which retry takes place. + type: string + retryRemoteLocalities: + description: Flag to specify whether the retries should retry to other localities. + nullable: true + type: boolean + type: object + rewrite: + description: Rewrite HTTP URIs and Authority headers. + properties: + authority: + description: rewrite the Authority/Host header with this value. + type: string + uri: + description: rewrite the path (or the prefix) portion of the URI with this value. + type: string + uriRegexRewrite: + description: rewrite the path portion of the URI with the specified regex. + properties: + match: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + rewrite: + description: The string that should replace into matching portions of original URI. + type: string + type: object + type: object + route: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + timeout: + description: Timeout for HTTP requests, default is disabled. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: array + tcp: + description: An ordered list of route rules for opaque TCP traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + sourceSubnet: + type: string + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + type: object + type: array + tls: + description: An ordered list of route rule for non-terminated TLS & HTTPS traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sniHosts: + description: SNI (server name indicator) to match on. + items: + type: string + type: array + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + required: + - sniHosts + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + required: + - match + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: The names of gateways and sidecars that should apply these routes + jsonPath: .spec.gateways + name: Gateways + type: string + - description: The destination hosts to which traffic is being sent + jsonPath: .spec.hosts + name: Hosts + type: string + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html' + properties: + exportTo: + description: A list of namespaces to which this virtual service is exported. + items: + type: string + type: array + gateways: + description: The names of gateways and sidecars that should apply these routes. + items: + type: string + type: array + hosts: + description: The destination hosts to which traffic is being sent. + items: + type: string + type: array + http: + description: An ordered list of route rules for HTTP traffic. + items: + properties: + corsPolicy: + description: Cross-Origin Resource Sharing policy (CORS). + properties: + allowCredentials: + description: Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. + nullable: true + type: boolean + allowHeaders: + description: List of HTTP headers that can be used when requesting the resource. + items: + type: string + type: array + allowMethods: + description: List of HTTP methods allowed to access the resource. + items: + type: string + type: array + allowOrigin: + items: + type: string + type: array + allowOrigins: + description: String patterns that match allowed origins. + items: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + type: array + exposeHeaders: + description: A list of HTTP headers that the browsers are allowed to access. + items: + type: string + type: array + maxAge: + description: Specifies how long the results of a preflight request can be cached. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + unmatchedPreflights: + description: 'Indicates whether preflight requests not matching the configured allowed origin shouldn''t be forwarded to the upstream. + + + Valid Options: FORWARD, IGNORE' + enum: + - UNSPECIFIED + - FORWARD + - IGNORE + type: string + type: object + delegate: + description: Delegate is used to specify the particular VirtualService which can be used to define delegate HTTPRoute. + properties: + name: + description: Name specifies the name of the delegate VirtualService. + type: string + namespace: + description: Namespace specifies the namespace where the delegate VirtualService resides. + type: string + type: object + directResponse: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + properties: + body: + description: Specifies the content of the response body. + oneOf: + - not: + anyOf: + - required: + - string + - required: + - bytes + - required: + - string + - required: + - bytes + properties: + bytes: + description: response body as base64 encoded bytes. + format: binary + type: string + string: + type: string + type: object + status: + description: Specifies the HTTP response status to be returned. + maximum: 4294967295 + minimum: 0 + type: integer + required: + - status + type: object + fault: + description: Fault injection policy to apply on HTTP traffic at the client side. + properties: + abort: + description: Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty. + oneOf: + - not: + anyOf: + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + - required: + - httpStatus + - required: + - grpcStatus + - required: + - http2Error + properties: + grpcStatus: + description: GRPC status code to use to abort the request. + type: string + http2Error: + type: string + httpStatus: + description: HTTP status code to use to abort the Http request. + format: int32 + type: integer + percentage: + description: Percentage of requests to be aborted with the error code provided. + properties: + value: + format: double + type: number + type: object + type: object + delay: + description: Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc. + oneOf: + - not: + anyOf: + - required: + - fixedDelay + - required: + - exponentialDelay + - required: + - fixedDelay + - required: + - exponentialDelay + properties: + exponentialDelay: + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + fixedDelay: + description: Add a fixed delay before forwarding the request. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + percent: + description: Percentage of requests on which the delay will be injected (0-100). + format: int32 + type: integer + percentage: + description: Percentage of requests on which the delay will be injected. + properties: + value: + format: double + type: number + type: object + type: object + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + authority: + description: 'HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + headers: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: The header keys must be lowercase and use hyphen as the separator, e.g. + type: object + ignoreUriCase: + description: Flag to specify whether the URI matching should be case-insensitive. + type: boolean + method: + description: 'HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + name: + description: The name assigned to a match. + type: string + port: + description: Specifies the ports on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + queryParams: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: Query parameters for matching. + type: object + scheme: + description: 'URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to source (client) workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + statPrefix: + description: The human readable prefix to use when emitting statistics for this route. + type: string + uri: + description: 'URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for [RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + withoutHeaders: + additionalProperties: + oneOf: + - not: + anyOf: + - required: + - exact + - required: + - prefix + - required: + - regex + - required: + - exact + - required: + - prefix + - required: + - regex + properties: + exact: + type: string + prefix: + type: string + regex: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + type: object + description: withoutHeader has the same syntax with the header, but has opposite meaning. + type: object + type: object + type: array + mirror: + description: Mirror HTTP traffic to a another destination in addition to forwarding the requests to the intended destination. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + mirror_percent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercent: + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + mirrorPercentage: + description: Percentage of the traffic to be mirrored by the `mirror` field. + properties: + value: + format: double + type: number + type: object + mirrors: + description: Specifies the destinations to mirror HTTP traffic in addition to the original destination. + items: + properties: + destination: + description: Destination specifies the target of the mirror operation. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + percentage: + description: Percentage of the traffic to be mirrored by the `destination` field. + properties: + value: + format: double + type: number + type: object + required: + - destination + type: object + type: array + name: + description: The name assigned to the route for debugging purposes. + type: string + redirect: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + oneOf: + - not: + anyOf: + - required: + - port + - required: + - derivePort + - required: + - port + - required: + - derivePort + properties: + authority: + description: On a redirect, overwrite the Authority/Host portion of the URL with this value. + type: string + derivePort: + description: 'On a redirect, dynamically set the port: * FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and 443 for HTTPS. + + + Valid Options: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT' + enum: + - FROM_PROTOCOL_DEFAULT + - FROM_REQUEST_PORT + type: string + port: + description: On a redirect, overwrite the port portion of the URL with this value. + maximum: 4294967295 + minimum: 0 + type: integer + redirectCode: + description: On a redirect, Specifies the HTTP status code to use in the redirect response. + maximum: 4294967295 + minimum: 0 + type: integer + scheme: + description: On a redirect, overwrite the scheme portion of the URL with this value. + type: string + uri: + description: On a redirect, overwrite the Path portion of the URL with this value. + type: string + type: object + retries: + description: Retry policy for HTTP requests. + properties: + attempts: + description: Number of retries to be allowed for a given request. + format: int32 + type: integer + perTryTimeout: + description: Timeout per attempt for a given request, including the initial call and any retries. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + retryOn: + description: Specifies the conditions under which retry takes place. + type: string + retryRemoteLocalities: + description: Flag to specify whether the retries should retry to other localities. + nullable: true + type: boolean + type: object + rewrite: + description: Rewrite HTTP URIs and Authority headers. + properties: + authority: + description: rewrite the Authority/Host header with this value. + type: string + uri: + description: rewrite the path (or the prefix) portion of the URI with this value. + type: string + uriRegexRewrite: + description: rewrite the path portion of the URI with the specified regex. + properties: + match: + description: '[RE2 style regex-based match](https://github.com/google/re2/wiki/Syntax).' + type: string + rewrite: + description: The string that should replace into matching portions of original URI. + type: string + type: object + type: object + route: + description: A HTTP rule can either return a direct_response, redirect or forward (default) traffic. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + headers: + properties: + request: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + response: + properties: + add: + additionalProperties: + type: string + type: object + remove: + items: + type: string + type: array + set: + additionalProperties: + type: string + type: object + type: object + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + timeout: + description: Timeout for HTTP requests, default is disabled. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object + type: array + tcp: + description: An ordered list of route rules for opaque TCP traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + sourceSubnet: + type: string + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + type: object + type: array + tls: + description: An ordered list of route rule for non-terminated TLS & HTTPS traffic. + items: + properties: + match: + description: Match conditions to be satisfied for the rule to be activated. + items: + properties: + destinationSubnets: + description: IPv4 or IPv6 ip addresses of destination with optional subnet. + items: + type: string + type: array + gateways: + description: Names of gateways where the rule should be applied. + items: + type: string + type: array + port: + description: Specifies the port on the host that is being addressed. + maximum: 4294967295 + minimum: 0 + type: integer + sniHosts: + description: SNI (server name indicator) to match on. + items: + type: string + type: array + sourceLabels: + additionalProperties: + type: string + description: One or more labels that constrain the applicability of a rule to workloads with the given labels. + type: object + sourceNamespace: + description: Source namespace constraining the applicability of a rule to workloads in that namespace. + type: string + required: + - sniHosts + type: object + type: array + route: + description: The destination to which the connection should be forwarded to. + items: + properties: + destination: + description: Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to. + properties: + host: + description: The name of a service from the service registry. + type: string + port: + description: Specifies the port on the host that is being addressed. + properties: + number: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + subset: + description: The name of a subset within the service. + type: string + required: + - host + type: object + weight: + description: Weight specifies the relative proportion of traffic to be forwarded to the destination. + format: int32 + type: integer + required: + - destination + type: object + type: array + required: + - match + type: object + type: array + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-wasmplugins.extensions.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-wasmplugins.extensions.istio.io.yaml new file mode 100644 index 0000000..dd9f79c --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-wasmplugins.extensions.istio.io.yaml @@ -0,0 +1,340 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: wasmplugins.extensions.istio.io +spec: + group: extensions.istio.io + names: + categories: + - istio-io + - extensions-istio-io + kind: WasmPlugin + listKind: WasmPluginList + plural: wasmplugins + singular: wasmplugin + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Extend the functionality provided by the Istio proxy through WebAssembly filters. See more details at: https://istio.io/docs/reference/config/proxy_extensions/wasm-plugin.html' + properties: + failStrategy: + description: 'Specifies the failure behavior for the plugin due to fatal errors. + + + Valid Options: FAIL_CLOSE, FAIL_OPEN' + enum: + - FAIL_CLOSE + - FAIL_OPEN + type: string + imagePullPolicy: + description: 'The pull behaviour to be applied when fetching Wasm module by either OCI image or `http/https`. + + + Valid Options: IfNotPresent, Always' + enum: + - UNSPECIFIED_POLICY + - IfNotPresent + - Always + type: string + imagePullSecret: + description: Credentials to use for OCI image pulling. + maxLength: 253 + minLength: 1 + type: string + match: + description: Specifies the criteria to determine which traffic is passed to WasmPlugin. + items: + properties: + mode: + description: 'Criteria for selecting traffic by their direction. + + + Valid Options: CLIENT, SERVER, CLIENT_AND_SERVER' + enum: + - UNDEFINED + - CLIENT + - SERVER + - CLIENT_AND_SERVER + type: string + ports: + description: Criteria for selecting traffic by their destination port. + items: + properties: + number: + maximum: 65535 + minimum: 1 + type: integer + required: + - number + type: object + type: array + x-kubernetes-list-map-keys: + - number + x-kubernetes-list-type: map + type: object + type: array + phase: + description: 'Determines where in the filter chain this `WasmPlugin` is to be injected. + + + Valid Options: AUTHN, AUTHZ, STATS' + enum: + - UNSPECIFIED_PHASE + - AUTHN + - AUTHZ + - STATS + type: string + pluginConfig: + description: The configuration that will be passed on to the plugin. + type: object + x-kubernetes-preserve-unknown-fields: true + pluginName: + description: The plugin name to be used in the Envoy configuration (used to be called `rootID`). + maxLength: 256 + minLength: 1 + type: string + priority: + description: Determines ordering of `WasmPlugins` in the same `phase`. + format: int32 + nullable: true + type: integer + selector: + description: Criteria used to select the specific set of pods/VMs on which this plugin configuration should be applied. + properties: + matchLabels: + additionalProperties: + maxLength: 63 + type: string + x-kubernetes-validations: + - message: wildcard not allowed in label value match + rule: '!self.contains(''*'')' + description: One or more labels that indicate a specific set of pods/VMs on which a policy should be applied. + maxProperties: 4096 + type: object + x-kubernetes-validations: + - message: wildcard not allowed in label key match + rule: self.all(key, !key.contains('*')) + - message: key must not be empty + rule: self.all(key, key.size() != 0) + type: object + sha256: + description: SHA256 checksum that will be used to verify Wasm module or OCI container. + pattern: (^$|^[a-f0-9]{64}$) + type: string + targetRef: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + targetRefs: + description: Optional. + items: + properties: + group: + description: group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: namespace is the namespace of the referent. + type: string + x-kubernetes-validations: + - message: cross namespace referencing is not currently supported + rule: self.size() == 0 + required: + - kind + - name + type: object + x-kubernetes-validations: + - message: Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway + rule: '[self.group, self.kind] in [[''core'',''Service''], ['''',''Service''], [''gateway.networking.k8s.io'',''Gateway''], [''networking.istio.io'',''ServiceEntry'']]' + maxItems: 16 + type: array + type: + description: 'Specifies the type of Wasm Extension to be used. + + + Valid Options: HTTP, NETWORK' + enum: + - UNSPECIFIED_PLUGIN_TYPE + - HTTP + - NETWORK + type: string + url: + description: URL of a Wasm module or OCI container. + minLength: 1 + type: string + x-kubernetes-validations: + - message: url must have schema one of [http, https, file, oci] + rule: 'isURL(self) ? (url(self).getScheme() in ['''', ''http'', ''https'', ''oci'', ''file'']) : (isURL(''http://'' + self) && url(''http://'' +self).getScheme() in ['''', ''http'', ''https'', ''oci'', ''file''])' + verificationKey: + type: string + vmConfig: + description: Configuration for a Wasm VM. + properties: + env: + description: Specifies environment variables to be injected to this VM. + items: + properties: + name: + description: Name of the environment variable. + maxLength: 256 + minLength: 1 + type: string + value: + description: Value for the environment variable. + maxLength: 2048 + type: string + valueFrom: + description: 'Source for the environment variable''s value. + + + Valid Options: INLINE, HOST' + enum: + - INLINE + - HOST + type: string + required: + - name + type: object + x-kubernetes-validations: + - message: value may only be set when valueFrom is INLINE + rule: '(has(self.valueFrom) ? self.valueFrom : '''') != ''HOST'' || !has(self.value)' + maxItems: 256 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - url + type: object + x-kubernetes-validations: + - message: only one of targetRefs or selector can be set + rule: (has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1 + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-workloadentries.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-workloadentries.networking.istio.io.yaml new file mode 100644 index 0000000..af4ed4a --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-workloadentries.networking.istio.io.yaml @@ -0,0 +1,446 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: workloadentries.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: WorkloadEntry + listKind: WorkloadEntryList + plural: workloadentries + shortNames: + - we + singular: workloadentry + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Address associated with the network endpoint. + jsonPath: .spec.address + name: Address + type: string + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting VMs onboarded into the mesh. See more details at: https://istio.io/docs/reference/config/networking/workload-entry.html' + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Address associated with the network endpoint. + jsonPath: .spec.address + name: Address + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting VMs onboarded into the mesh. See more details at: https://istio.io/docs/reference/config/networking/workload-entry.html' + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Address associated with the network endpoint. + jsonPath: .spec.address + name: Address + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Configuration affecting VMs onboarded into the mesh. See more details at: https://istio.io/docs/reference/config/networking/workload-entry.html' + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: Address is required + rule: has(self.address) || has(self.network) + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/customresourcedefinition-workloadgroups.networking.istio.io.yaml b/rmk/infrastructure/istio-base/customresourcedefinition-workloadgroups.networking.istio.io.yaml new file mode 100644 index 0000000..533a890 --- /dev/null +++ b/rmk/infrastructure/istio-base/customresourcedefinition-workloadgroups.networking.istio.io.yaml @@ -0,0 +1,807 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + app.kubernetes.io/instance: istio-base + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 + name: workloadgroups.networking.istio.io +spec: + group: networking.istio.io + names: + categories: + - istio-io + - networking-istio-io + kind: WorkloadGroup + listKind: WorkloadGroupList + plural: workloadgroups + shortNames: + - wg + singular: workloadgroup + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Describes a collection of workload instances. See more details at: https://istio.io/docs/reference/config/networking/workload-group.html' + properties: + metadata: + description: Metadata that will be used for all corresponding `WorkloadEntries`. + properties: + annotations: + additionalProperties: + type: string + maxProperties: 256 + type: object + labels: + additionalProperties: + type: string + maxProperties: 256 + type: object + type: object + probe: + description: '`ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.' + oneOf: + - not: + anyOf: + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + properties: + exec: + description: Health is determined by how the command that is executed exited. + properties: + command: + description: Command to run. + items: + minLength: 1 + type: string + type: array + required: + - command + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. + format: int32 + minimum: 0 + type: integer + httpGet: + description: '`httpGet` is performed to a given endpoint and the status/able to connect determines health.' + properties: + host: + description: Host name to connect to, defaults to the pod IP. + type: string + httpHeaders: + description: Headers the proxy will pass on to make the request. + items: + properties: + name: + pattern: ^[-_A-Za-z0-9]+$ + type: string + value: + type: string + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Port on which the endpoint lives. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + scheme: + type: string + x-kubernetes-validations: + - message: scheme must be one of [HTTP, HTTPS] + rule: self in ['', 'HTTP', 'HTTPS'] + required: + - port + type: object + initialDelaySeconds: + description: Number of seconds after the container has started before readiness probes are initiated. + format: int32 + minimum: 0 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 0 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. + format: int32 + minimum: 0 + type: integer + tcpSocket: + description: Health is determined by if the proxy is able to connect. + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - port + type: object + timeoutSeconds: + description: Number of seconds after which the probe times out. + format: int32 + minimum: 0 + type: integer + type: object + template: + description: Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`. + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + required: + - template + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha3 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Describes a collection of workload instances. See more details at: https://istio.io/docs/reference/config/networking/workload-group.html' + properties: + metadata: + description: Metadata that will be used for all corresponding `WorkloadEntries`. + properties: + annotations: + additionalProperties: + type: string + maxProperties: 256 + type: object + labels: + additionalProperties: + type: string + maxProperties: 256 + type: object + type: object + probe: + description: '`ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.' + oneOf: + - not: + anyOf: + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + properties: + exec: + description: Health is determined by how the command that is executed exited. + properties: + command: + description: Command to run. + items: + minLength: 1 + type: string + type: array + required: + - command + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. + format: int32 + minimum: 0 + type: integer + httpGet: + description: '`httpGet` is performed to a given endpoint and the status/able to connect determines health.' + properties: + host: + description: Host name to connect to, defaults to the pod IP. + type: string + httpHeaders: + description: Headers the proxy will pass on to make the request. + items: + properties: + name: + pattern: ^[-_A-Za-z0-9]+$ + type: string + value: + type: string + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Port on which the endpoint lives. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + scheme: + type: string + x-kubernetes-validations: + - message: scheme must be one of [HTTP, HTTPS] + rule: self in ['', 'HTTP', 'HTTPS'] + required: + - port + type: object + initialDelaySeconds: + description: Number of seconds after the container has started before readiness probes are initiated. + format: int32 + minimum: 0 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 0 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. + format: int32 + minimum: 0 + type: integer + tcpSocket: + description: Health is determined by if the proxy is able to connect. + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - port + type: object + timeoutSeconds: + description: Number of seconds after which the probe times out. + format: int32 + minimum: 0 + type: integer + type: object + template: + description: Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`. + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + required: + - template + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + spec: + description: 'Describes a collection of workload instances. See more details at: https://istio.io/docs/reference/config/networking/workload-group.html' + properties: + metadata: + description: Metadata that will be used for all corresponding `WorkloadEntries`. + properties: + annotations: + additionalProperties: + type: string + maxProperties: 256 + type: object + labels: + additionalProperties: + type: string + maxProperties: 256 + type: object + type: object + probe: + description: '`ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.' + oneOf: + - not: + anyOf: + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + - required: + - httpGet + - required: + - tcpSocket + - required: + - exec + properties: + exec: + description: Health is determined by how the command that is executed exited. + properties: + command: + description: Command to run. + items: + minLength: 1 + type: string + type: array + required: + - command + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. + format: int32 + minimum: 0 + type: integer + httpGet: + description: '`httpGet` is performed to a given endpoint and the status/able to connect determines health.' + properties: + host: + description: Host name to connect to, defaults to the pod IP. + type: string + httpHeaders: + description: Headers the proxy will pass on to make the request. + items: + properties: + name: + pattern: ^[-_A-Za-z0-9]+$ + type: string + value: + type: string + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Port on which the endpoint lives. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + scheme: + type: string + x-kubernetes-validations: + - message: scheme must be one of [HTTP, HTTPS] + rule: self in ['', 'HTTP', 'HTTPS'] + required: + - port + type: object + initialDelaySeconds: + description: Number of seconds after the container has started before readiness probes are initiated. + format: int32 + minimum: 0 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + format: int32 + minimum: 0 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. + format: int32 + minimum: 0 + type: integer + tcpSocket: + description: Health is determined by if the proxy is able to connect. + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + required: + - port + type: object + timeoutSeconds: + description: Number of seconds after which the probe times out. + format: int32 + minimum: 0 + type: integer + type: object + template: + description: Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`. + properties: + address: + description: Address associated with the network endpoint without the port. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: UDS must be an absolute path or abstract socket + rule: 'self.startsWith(''unix://'') ? (self.substring(7,8) == ''/'' || self.substring(7,8) == ''@'') : true' + - message: UDS may not be a dir + rule: 'self.startsWith(''unix://'') ? !self.endsWith(''/'') : true' + labels: + additionalProperties: + type: string + description: One or more labels associated with the endpoint. + maxProperties: 256 + type: object + locality: + description: The locality associated with the endpoint. + maxLength: 2048 + type: string + network: + description: Network enables Istio to group endpoints resident in the same L3 domain/network. + maxLength: 2048 + type: string + ports: + additionalProperties: + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 65535 + description: Set of ports associated with the endpoint. + maxProperties: 128 + type: object + x-kubernetes-validations: + - message: port name must be valid + rule: self.all(key, size(key) < 63 && key.matches('^[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?$')) + serviceAccount: + description: The service account associated with the workload if a sidecar is present in the workload. + maxLength: 253 + type: string + weight: + description: The load balancing weight associated with the endpoint. + maximum: 4294967295 + minimum: 0 + type: integer + type: object + x-kubernetes-validations: + - message: UDS may not include ports + rule: '(has(self.address) && self.address.startsWith(''unix://'')) ? !has(self.ports) : true' + required: + - template + type: object + status: + properties: + conditions: + description: Current service state of the resource. + items: + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's last transition. + type: string + status: + description: Status is the status of the condition. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + observedGeneration: + anyOf: + - type: integer + - type: string + description: Resource Generation to which the Reconciled Condition refers. + x-kubernetes-int-or-string: true + validationMessages: + description: Includes any errors or warnings detected by Istio's analyzers. + items: + properties: + documentationUrl: + description: A url pointing to the Istio documentation for this specific error type. + type: string + level: + description: 'Represents how severe a message is. + + + Valid Options: UNKNOWN, ERROR, WARNING, INFO' + enum: + - UNKNOWN + - ERROR + - WARNING + - INFO + type: string + type: + properties: + code: + description: A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. + type: string + name: + description: A human-readable name for the message type. + type: string + type: object + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/rmk/infrastructure/istio-base/namespace-gateway.yaml b/rmk/infrastructure/istio-base/namespace-gateway.yaml new file mode 100644 index 0000000..f1ab7c7 --- /dev/null +++ b/rmk/infrastructure/istio-base/namespace-gateway.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: gateway diff --git a/rmk/infrastructure/istio-base/namespace-istio-system.yaml b/rmk/infrastructure/istio-base/namespace-istio-system.yaml new file mode 100644 index 0000000..f394e91 --- /dev/null +++ b/rmk/infrastructure/istio-base/namespace-istio-system.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system diff --git a/rmk/infrastructure/istio-base/serviceaccount-istio-reader-service-account.yaml b/rmk/infrastructure/istio-base/serviceaccount-istio-reader-service-account.yaml new file mode 100644 index 0000000..0500d00 --- /dev/null +++ b/rmk/infrastructure/istio-base/serviceaccount-istio-reader-service-account.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ServiceAccount +imagePullSecrets: +- name: regcred +metadata: + name: istio-reader-service-account + namespace: istio-system + labels: + app: istio-reader + release: istio-base + app.kubernetes.io/name: istio-reader + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istio-base + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 diff --git a/rmk/infrastructure/istio-base/validatingwebhookconfiguration-istiod-default-validator.yaml b/rmk/infrastructure/istio-base/validatingwebhookconfiguration-istiod-default-validator.yaml new file mode 100644 index 0000000..82d4a1d --- /dev/null +++ b/rmk/infrastructure/istio-base/validatingwebhookconfiguration-istiod-default-validator.yaml @@ -0,0 +1,39 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: istiod-default-validator + labels: + app: istiod + release: istio-base + istio: istiod + istio.io/rev: default + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istio-base + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-base-contour-1.24.0 +webhooks: +- name: validation.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /validate + rules: + - operations: + - CREATE + - UPDATE + apiGroups: + - security.istio.io + - networking.istio.io + - telemetry.istio.io + - extensions.istio.io + apiVersions: + - '*' + resources: + - '*' + failurePolicy: Ignore + sideEffects: None + admissionReviewVersions: + - v1 diff --git a/rmk/infrastructure/istio-config/envoyfilter-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-add-traceparent.yaml new file mode 100644 index 0000000..b890146 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: attachments + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-auth-flow-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-auth-flow-add-traceparent.yaml new file mode 100644 index 0000000..a63f188 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-auth-flow-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: auth-flow + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-bi-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-bi-add-traceparent.yaml new file mode 100644 index 0000000..2b2695b --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-bi-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: bi + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-bim-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-bim-add-traceparent.yaml new file mode 100644 index 0000000..0c2a543 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-bim-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: bim + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-cde-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-cde-add-traceparent.yaml new file mode 100644 index 0000000..67d988e --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-cde-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: cde + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-checklists-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-checklists-add-traceparent.yaml new file mode 100644 index 0000000..1138c94 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-checklists-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: checklists + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-comparisons-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-comparisons-add-traceparent.yaml new file mode 100644 index 0000000..3555ae7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-comparisons-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: comparisons + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-contracts-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-contracts-add-traceparent.yaml new file mode 100644 index 0000000..df784ae --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-contracts-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: contracts + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-control-interface-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-control-interface-add-traceparent.yaml new file mode 100644 index 0000000..17196b7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-control-interface-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: control-interface + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-cors-json-401.yaml b/rmk/infrastructure/istio-config/envoyfilter-cors-json-401.yaml new file mode 100644 index 0000000..963d93a --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-cors-json-401.yaml @@ -0,0 +1,73 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: cors-json-401 + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.http.jwt_authn + patch: + operation: INSERT_BEFORE + value: + name: envoy.filters.http.cors + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors + cors: + allow_credentials: true + allow_headers: Authorization,Content-Type + allow_methods: GET,POST,PUT,PATCH,DELETE,OPTIONS + allow_origin_string_match: + - safe_regex: + regex: https://.*\.stand\.sarex\.tech + - safe_regex: + regex: https://localhost:.* + max_age: '86400' + - applyTo: NETWORK_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + patch: + operation: MERGE + value: + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + local_reply_config: + mappers: + - body: + inline_string: '{"error":"unauthorized","detail":"Invalid or expired token"} + + ' + filter: + status_code_filter: + comparison: + op: EQ + value: + default_value: 401 + runtime_key: default + headers_to_add: + - append_action: OVERWRITE_IF_EXISTS_OR_ADD + header: + key: Content-Type + value: application/json + - append_action: OVERWRITE_IF_EXISTS_OR_ADD + header: + key: Access-Control-Allow-Origin + value: '%REQ(Origin)%' + - append_action: OVERWRITE_IF_EXISTS_OR_ADD + header: + key: Access-Control-Allow-Credentials + value: 'true' diff --git a/rmk/infrastructure/istio-config/envoyfilter-cross-section-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-cross-section-add-traceparent.yaml new file mode 100644 index 0000000..cdb10ed --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-cross-section-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: cross-section + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-decode-zitadel-headers.yaml b/rmk/infrastructure/istio-config/envoyfilter-decode-zitadel-headers.yaml new file mode 100644 index 0000000..5c30486 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-decode-zitadel-headers.yaml @@ -0,0 +1,28 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: decode-zitadel-headers + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.router + patch: + operation: INSERT_BEFORE + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "function base64_decode(input)\n local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n input = input:gsub('[^'..b..'=]', '')\n local result = {}\n local bits = 0\n local acc = 0\n for i = 1, #input do\n local c = input:sub(i, i)\n if c == '=' then break end\n local idx = b:find(c, 1, true)\n if idx then\n acc = acc * 64 + (idx - 1)\n bits = bits + 6\n while bits >= 8 do\n bits = bits - 8\n local byte = math.floor(acc / (2 ^ bits)) % 256\n result[#result + 1] = string.char(byte)\n end\n end\n end\n return table.concat(result)\nend\n\nfunction is_numeric(value)\n return value ~= nil and value:match(\"^%d+$\") ~= nil\nend\n\nfunction decode_header_if_needed(handle, header_name)\n local value = handle:headers():get(header_name)\n if not value or value == \"\" then\n return\n end\n\n -- Если уже число (например \"1234\"), не декодируем\n if is_numeric(value) then\n return\n end\n\n local decoded = base64_decode(value)\n -- Отличие от prod: заменяем только на ожидаемый вид (id/список id),\n -- иначе удаляем заголовок — мусорные байты валят приложение\n -- (\"invalid header value for: x-user-id\").\n if decoded and decoded:match(\"^[%d,]+$\") then\n handle:headers():replace(header_name, decoded)\n else\n handle:headers():remove(header_name)\n end\nend\n\nfunction envoy_on_request(handle)\n decode_header_if_needed(handle, \"x-user-id\")\n decode_header_if_needed(handle, \"x-company-ids\")\nend\n" diff --git a/rmk/infrastructure/istio-config/envoyfilter-django-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-django-add-traceparent.yaml new file mode 100644 index 0000000..8f7b0eb --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-django-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: django + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-document-link-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-document-link-add-traceparent.yaml new file mode 100644 index 0000000..21f3067 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-document-link-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: document-link + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-documentations-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-documentations-add-traceparent.yaml new file mode 100644 index 0000000..2153a87 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-documentations-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: documentations + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-drawings-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-drawings-add-traceparent.yaml new file mode 100644 index 0000000..a367a20 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-drawings-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: drawings + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-eav-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-eav-add-traceparent.yaml new file mode 100644 index 0000000..6baec7e --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-eav-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: eav + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-faas-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-faas-add-traceparent.yaml new file mode 100644 index 0000000..8cf299d --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-faas-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: faas + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-flows-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-flows-add-traceparent.yaml new file mode 100644 index 0000000..34d5703 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-flows-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: flows + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-gateway-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-gateway-add-traceparent.yaml new file mode 100644 index 0000000..634e9b7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-gateway-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: gateway + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-gateway-hsts.yaml b/rmk/infrastructure/istio-config/envoyfilter-gateway-hsts.yaml new file mode 100644 index 0000000..acdf54d --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-gateway-hsts.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: gateway-hsts + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_ROUTE + match: + context: GATEWAY + patch: + operation: MERGE + value: + response_headers_to_add: + - append_action: OVERWRITE_IF_EXISTS_OR_ADD + header: + key: Strict-Transport-Security + value: max-age=31536000 diff --git a/rmk/infrastructure/istio-config/envoyfilter-iam-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-iam-add-traceparent.yaml new file mode 100644 index 0000000..ba7df72 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-iam-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: iam + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-inspections-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-inspections-add-traceparent.yaml new file mode 100644 index 0000000..ddd6a81 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-inspections-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: inspections + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-issues-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-issues-add-traceparent.yaml new file mode 100644 index 0000000..aebf518 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-issues-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: issues + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-mapper-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-mapper-add-traceparent.yaml new file mode 100644 index 0000000..9193d8f --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-mapper-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: mapper + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-measurements-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-measurements-add-traceparent.yaml new file mode 100644 index 0000000..99c24dd --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-measurements-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: measurements + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-message-hub-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-message-hub-add-traceparent.yaml new file mode 100644 index 0000000..1be7dab --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-message-hub-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: message-hub + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-notes-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-notes-add-traceparent.yaml new file mode 100644 index 0000000..2f161a7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-notes-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: notes + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-pm-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-pm-add-traceparent.yaml new file mode 100644 index 0000000..3ed24fb --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-pm-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: pm + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-prescriptions-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-prescriptions-add-traceparent.yaml new file mode 100644 index 0000000..08eda10 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-prescriptions-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: prescriptions + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-processing-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-processing-add-traceparent.yaml new file mode 100644 index 0000000..395d884 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-processing-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: processing + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-projects-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-projects-add-traceparent.yaml new file mode 100644 index 0000000..3799483 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-projects-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: projects + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-remarks-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-remarks-add-traceparent.yaml new file mode 100644 index 0000000..2d8eb29 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-remarks-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: remarks + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-reviews-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-reviews-add-traceparent.yaml new file mode 100644 index 0000000..c968478 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-reviews-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: reviews + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-rfi-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-rfi-add-traceparent.yaml new file mode 100644 index 0000000..35479a9 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-rfi-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: rfi + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-set-auth-type-header.yaml b/rmk/infrastructure/istio-config/envoyfilter-set-auth-type-header.yaml new file mode 100644 index 0000000..7378dea --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-set-auth-type-header.yaml @@ -0,0 +1,28 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: set-auth-type-header + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.router + patch: + operation: INSERT_BEFORE + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "local function detect_auth_type(authz)\n if not authz or authz == \"\" then\n return \"no\"\n end\n if authz:match(\"^Basic%s+\") then\n return \"basic\"\n end\n if authz:match(\"^Bearer%s+\") then\n return \"jwt\"\n end\n return \"no\"\nend\n\nfunction envoy_on_request(handle)\n local auth_type = detect_auth_type(handle:headers():get(\"authorization\"))\n handle:headers():replace(\"x-auth-type\", auth_type)\n handle:streamInfo():dynamicMetadata():set(\"sarex.auth_type\", \"value\", auth_type)\nend\n\nfunction envoy_on_response(handle)\n local auth_type = \"no\"\n local md = handle:streamInfo():dynamicMetadata():get(\"sarex.auth_type\")\n if md and md[\"value\"] and md[\"value\"] ~= \"\" then\n auth_type = md[\"value\"]\n end\n handle:headers():replace(\"x-auth-type\", auth_type)\nend\n" diff --git a/rmk/infrastructure/istio-config/envoyfilter-stamp-verification-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-stamp-verification-add-traceparent.yaml new file mode 100644 index 0000000..a7ff2e7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-stamp-verification-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: stamp-verification + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-hosts.yaml b/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-hosts.yaml new file mode 100644 index 0000000..5340d31 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-hosts.yaml @@ -0,0 +1,44 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: strip-jwt-on-public-hosts + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.jwt_authn + patch: + operation: INSERT_BEFORE + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "local public_hosts = {\n [\"login.stand.sarex.tech\"] = true,\n [\"bi.stand.sarex.tech\"] = true,\n [\"document-link.stand.sarex.tech\"] = true,\n [\"camunda-keycloak.stand.sarex.tech\"] = true,\n [\"camunda-identity.stand.sarex.tech\"] = true,\n [\"camunda-operate.stand.sarex.tech\"] = true,\n [\"camunda-optimize.stand.sarex.tech\"] = true,\n [\"camunda-tasklist.stand.sarex.tech\"] = true,\n}\n\nlocal public_paths = {\n \"^/documentations/api/v1/public/qr\",\n \"^/documentations/api/v1/public/documents/public_link\",\n}\n\nlocal function is_public(host, path)\n if not host then return false end\n host = string.gsub(host, \":%d+$\", \"\")\n if public_hosts[host] then\n return true\n end\n if path then\n for _,pref in ipairs(public_paths) do\n if string.find(path, pref) == 1 then\n return true\n end\n end\n end\n return false\nend\n\nfunction envoy_on_request(handle)\n local h = handle:headers()\n local host = h:get(\":authority\")\n local path = h:get(\":path\")\n if is_public(host, path) then\n local auth = h:get(\"authorization\")\n if auth then\n h:replace(\"x-orig-authorization\", auth)\n h:remove(\"authorization\")\n end\n end\nend\n" + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.jwt_authn + patch: + operation: INSERT_AFTER + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "function envoy_on_request(handle)\n local h = handle:headers()\n local xauth = h:get(\"x-orig-authorization\")\n if xauth and not h:get(\"authorization\") then\n h:replace(\"authorization\", xauth)\n h:remove(\"x-orig-authorization\")\n end\nend\n" diff --git a/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-paths.yaml b/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-paths.yaml new file mode 100644 index 0000000..0e203b7 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-strip-jwt-on-public-paths.yaml @@ -0,0 +1,44 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: strip-jwt-on-public-paths + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + workloadSelector: + labels: + istio: ingressgateway + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.jwt_authn + patch: + operation: INSERT_BEFORE + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "local public_prefixes = {\n \"^/documentations/api/v1/public/qr\",\n \"^/documentations/api/v1/public/documents/public_link\"\n}\n\nlocal download_prefixes = {\n \"^/files/api/v1/documents/folders\",\n \"^/files/api/v1/documents\",\n \"^/files/api/v1/bundles\"\n}\n\nlocal function starts_with_any(path, prefixes)\n for _, pref in ipairs(prefixes) do\n if string.find(path, pref) == 1 then\n return true\n end\n end\n return false\nend\n\nlocal function has_download_type(path)\n if not path or path == \"\" then\n return false\n end\n return string.match(path, \"[%?&]download_type=\") ~= nil\nend\n\nlocal function should_strip(path)\n if not path then\n return false\n end\n\n if starts_with_any(path, public_prefixes) then\n return true\n end\n\n if starts_with_any(path, download_prefixes) and has_download_type(path) then\n return true\n end\n\n return false\nend\n\nfunction envoy_on_request(handle)\n local h = handle:headers()\n local p = h:get(\":path\") or \"\"\n\n if should_strip(p) then\n local auth = h:get(\"authorization\")\n if auth then\n h:replace(\"x-orig-authorization-public-paths\", auth)\n h:remove(\"authorization\")\n end\n\n local identity = h:get(\"identity\")\n if identity then\n h:replace(\"x-orig-identity-public-paths\", identity)\n h:remove(\"identity\")\n end\n\n h:replace(\"x-jwt-stripped-public-paths\", \"1\")\n end\nend\n" + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + subFilter: + name: envoy.filters.http.jwt_authn + patch: + operation: INSERT_AFTER + value: + name: envoy.filters.http.lua + typed_config: + '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + inlineCode: "function envoy_on_request(handle)\n local h = handle:headers()\n local stripped = h:get(\"x-jwt-stripped-public-paths\")\n\n if stripped == \"1\" then\n local xauth = h:get(\"x-orig-authorization-public-paths\")\n if xauth and not h:get(\"authorization\") then\n h:replace(\"authorization\", xauth)\n end\n h:remove(\"x-orig-authorization-public-paths\")\n\n local xidentity = h:get(\"x-orig-identity-public-paths\")\n if xidentity and not h:get(\"identity\") then\n h:replace(\"identity\", xidentity)\n end\n h:remove(\"x-orig-identity-public-paths\")\n\n h:remove(\"x-jwt-stripped-public-paths\")\n end\nend\n" diff --git a/rmk/infrastructure/istio-config/envoyfilter-subscriptions-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-subscriptions-add-traceparent.yaml new file mode 100644 index 0000000..8d72a90 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-subscriptions-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: subscriptions + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-system-log-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-system-log-add-traceparent.yaml new file mode 100644 index 0000000..8151fbc --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-system-log-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: system-log + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-transmittal-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-transmittal-add-traceparent.yaml new file mode 100644 index 0000000..4346718 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-transmittal-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: transmittal + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/envoyfilter-workspaces-add-traceparent.yaml b/rmk/infrastructure/istio-config/envoyfilter-workspaces-add-traceparent.yaml new file mode 100644 index 0000000..f460573 --- /dev/null +++ b/rmk/infrastructure/istio-config/envoyfilter-workspaces-add-traceparent.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-traceparent + namespace: workspaces + labels: + app.kubernetes.io/managed-by: Helm +spec: + configPatches: + - applyTo: ROUTE_CONFIGURATION + match: + context: SIDECAR_INBOUND + patch: + operation: MERGE + value: + request_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 + response_headers_to_add: + - append: false + header: + key: traceparent + value: 00-%REQ(x-b3-traceid)%-%REQ(x-b3-spanid)%-01 diff --git a/rmk/infrastructure/istio-config/gateway-platform-gateway.yaml b/rmk/infrastructure/istio-config/gateway-platform-gateway.yaml new file mode 100644 index 0000000..0c31ad3 --- /dev/null +++ b/rmk/infrastructure/istio-config/gateway-platform-gateway.yaml @@ -0,0 +1,59 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + name: platform-gateway + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + selector: + istio: ingressgateway + servers: + - hosts: + - sarex.stand.sarex.tech + - login.stand.sarex.tech + - bi.stand.sarex.tech + - sarex-stamp-verification.stand.sarex.tech + - s3.stand.sarex.tech + - document-link.stand.sarex.tech + port: + name: stand-sarex-tech-https-443 + number: 443 + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: stand-sarex-tls + - hosts: + - sarex.stand.sarex.tech + - login.stand.sarex.tech + - bi.stand.sarex.tech + - sarex-stamp-verification.stand.sarex.tech + - s3.stand.sarex.tech + - document-link.stand.sarex.tech + port: + name: stand-sarex-tech-http-80 + number: 80 + protocol: HTTP + - hosts: + - camunda-operate.stand.sarex.tech + - camunda-keycloak.stand.sarex.tech + - camunda-identity.stand.sarex.tech + - camunda-optimize.stand.sarex.tech + - camunda-tasklist.stand.sarex.tech + port: + name: camunda-operate-stand-sarex-tech-https-443 + number: 443 + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: stand-camunda-tls + - hosts: + - camunda-operate.stand.sarex.tech + - camunda-keycloak.stand.sarex.tech + - camunda-identity.stand.sarex.tech + - camunda-optimize.stand.sarex.tech + - camunda-tasklist.stand.sarex.tech + port: + name: camunda-operate-stand-sarex-tech-http-80 + number: 80 + protocol: HTTP diff --git a/rmk/infrastructure/istio-config/requestauthentication-api-jwt.yaml b/rmk/infrastructure/istio-config/requestauthentication-api-jwt.yaml new file mode 100644 index 0000000..8645358 --- /dev/null +++ b/rmk/infrastructure/istio-config/requestauthentication-api-jwt.yaml @@ -0,0 +1,15 @@ +apiVersion: security.istio.io/v1beta1 +kind: RequestAuthentication +metadata: + name: api-jwt + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + istio: ingressgateway + jwtRules: + - issuer: default_issuer + jwks: "{\n \"keys\": [\n {\n \"kty\": \"RSA\",\n \"kid\": \"s57i--vgmVINy1H4Ud7ZxMhudCPY7GqT6dqCIWyG7io\",\n \"use\": \"sig\",\n \"alg\": \"RS512\",\n \"n\": \"tJdh3c-S2vXMGqPI9X0nYo-J006LxYOExkmRN_7UrALoUGyCN0yOZi6jpcUAWbG-0i-tNfjlzk8rA0z3nYuWaq0dXBIUvl3awJwMXPcjr0IKzAJNfNisg6clRoeoxUBEfu5nNjOkzKnvSZft_X-Jchtc_qIm4itfbBYbQBHeb5ROnjV6tjUgumagsTeA8ApMlYS0fP0W34xkDdtxd4SipRGvrRaDR0aqPzC9CmXXZ0-hQXNsGb-9wlQQmDVXvUlL2fQ7FcUK49Oz2_cr4PUC5ucxWz9VLYRgZSVuNau1CX5jBDlOJXLECVsEKWbYpjwmRh3slA_-yQfhPVAoEJ095uDDoVZ2Wf_KE6iVq9gI5hylDpJicAeDa11e8nNztF9Jt6SqRjiETFXbGEaJzizfAmC7A0b2YaoxsymusuPLyo1q2rIlGiX5_GiModx3tcDa2wA7Z_1UsJgRQ6g3CHo3gnOc6u8tt3etduTMxbVoBvM4bHtLHxsSGoY7sM-e-Y7h0THSEAtAo44h0OFef_wIvpsr5spGDdWwb3Ff8rbegkiFt1wQ8J2-oTXvcvrgaUrxedw5Eb3acFT7biYGDFHJOPcQVvdBfANIMZu2pcGi5aHvBxZrMEFIIOTlFgBZI4D5_ZpIa_L_eeD2-UgBLrIBTHvJa8hj1-btQUmr4Ub35I0\",\n \"e\": \"AQAB\"\n }\n ]\n}\n" + forwardOriginalToken: true diff --git a/rmk/infrastructure/istio-config/requestauthentication-zitadel-jwt.yaml b/rmk/infrastructure/istio-config/requestauthentication-zitadel-jwt.yaml new file mode 100644 index 0000000..0cefbed --- /dev/null +++ b/rmk/infrastructure/istio-config/requestauthentication-zitadel-jwt.yaml @@ -0,0 +1,15 @@ +apiVersion: security.istio.io/v1beta1 +kind: RequestAuthentication +metadata: + name: zitadel-jwt + namespace: istio-system + labels: + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + istio: ingressgateway + jwtRules: + - issuer: https://login.stand.sarex.tech + jwksUri: http://login.stand.sarex.tech:8080/oauth/v2/keys + forwardOriginalToken: true diff --git a/rmk/infrastructure/istio-config/serviceentry-minio-external.yaml b/rmk/infrastructure/istio-config/serviceentry-minio-external.yaml new file mode 100644 index 0000000..f9d9448 --- /dev/null +++ b/rmk/infrastructure/istio-config/serviceentry-minio-external.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.istio.io/v1beta1 +kind: ServiceEntry +metadata: + name: minio-external + namespace: default +spec: + hosts: + - minio.stand.external + location: MESH_EXTERNAL + resolution: STATIC + ports: + - number: 9000 + name: http + protocol: HTTP + endpoints: + - address: 192.0.2.10 diff --git a/rmk/infrastructure/istio-config/serviceentry-zitadel-jwks.yaml b/rmk/infrastructure/istio-config/serviceentry-zitadel-jwks.yaml new file mode 100644 index 0000000..d354e98 --- /dev/null +++ b/rmk/infrastructure/istio-config/serviceentry-zitadel-jwks.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1beta1 +kind: ServiceEntry +metadata: + name: zitadel-jwks + namespace: default +spec: + hosts: + - login.stand.sarex.tech + location: MESH_INTERNAL + resolution: DNS + ports: + - number: 8080 + name: http + protocol: HTTP + endpoints: + - address: zitadel-idp-contour.zitadel.svc.cluster.local + ports: + http: 8080 diff --git a/rmk/infrastructure/istio-config/virtualservice-admin-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-admin-frontend.yaml new file mode 100644 index 0000000..3296f27 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-admin-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: admin-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /admin-frontend/static/ + rewrite: + uri: / + route: + - destination: + host: admin-frontend-svc.control-interface.svc.cluster.local + port: + number: 8080 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-auth-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-auth-frontend.yaml new file mode 100644 index 0000000..139764d --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-auth-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: auth-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /auth/callback + rewrite: + uri: / + route: + - destination: + host: frontend-svc.auth-flow.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-bi-api.yaml b/rmk/infrastructure/istio-config/virtualservice-bi-api.yaml new file mode 100644 index 0000000..02b00d6 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-bi-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: bi-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /analytics-v2/api/ + rewrite: + uri: /api/ + route: + - destination: + host: bi-backend-service.bi.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-bi-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-bi-frontend.yaml new file mode 100644 index 0000000..6299650 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-bi-frontend.yaml @@ -0,0 +1,63 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: bi-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /analytics-v2/static/ + rewrite: + uri: / + route: + - destination: + host: bi-frontend-frontend-svc.bi.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /analytics-v2/ + rewrite: + uri: / + route: + - destination: + host: bi-frontend-frontend-svc.bi.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-bim-api.yaml b/rmk/infrastructure/istio-config/virtualservice-bim-api.yaml new file mode 100644 index 0000000..5075fd1 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-bim-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: bim-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /bimv2/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.bim.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-camunda-identity.yaml b/rmk/infrastructure/istio-config/virtualservice-camunda-identity.yaml new file mode 100644 index 0000000..53be8de --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-camunda-identity.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: camunda-identity + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - camunda-identity.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: camunda-identity.camunda.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-camunda-keycloak.yaml b/rmk/infrastructure/istio-config/virtualservice-camunda-keycloak.yaml new file mode 100644 index 0000000..8919a0c --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-camunda-keycloak.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: camunda-keycloak + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - camunda-keycloak.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: camunda-keycloak.camunda.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-camunda-operate.yaml b/rmk/infrastructure/istio-config/virtualservice-camunda-operate.yaml new file mode 100644 index 0000000..9f231c0 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-camunda-operate.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: camunda-operate + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - camunda-operate.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: camunda-operate.camunda.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-camunda-optimize.yaml b/rmk/infrastructure/istio-config/virtualservice-camunda-optimize.yaml new file mode 100644 index 0000000..36a8df0 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-camunda-optimize.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: camunda-optimize + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - camunda-optimize.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: camunda-optimize.camunda.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-camunda-tasklist.yaml b/rmk/infrastructure/istio-config/virtualservice-camunda-tasklist.yaml new file mode 100644 index 0000000..214438f --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-camunda-tasklist.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: camunda-tasklist + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - camunda-tasklist.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: camunda-tasklist.camunda.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-cde-api.yaml b/rmk/infrastructure/istio-config/virtualservice-cde-api.yaml new file mode 100644 index 0000000..6e1090c --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-cde-api.yaml @@ -0,0 +1,88 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: cde-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /orchestrator/api/process/ + rewrite: + uri: /api/process/ + route: + - destination: + host: cde-svc.cde.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /orchestrator/api/sign + rewrite: + uri: /api/sign + route: + - destination: + host: cde-svc.cde.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /orchestrator/ + rewrite: + uri: /api/ + route: + - destination: + host: cde-svc.cde.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-checklists-api.yaml b/rmk/infrastructure/istio-config/virtualservice-checklists-api.yaml new file mode 100644 index 0000000..1feae88 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-checklists-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: checklists-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /checklists/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.checklists.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-comparisons-api.yaml b/rmk/infrastructure/istio-config/virtualservice-comparisons-api.yaml new file mode 100644 index 0000000..3b76ba4 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-comparisons-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: comparisons-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /comparisons/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-service.comparisons.svc.cluster.local + port: + number: 8000 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-comparisons-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-comparisons-frontend.yaml new file mode 100644 index 0000000..ee52f3f --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-comparisons-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: comparisons-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /comparisons/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-service.comparisons.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-cross-section-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-cross-section-frontend.yaml new file mode 100644 index 0000000..a238a6e --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-cross-section-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: cross-section-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /cross-section/static/ + rewrite: + uri: / + route: + - destination: + host: cross-section-static.cross-section.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-document-link.yaml b/rmk/infrastructure/istio-config/virtualservice-document-link.yaml new file mode 100644 index 0000000..d23bce0 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-document-link.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: document-link + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - document-link.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: frontend-service.document-link.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-documentations-api.yaml b/rmk/infrastructure/istio-config/virtualservice-documentations-api.yaml new file mode 100644 index 0000000..949b484 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-documentations-api.yaml @@ -0,0 +1,42 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: documentations-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /documentations/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-api-svc.documentations.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - exact: '*' + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + - HEAD + allowHeaders: + - Authorization + - Content-Type + - Identity + - Range + - Cache-control + allowCredentials: true + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-documentations-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-documentations-frontend.yaml new file mode 100644 index 0000000..96bf54a --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-documentations-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: documentations-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /documentations/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.documentations.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-eav-api.yaml b/rmk/infrastructure/istio-config/virtualservice-eav-api.yaml new file mode 100644 index 0000000..8c90570 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-eav-api.yaml @@ -0,0 +1,163 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: eav-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /eav/api/v0 + rewrite: + uri: /api/v4 + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /eav/api/v2 + rewrite: + uri: /api/v5 + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /eav/api/v3 + rewrite: + uri: /api/v3 + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /eav/api/v4 + rewrite: + uri: /api/v4 + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /eav/api/v1 + rewrite: + uri: /api/v6 + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /eav/admin/ + rewrite: + uri: /eav/admin/ + route: + - destination: + host: backend-svc.eav.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-filestream-api.yaml b/rmk/infrastructure/istio-config/virtualservice-filestream-api.yaml new file mode 100644 index 0000000..8f428c5 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-filestream-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: filestream-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /files/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-filestream-svc.documentations.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-flows-api.yaml b/rmk/infrastructure/istio-config/virtualservice-flows-api.yaml new file mode 100644 index 0000000..b65887a --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-flows-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: flows-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /flows/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.flows.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-flows-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-flows-frontend.yaml new file mode 100644 index 0000000..c88f0e4 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-flows-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: flows-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /flows/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.flows.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-gateway-platform.yaml b/rmk/infrastructure/istio-config/virtualservice-gateway-platform.yaml new file mode 100644 index 0000000..6051df9 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-gateway-platform.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: gateway-platform + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /gateway/ + rewrite: + uri: / + route: + - destination: + host: pdm-svc.documentations.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-iam-api.yaml b/rmk/infrastructure/istio-config/virtualservice-iam-api.yaml new file mode 100644 index 0000000..9f121d3 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-iam-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: iam-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /iam/api/ + rewrite: + uri: /external/api/ + route: + - destination: + host: iam-backend.iam.svc.cluster.local + port: + number: 8000 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-inspections-api.yaml b/rmk/infrastructure/istio-config/virtualservice-inspections-api.yaml new file mode 100644 index 0000000..9e4fd34 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-inspections-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: inspections-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /inspections/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.inspections.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-issues-api.yaml b/rmk/infrastructure/istio-config/virtualservice-issues-api.yaml new file mode 100644 index 0000000..d8d4ddc --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-issues-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: issues-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /issues/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.issues.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-issues-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-issues-frontend.yaml new file mode 100644 index 0000000..66a3736 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-issues-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: issues-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /issues/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.issues.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-mapper-api.yaml b/rmk/infrastructure/istio-config/virtualservice-mapper-api.yaml new file mode 100644 index 0000000..8e91f58 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-mapper-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: mapper-api + namespace: gateway + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /mapper/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.mapper.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-notes-api.yaml b/rmk/infrastructure/istio-config/virtualservice-notes-api.yaml new file mode 100644 index 0000000..e0c1193 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-notes-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: notes-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /notes/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-service.notes.svc.cluster.local + port: + number: 8000 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-notes-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-notes-frontend.yaml new file mode 100644 index 0000000..95482dd --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-notes-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: notes-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /notes/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-service.notes.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-platform.yaml b/rmk/infrastructure/istio-config/virtualservice-platform.yaml new file mode 100644 index 0000000..174d0c1 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-platform.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: platform + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: frontend-svc.django.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-pm.yaml b/rmk/infrastructure/istio-config/virtualservice-pm.yaml new file mode 100644 index 0000000..95c8787 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-pm.yaml @@ -0,0 +1,63 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: pm + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /pm/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.pm.svc.cluster.local + port: + number: 8000 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h + - match: + - uri: + prefix: /pm/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.pm.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-remarks-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-remarks-frontend.yaml new file mode 100644 index 0000000..2ac7690 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-remarks-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: remarks-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /remarks/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-service.remarks.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-reviews-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-reviews-frontend.yaml new file mode 100644 index 0000000..6fa3b99 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-reviews-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: reviews-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /reviews/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.reviews.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-rfi-api.yaml b/rmk/infrastructure/istio-config/virtualservice-rfi-api.yaml new file mode 100644 index 0000000..d2762bb --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-rfi-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: rfi-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /rfi/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.rfi.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-rfi-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-rfi-frontend.yaml new file mode 100644 index 0000000..42f49d7 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-rfi-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: rfi-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /rfi/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.rfi.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-s3-proxy-media.yaml b/rmk/infrastructure/istio-config/virtualservice-s3-proxy-media.yaml new file mode 100644 index 0000000..223ecb9 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-s3-proxy-media.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: s3-proxy-media + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /media/ + rewrite: + uri: / + route: + - destination: + host: s3-proxy-svc.django.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-s3.yaml b/rmk/infrastructure/istio-config/virtualservice-s3.yaml new file mode 100644 index 0000000..1587381 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-s3.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: s3 + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - s3.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: minio.stand.external + port: + number: 9000 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-srx-admin-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-srx-admin-frontend.yaml new file mode 100644 index 0000000..4011036 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-srx-admin-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: srx-admin-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /control-interface/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.control-interface.svc.cluster.local + port: + number: 8080 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-stamp-verification.yaml b/rmk/infrastructure/istio-config/virtualservice-stamp-verification.yaml new file mode 100644 index 0000000..4307271 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-stamp-verification.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: stamp-verification + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex-stamp-verification.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: frontend-service.stamp-verification.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-superset.yaml b/rmk/infrastructure/istio-config/virtualservice-superset.yaml new file mode 100644 index 0000000..9899949 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-superset.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: superset + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - bi.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: superset.superset.svc.cluster.local + port: + number: 8088 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-transmittal-frontend.yaml b/rmk/infrastructure/istio-config/virtualservice-transmittal-frontend.yaml new file mode 100644 index 0000000..55ee24a --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-transmittal-frontend.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: transmittal-frontend + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /transmittal/static/ + rewrite: + uri: / + route: + - destination: + host: frontend-svc.transmittal.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-transmittals-api.yaml b/rmk/infrastructure/istio-config/virtualservice-transmittals-api.yaml new file mode 100644 index 0000000..ea0920a --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-transmittals-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: transmittals-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /transmittals/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.transmittal.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-workflows-api.yaml b/rmk/infrastructure/istio-config/virtualservice-workflows-api.yaml new file mode 100644 index 0000000..6002f87 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-workflows-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: workflows-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /workflows/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.processing.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-workspaces-api.yaml b/rmk/infrastructure/istio-config/virtualservice-workspaces-api.yaml new file mode 100644 index 0000000..7261ce5 --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-workspaces-api.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: workspaces-api + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /workspaces/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.workspaces.svc.cluster.local + port: + number: 80 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-config/virtualservice-zitadel.yaml b/rmk/infrastructure/istio-config/virtualservice-zitadel.yaml new file mode 100644 index 0000000..b01ec6a --- /dev/null +++ b/rmk/infrastructure/istio-config/virtualservice-zitadel.yaml @@ -0,0 +1,36 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: zitadel + namespace: default + labels: + app.kubernetes.io/managed-by: Helm +spec: + hosts: + - login.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: zitadel-idp-contour.zitadel.svc.cluster.local + port: + number: 8080 + corsPolicy: + allowOrigins: + - regex: (https://.*\.sarex\.io)|(https://localhost:.*) + allowMethods: + - POST + - GET + - OPTIONS + - PUT + - DELETE + - PATCH + allowHeaders: + - Authorization + - Content-Type + - Identity + maxAge: 24h diff --git a/rmk/infrastructure/istio-gateway/deployment-ingressgateway.yaml b/rmk/infrastructure/istio-gateway/deployment-ingressgateway.yaml new file mode 100644 index 0000000..14be530 --- /dev/null +++ b/rmk/infrastructure/istio-gateway/deployment-ingressgateway.yaml @@ -0,0 +1,96 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ingressgateway + namespace: istio-system + labels: + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + app: ingressgateway + istio: ingressgateway + annotations: {} +spec: + replicas: 1 + selector: + matchLabels: + app: ingressgateway + istio: ingressgateway + template: + metadata: + annotations: + inject.istio.io/templates: gateway + prometheus.io/path: /stats/prometheus + prometheus.io/port: '15020' + prometheus.io/scrape: 'true' + sidecar.istio.io/inject: 'false' + labels: + sidecar.istio.io/inject: 'true' + app: ingressgateway + istio: ingressgateway + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + spec: + imagePullSecrets: + - name: regcred + serviceAccountName: ingressgateway + securityContext: + sysctls: + - name: net.ipv4.ip_unprivileged_port_start + value: '0' + containers: + - name: istio-proxy + image: auto + securityContext: + capabilities: + drop: + - ALL + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsUser: 1337 + runAsGroup: 1337 + runAsNonRoot: true + env: null + ports: + - containerPort: 15090 + protocol: TCP + name: http-envoy-prom + - name: http2 + containerPort: 80 + hostPort: 80 + protocol: TCP + - name: https + containerPort: 443 + hostPort: 443 + protocol: TCP + resources: + limits: + cpu: 2000m + memory: 1024Mi + requests: + cpu: 100m + memory: 128Mi + nodeSelector: + node-role.kubernetes.io/control-plane: '' + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: Exists + - matchExpressions: + - key: node-role.kubernetes.io/master + operator: Exists + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + terminationGracePeriodSeconds: 30 diff --git a/rmk/infrastructure/istio-gateway/role-ingressgateway.yaml b/rmk/infrastructure/istio-gateway/role-ingressgateway.yaml new file mode 100644 index 0000000..75ca718 --- /dev/null +++ b/rmk/infrastructure/istio-gateway/role-ingressgateway.yaml @@ -0,0 +1,24 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ingressgateway + namespace: istio-system + labels: + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + app: ingressgateway + istio: ingressgateway + annotations: {} +rules: +- apiGroups: + - '' + resources: + - secrets + verbs: + - get + - watch + - list diff --git a/rmk/infrastructure/istio-gateway/rolebinding-ingressgateway.yaml b/rmk/infrastructure/istio-gateway/rolebinding-ingressgateway.yaml new file mode 100644 index 0000000..70e25dd --- /dev/null +++ b/rmk/infrastructure/istio-gateway/rolebinding-ingressgateway.yaml @@ -0,0 +1,22 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: ingressgateway + namespace: istio-system + labels: + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + app: ingressgateway + istio: ingressgateway + annotations: {} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: ingressgateway +subjects: +- kind: ServiceAccount + name: ingressgateway diff --git a/rmk/infrastructure/istio-gateway/service-ingressgateway.yaml b/rmk/infrastructure/istio-gateway/service-ingressgateway.yaml new file mode 100644 index 0000000..0af09f3 --- /dev/null +++ b/rmk/infrastructure/istio-gateway/service-ingressgateway.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Service +metadata: + name: ingressgateway + namespace: istio-system + labels: + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + app: ingressgateway + istio: ingressgateway + annotations: {} +spec: + type: NodePort + ports: + - name: status-port + port: 15021 + protocol: TCP + targetPort: 15021 + - name: http2 + nodePort: 30080 + port: 80 + protocol: TCP + targetPort: 80 + - name: https + nodePort: 30443 + port: 443 + protocol: TCP + targetPort: 443 + selector: + app: ingressgateway + istio: ingressgateway diff --git a/rmk/infrastructure/istio-gateway/serviceaccount-ingressgateway.yaml b/rmk/infrastructure/istio-gateway/serviceaccount-ingressgateway.yaml new file mode 100644 index 0000000..fb4b8a7 --- /dev/null +++ b/rmk/infrastructure/istio-gateway/serviceaccount-ingressgateway.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ingressgateway + namespace: istio-system + labels: + app.kubernetes.io/name: ingressgateway + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: ingressgateway + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istio-gateway-contour-1.24.0 + app: ingressgateway + istio: ingressgateway diff --git a/rmk/infrastructure/istio-pilot/clusterrole-istio-reader-clusterrole-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrole-istio-reader-clusterrole-istio-system.yaml new file mode 100644 index 0000000..f1e6970 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrole-istio-reader-clusterrole-istio-system.yaml @@ -0,0 +1,113 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: istio-reader-clusterrole-istio-system + labels: + app: istio-reader + release: istiod + app.kubernetes.io/name: istio-reader + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +rules: +- apiGroups: + - config.istio.io + - security.istio.io + - networking.istio.io + - authentication.istio.io + - rbac.istio.io + - telemetry.istio.io + - extensions.istio.io + resources: + - '*' + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - endpoints + - pods + - services + - nodes + - replicationcontrollers + - namespaces + - secrets + verbs: + - get + - list + - watch +- apiGroups: + - networking.istio.io + verbs: + - get + - watch + - list + resources: + - workloadentries +- apiGroups: + - networking.x-k8s.io + - gateway.networking.k8s.io + resources: + - gateways + verbs: + - get + - watch + - list +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - multicluster.x-k8s.io + resources: + - serviceexports + verbs: + - get + - list + - watch + - create + - delete +- apiGroups: + - multicluster.x-k8s.io + resources: + - serviceimports + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create diff --git a/rmk/infrastructure/istio-pilot/clusterrole-istiod-clusterrole-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrole-istiod-clusterrole-istio-system.yaml new file mode 100644 index 0000000..2281ba6 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrole-istiod-clusterrole-istio-system.yaml @@ -0,0 +1,219 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: istiod-clusterrole-istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: + - get + - list + - watch + - update + - patch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - update +- apiGroups: + - config.istio.io + - security.istio.io + - networking.istio.io + - authentication.istio.io + - rbac.istio.io + - telemetry.istio.io + - extensions.istio.io + verbs: + - get + - watch + - list + resources: + - '*' +- apiGroups: + - networking.istio.io + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - workloadentries +- apiGroups: + - networking.istio.io + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - workloadentries/status + - serviceentries/status +- apiGroups: + - security.istio.io + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - authorizationpolicies/status +- apiGroups: + - '' + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - services/status +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - pods + - nodes + - services + - namespaces + - endpoints + verbs: + - get + - list + - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - networking.k8s.io + resources: + - ingresses + - ingressclasses + verbs: + - get + - list + - watch +- apiGroups: + - networking.k8s.io + resources: + - ingresses/status + verbs: + - '*' +- apiGroups: + - '' + resources: + - configmaps + verbs: + - create + - get + - list + - watch + - update +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - gateway.networking.k8s.io + resources: + - '*' + verbs: + - get + - watch + - list +- apiGroups: + - gateway.networking.k8s.io + resources: + - backendtlspolicies/status + - gatewayclasses/status + - gateways/status + - grpcroutes/status + - httproutes/status + - referencegrants/status + - tcproutes/status + - tlsroutes/status + - udproutes/status + verbs: + - update + - patch +- apiGroups: + - gateway.networking.k8s.io + resources: + - gatewayclasses + verbs: + - create + - update + - patch + - delete +- apiGroups: + - '' + resources: + - secrets + verbs: + - get + - watch + - list +- apiGroups: + - multicluster.x-k8s.io + resources: + - serviceexports + verbs: + - get + - watch + - list + - create + - delete +- apiGroups: + - multicluster.x-k8s.io + resources: + - serviceimports + verbs: + - get + - watch + - list diff --git a/rmk/infrastructure/istio-pilot/clusterrole-istiod-gateway-controller-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrole-istiod-gateway-controller-istio-system.yaml new file mode 100644 index 0000000..c26cb69 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrole-istiod-gateway-controller-istio-system.yaml @@ -0,0 +1,50 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: istiod-gateway-controller-istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +rules: +- apiGroups: + - apps + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - deployments +- apiGroups: + - '' + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - services +- apiGroups: + - '' + verbs: + - get + - watch + - list + - update + - patch + - create + - delete + resources: + - serviceaccounts diff --git a/rmk/infrastructure/istio-pilot/clusterrolebinding-istio-reader-clusterrole-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrolebinding-istio-reader-clusterrole-istio-system.yaml new file mode 100644 index 0000000..9c660c7 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrolebinding-istio-reader-clusterrole-istio-system.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: istio-reader-clusterrole-istio-system + labels: + app: istio-reader + release: istiod + app.kubernetes.io/name: istio-reader + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: istio-reader-clusterrole-istio-system +subjects: +- kind: ServiceAccount + name: istio-reader-service-account + namespace: istio-system diff --git a/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-clusterrole-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-clusterrole-istio-system.yaml new file mode 100644 index 0000000..af10c7f --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-clusterrole-istio-system.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: istiod-clusterrole-istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: istiod-clusterrole-istio-system +subjects: +- kind: ServiceAccount + name: istiod + namespace: istio-system diff --git a/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-gateway-controller-istio-system.yaml b/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-gateway-controller-istio-system.yaml new file mode 100644 index 0000000..eaf1865 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/clusterrolebinding-istiod-gateway-controller-istio-system.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: istiod-gateway-controller-istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: istiod-gateway-controller-istio-system +subjects: +- kind: ServiceAccount + name: istiod + namespace: istio-system diff --git a/rmk/infrastructure/istio-pilot/configmap-istio-sidecar-injector.yaml b/rmk/infrastructure/istio-pilot/configmap-istio-sidecar-injector.yaml new file mode 100644 index 0000000..bc9f9e4 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/configmap-istio-sidecar-injector.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: istio-sidecar-injector + namespace: istio-system + labels: + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +data: + values: "{\n \"gateways\": {\n \"seccompProfile\": {},\n \"securityContext\": {}\n },\n \"global\": {\n \"caAddress\": \"\",\n \"caName\": \"\",\n \"certSigners\": [],\n \"configCluster\": false,\n \"configValidation\": true,\n \"defaultPodDisruptionBudget\": {\n \"enabled\": true\n },\n \"defaultResources\": {\n \"requests\": {\n \"cpu\": \"10m\"\n }\n },\n \"externalIstiod\": false,\n \"hub\": \"cr.yandex/crp3ccidau046kdj8g9q/contour/istio\",\n \"imagePullPolicy\": \"\",\n \"imagePullSecrets\": [\n \"regcred\"\n ],\n \"istioNamespace\": \"istio-system\",\n \"istiod\": {\n \"enableAnalysis\": false\n },\n \"logAsJson\": false,\n \"logging\": {\n \"level\": \"default:info\"\n },\n \"meshID\": \"\",\n \"meshNetworks\": {},\n \"mountMtlsCerts\": false,\n \"multiCluster\": {\n \"clusterName\": \"\",\n \"enabled\": false\n },\n \"network\": \"\",\n \"omitSidecarInjectorConfigMap\": false,\n \"operatorManageWebhooks\": false,\n \"pilotCertProvider\": \"istiod\",\n \"priorityClassName\": \"\",\n \"proxy\": {\n \"autoInject\": \"enabled\",\n \"clusterDomain\": \"cluster.local\",\n \"componentLogLevel\": \"misc:error\",\n \"excludeIPRanges\": \"\",\n \"excludeInboundPorts\": \"\",\n \"excludeOutboundPorts\": \"\",\n \"image\": \"proxyv2\",\n \"includeIPRanges\": \"*\",\n \"includeInboundPorts\": \"*\",\n \"includeOutboundPorts\": \"\",\n \"logLevel\": \"warning\",\n \"outlierLogPath\": \"\",\n \"privileged\": false,\n \"readinessFailureThreshold\": 4,\n \"readinessInitialDelaySeconds\": 0,\n \"readinessPeriodSeconds\": 15,\n \"resources\": {\n \"limits\": {\n \"cpu\": \"2000m\",\n \"memory\": \"1024Mi\"\n },\n \"requests\": {\n \"cpu\": \"100m\",\n \"memory\": \"128Mi\"\n }\n },\n \"startupProbe\": {\n \"enabled\": true,\n \"failureThreshold\": 600\n },\n \"statusPort\": 15020,\n \"tracer\": \"none\"\n },\n \"proxy_init\": {\n \"forceApplyIptables\": false,\n \"image\": \"proxyv2\"\n },\n \"remotePilotAddress\": \"\",\n \"sds\": {\n \"token\": {\n \"aud\": \"istio-ca\"\n }\n },\n \"sts\": {\n \"servicePort\": 0\n },\n \"tag\": \"1.24.0\",\n \"variant\": \"\",\n \"waypoint\": {\n \"affinity\": {},\n \"nodeSelector\": {},\n \"resources\": {\n \"limits\": {\n \"cpu\": \"2\",\n \"memory\": \"1Gi\"\n },\n \"requests\": {\n \"cpu\": \"100m\",\n \"memory\": \"128Mi\"\n }\n },\n \"tolerations\": [],\n \"topologySpreadConstraints\": []\n }\n },\n \"pilot\": {\n \"cni\": {\n \"enabled\": false,\n \"provider\": \"default\"\n }\n },\n \"revision\": \"\",\n \"sidecarInjectorWebhook\": {\n \"alwaysInjectSelector\": [],\n \"defaultTemplates\": [],\n \"enableNamespacesByDefault\": false,\n \"injectedAnnotations\": {},\n \"neverInjectSelector\": [],\n \"reinvocationPolicy\": \"Never\",\n \"rewriteAppHTTPProbe\": true,\n \"templates\": {}\n }\n}" + config: "# defaultTemplates defines the default template to use for pods that do not explicitly specify a template\ndefaultTemplates: [sidecar]\npolicy: enabled\nalwaysInjectSelector:\n []\nneverInjectSelector:\n []\ninjectedAnnotations:\ntemplate: \"{{ Template_Version_And_Istio_Version_Mismatched_Check_Installation }}\"\ntemplates:\n sidecar: |\n {{- define \"resources\" }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) }}\n requests:\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) -}}\n cpu: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU` }}\"\n {{ end }}\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}}\n memory: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory` }}\"\n {{ end }}\n {{- end }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) }}\n limits:\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) -}}\n cpu: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit` }}\"\n {{ end }}\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) -}}\n memory: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit` }}\"\n {{ end }}\n {{- end }}\n {{- else }}\n {{- if .Values.global.proxy.resources }}\n {{ toYaml .Values.global.proxy.resources | indent 6 }}\n {{- end }}\n {{- end }}\n {{- end }}\n {{ $nativeSidecar := (or (and (not (isset .ObjectMeta.Annotations `sidecar.istio.io/nativeSidecar`)) (eq (env \"ENABLE_NATIVE_SIDECARS\" \"false\") \"true\")) (eq (index .ObjectMeta.Annotations `sidecar.istio.io/nativeSidecar`) \"true\")) }}\n {{- $containers := list }}\n {{- range $index, $container := .Spec.Containers }}{{ if not (eq $container.Name \"istio-proxy\") }}{{ $containers = append $containers $container.Name }}{{end}}{{- end}}\n metadata:\n labels:\n security.istio.io/tlsMode: {{ index .ObjectMeta.Labels `security.istio.io/tlsMode` | default \"istio\" | quote }}\n {{- if eq (index .ProxyConfig.ProxyMetadata \"ISTIO_META_ENABLE_HBONE\") \"true\" }}\n networking.istio.io/tunnel: {{ index .ObjectMeta.Labels `networking.istio.io/tunnel` | default \"http\" | quote }}\n {{- end }}\n service.istio.io/canonical-name: {{ index .ObjectMeta.Labels `service.istio.io/canonical-name` | default (index .ObjectMeta.Labels `app.kubernetes.io/name`) | default (index .ObjectMeta.Labels `app`) | default .DeploymentMeta.Name | trunc 63 | trimSuffix \"-\" | quote }}\n service.istio.io/canonical-revision: {{ index .ObjectMeta.Labels `service.istio.io/canonical-revision` | default (index .ObjectMeta.Labels `app.kubernetes.io/version`) | default (index .ObjectMeta.Labels `version`) | default \"latest\" | quote }}\n annotations: {\n istio.io/rev: {{ .Revision | default \"default\" | quote }},\n {{- if ge (len $containers) 1 }}\n {{- if not (isset .ObjectMeta.Annotations `kubectl.kubernetes.io/default-logs-container`) }}\n kubectl.kubernetes.io/default-logs-container: \"{{ index $containers 0 }}\",\n {{- end }}\n {{- if not (isset .ObjectMeta.Annotations `kubectl.kubernetes.io/default-container`) }}\n kubectl.kubernetes.io/default-container: \"{{ index $containers 0 }}\",\n {{- end }}\n {{- end }}\n {{- if .Values.pilot.cni.enabled }}\n {{- if eq .Values.pilot.cni.provider \"multus\" }}\n k8s.v1.cni.cncf.io/networks:\ + \ '{{ appendMultusNetwork (index .ObjectMeta.Annotations `k8s.v1.cni.cncf.io/networks`) `default/istio-cni` }}',\n {{- end }}\n sidecar.istio.io/interceptionMode: \"{{ annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode }}\",\n {{ with annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundIPRanges` .Values.global.proxy.includeIPRanges }}traffic.sidecar.istio.io/includeOutboundIPRanges: \"{{.}}\",{{ end }}\n {{ with annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundIPRanges` .Values.global.proxy.excludeIPRanges }}traffic.sidecar.istio.io/excludeOutboundIPRanges: \"{{.}}\",{{ end }}\n {{ with annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` .Values.global.proxy.includeInboundPorts }}traffic.sidecar.istio.io/includeInboundPorts: \"{{.}}\",{{ end }}\n traffic.sidecar.istio.io/excludeInboundPorts: \"{{ excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts` .Values.global.proxy.excludeInboundPorts) }}\",\n {{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/includeOutboundPorts`) (ne (valueOrDefault .Values.global.proxy.includeOutboundPorts \"\") \"\") }}\n traffic.sidecar.istio.io/includeOutboundPorts: \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundPorts` .Values.global.proxy.includeOutboundPorts }}\",\n {{- end }}\n {{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeOutboundPorts`) (ne .Values.global.proxy.excludeOutboundPorts \"\") }}\n traffic.sidecar.istio.io/excludeOutboundPorts: \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundPorts` .Values.global.proxy.excludeOutboundPorts }}\",\n {{- end }}\n {{ with index .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces` }}traffic.sidecar.istio.io/kubevirtInterfaces: \"{{.}}\",{{ end }}\n {{ with index .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeInterfaces` }}traffic.sidecar.istio.io/excludeInterfaces: \"{{.}}\",{{ end }}\n {{- end }}\n }\n spec:\n {{- $holdProxy := and\n (or .ProxyConfig.HoldApplicationUntilProxyStarts.GetValue .Values.global.proxy.holdApplicationUntilProxyStarts)\n (not $nativeSidecar) }}\n initContainers:\n {{ if ne (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `NONE` }}\n {{ if .Values.pilot.cni.enabled -}}\n - name: istio-validation\n {{ else -}}\n - name: istio-init\n {{ end -}}\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy_init.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy_init.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n args:\n - istio-iptables\n - \"-p\"\n - {{ .MeshConfig.ProxyListenPort | default \"15001\" | quote }}\n - \"-z\"\n - {{ .MeshConfig.ProxyInboundListenPort | default \"15006\" | quote }}\n - \"-u\"\n - {{ .ProxyUID | default \"1337\" | quote }}\n - \"-m\"\n - \"{{ annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode }}\"\n - \"-i\"\n - \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundIPRanges` .Values.global.proxy.includeIPRanges }}\"\n - \"-x\"\n - \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundIPRanges` .Values.global.proxy.excludeIPRanges }}\"\n - \"-b\"\n - \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` .Values.global.proxy.includeInboundPorts }}\"\n - \"-d\"\n {{- if excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts`\ + \ .Values.global.proxy.excludeInboundPorts) }}\n - \"15090,15021,{{ excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts` .Values.global.proxy.excludeInboundPorts) }}\"\n {{- else }}\n - \"15090,15021\"\n {{- end }}\n {{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/includeOutboundPorts`) (ne (valueOrDefault .Values.global.proxy.includeOutboundPorts \"\") \"\") -}}\n - \"-q\"\n - \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundPorts` .Values.global.proxy.includeOutboundPorts }}\"\n {{ end -}}\n {{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeOutboundPorts`) (ne (valueOrDefault .Values.global.proxy.excludeOutboundPorts \"\") \"\") -}}\n - \"-o\"\n - \"{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundPorts` .Values.global.proxy.excludeOutboundPorts }}\"\n {{ end -}}\n {{ if (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces`) -}}\n - \"-k\"\n - \"{{ index .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces` }}\"\n {{ end -}}\n {{ if (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeInterfaces`) -}}\n - \"-c\"\n - \"{{ index .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeInterfaces` }}\"\n {{ end -}}\n - \"--log_output_level={{ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level }}\"\n {{ if .Values.global.logAsJson -}}\n - \"--log_as_json\"\n {{ end -}}\n {{ if .Values.pilot.cni.enabled -}}\n - \"--run-validation\"\n - \"--skip-rule-apply\"\n {{ else if .Values.global.proxy_init.forceApplyIptables -}}\n - \"--force-apply\"\n {{ end -}}\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n {{- if .ProxyConfig.ProxyMetadata }}\n env:\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{- end }}\n resources:\n {{ template \"resources\" . }}\n securityContext:\n allowPrivilegeEscalation: {{ .Values.global.proxy.privileged }}\n privileged: {{ .Values.global.proxy.privileged }}\n capabilities:\n {{- if not .Values.pilot.cni.enabled }}\n add:\n - NET_ADMIN\n - NET_RAW\n {{- end }}\n drop:\n - ALL\n {{- if not .Values.pilot.cni.enabled }}\n readOnlyRootFilesystem: false\n runAsGroup: 0\n runAsNonRoot: false\n runAsUser: 0\n {{- else }}\n readOnlyRootFilesystem: true\n runAsGroup: {{ .ProxyGID | default \"1337\" }}\n runAsUser: {{ .ProxyUID | default \"1337\" }}\n runAsNonRoot: true\n {{- end }}\n {{ end -}}\n {{ if not $nativeSidecar }}\n containers:\n {{ end }}\n - name: istio-proxy\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n {{ if $nativeSidecar }}restartPolicy: Always{{end}}\n ports:\n - containerPort: 15090\n protocol: TCP\n name: http-envoy-prom\n args:\n - proxy\n - sidecar\n - --domain\n - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}\n - --proxyLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel }}\n - --proxyComponentLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel }}\n - --log_output_level={{\ + \ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level }}\n {{- if .Values.global.sts.servicePort }}\n - --stsPort={{ .Values.global.sts.servicePort }}\n {{- end }}\n {{- if .Values.global.logAsJson }}\n - --log_as_json\n {{- end }}\n {{- if .Values.global.proxy.outlierLogPath }}\n - --outlierLogPath={{ .Values.global.proxy.outlierLogPath }}\n {{- end}}\n {{- if .Values.global.proxy.lifecycle }}\n lifecycle:\n {{ toYaml .Values.global.proxy.lifecycle | indent 6 }}\n {{- else if $holdProxy }}\n lifecycle:\n postStart:\n exec:\n command:\n - pilot-agent\n - wait\n {{- else if $nativeSidecar }}\n {{- /* preStop is called when the pod starts shutdown. Initialize drain. We will get SIGTERM once applications are torn down. */}}\n lifecycle:\n preStop:\n exec:\n command:\n - pilot-agent\n - request\n - --debug-port={{(annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort)}}\n - POST\n - drain\n {{- end }}\n env:\n {{- if eq .InboundTrafficPolicyMode \"localhost\" }}\n - name: REWRITE_PROBE_LEGACY_LOCALHOST_DESTINATION\n value: \"true\"\n {{- end }}\n - name: PILOT_CERT_PROVIDER\n value: {{ .Values.global.pilotCertProvider }}\n - name: CA_ADDR\n {{- if .Values.global.caAddress }}\n value: {{ .Values.global.caAddress }}\n {{- else }}\n value: istiod{{- if not (eq .Values.revision \"\") }}-{{ .Values.revision }}{{- end }}.{{ .Values.global.istioNamespace }}.svc:15012\n {{- end }}\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: HOST_IP\n valueFrom:\n fieldRef:\n fieldPath: status.hostIP\n - name: ISTIO_CPU_LIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: PROXY_CONFIG\n value: |\n {{ protoToJSON .ProxyConfig }}\n - name: ISTIO_META_POD_PORTS\n value: |-\n [\n {{- $first := true }}\n {{- range $index1, $c := .Spec.Containers }}\n {{- range $index2, $p := $c.Ports }}\n {{- if (structToJSON $p) }}\n {{if not $first}},{{end}}{{ structToJSON $p }}\n {{- $first = false }}\n {{- end }}\n {{- end}}\n {{- end}}\n ]\n - name: ISTIO_META_APP_CONTAINERS\n value: \"{{ $containers | join \",\" }}\"\n - name: GOMEMLIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.memory\n - name: GOMAXPROCS\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n {{- if .CompliancePolicy }}\n - name: COMPLIANCE_POLICY\n value: \"{{ .CompliancePolicy }}\"\n {{- end }}\n - name: ISTIO_META_CLUSTER_ID\n value: \"{{ valueOrDefault .Values.global.multiCluster.clusterName `Kubernetes` }}\"\n - name: ISTIO_META_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: spec.nodeName\n - name: ISTIO_META_INTERCEPTION_MODE\n value: \"{{ or (index .ObjectMeta.Annotations `sidecar.istio.io/interceptionMode`) .ProxyConfig.InterceptionMode.String }}\"\n {{- if .Values.global.network }}\n - name: ISTIO_META_NETWORK\n value: \"{{\ + \ .Values.global.network }}\"\n {{- end }}\n {{- if .DeploymentMeta.Name }}\n - name: ISTIO_META_WORKLOAD_NAME\n value: \"{{ .DeploymentMeta.Name }}\"\n {{ end }}\n {{- if and .TypeMeta.APIVersion .DeploymentMeta.Name }}\n - name: ISTIO_META_OWNER\n value: kubernetes://apis/{{ .TypeMeta.APIVersion }}/namespaces/{{ valueOrDefault .DeploymentMeta.Namespace `default` }}/{{ toLower .TypeMeta.Kind}}s/{{ .DeploymentMeta.Name }}\n {{- end}}\n {{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}\n - name: ISTIO_BOOTSTRAP_OVERRIDE\n value: \"/etc/istio/custom-bootstrap/custom_bootstrap.json\"\n {{- end }}\n {{- if .Values.global.meshID }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ .Values.global.meshID }}\"\n {{- else if (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\"\n {{- end }}\n {{- with (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: TRUST_DOMAIN\n value: \"{{ . }}\"\n {{- end }}\n {{- if and (eq .Values.global.proxy.tracer \"datadog\") (isset .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}\n {{- range $key, $value := fromJSON (index .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{- end }}\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n {{ if ne (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) `0` }}\n {{ if .Values.global.proxy.startupProbe.enabled }}\n startupProbe:\n httpGet:\n path: /healthz/ready\n port: 15021\n initialDelaySeconds: 0\n periodSeconds: 1\n timeoutSeconds: 3\n failureThreshold: {{ .Values.global.proxy.startupProbe.failureThreshold }}\n {{ end }}\n readinessProbe:\n httpGet:\n path: /healthz/ready\n port: 15021\n initialDelaySeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/initialDelaySeconds` .Values.global.proxy.readinessInitialDelaySeconds }}\n periodSeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/periodSeconds` .Values.global.proxy.readinessPeriodSeconds }}\n timeoutSeconds: 3\n failureThreshold: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/failureThreshold` .Values.global.proxy.readinessFailureThreshold }}\n {{ end -}}\n securityContext:\n {{- if eq (index .ProxyConfig.ProxyMetadata \"IPTABLES_TRACE_LOGGING\") \"true\" }}\n allowPrivilegeEscalation: true\n capabilities:\n add:\n - NET_ADMIN\n drop:\n - ALL\n privileged: true\n readOnlyRootFilesystem: true\n runAsGroup: {{ .ProxyGID | default \"1337\" }}\n runAsNonRoot: false\n runAsUser: 0\n {{- else }}\n allowPrivilegeEscalation: {{ .Values.global.proxy.privileged }}\n capabilities:\n {{ if or (eq (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `TPROXY`) (eq (annotation .ObjectMeta `sidecar.istio.io/capNetBindService` .Values.global.proxy.capNetBindService) `true`) -}}\n add:\n {{ if eq (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `TPROXY` -}}\n - NET_ADMIN\n {{- end }}\n {{ if eq (annotation .ObjectMeta `sidecar.istio.io/capNetBindService` .Values.global.proxy.capNetBindService) `true` -}}\n - NET_BIND_SERVICE\n\ + \ {{- end }}\n {{- end }}\n drop:\n - ALL\n privileged: {{ .Values.global.proxy.privileged }}\n readOnlyRootFilesystem: true\n runAsGroup: {{ .ProxyGID | default \"1337\" }}\n {{ if or (eq (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `TPROXY`) (eq (annotation .ObjectMeta `sidecar.istio.io/capNetBindService` .Values.global.proxy.capNetBindService) `true`) -}}\n runAsNonRoot: false\n runAsUser: 0\n {{- else -}}\n runAsNonRoot: true\n runAsUser: {{ .ProxyUID | default \"1337\" }}\n {{- end }}\n {{- end }}\n resources:\n {{ template \"resources\" . }}\n volumeMounts:\n - name: workload-socket\n mountPath: /var/run/secrets/workload-spiffe-uds\n - name: credential-socket\n mountPath: /var/run/secrets/credential-uds\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n mountPath: /var/run/secrets/workload-spiffe-credentials\n readOnly: true\n {{- else }}\n - name: workload-certs\n mountPath: /var/run/secrets/workload-spiffe-credentials\n {{- end }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - mountPath: /var/run/secrets/istio\n name: istiod-ca-cert\n {{- end }}\n - mountPath: /var/lib/istio/data\n name: istio-data\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}\n - mountPath: /etc/istio/custom-bootstrap\n name: custom-bootstrap-volume\n {{- end }}\n # SDS channel between istioagent and Envoy\n - mountPath: /etc/istio/proxy\n name: istio-envoy\n - mountPath: /var/run/secrets/tokens\n name: istio-token\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - mountPath: /etc/certs/\n name: istio-certs\n readOnly: true\n {{- end }}\n - name: istio-podinfo\n mountPath: /etc/istio/pod\n {{- if and (eq .Values.global.proxy.tracer \"lightstep\") .ProxyConfig.GetTracing.GetTlsSettings }}\n - mountPath: {{ directory .ProxyConfig.GetTracing.GetTlsSettings.GetCaCertificates }}\n name: lightstep-certs\n readOnly: true\n {{- end }}\n {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount` }}\n {{ range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount`) }}\n - name: \"{{ $index }}\"\n {{ toYaml $value | indent 6 }}\n {{ end }}\n {{- end }}\n volumes:\n - emptyDir:\n name: workload-socket\n - emptyDir:\n name: credential-socket\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n csi:\n driver: workloadcertificates.security.cloud.google.com\n {{- else }}\n - emptyDir:\n name: workload-certs\n {{- end }}\n {{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}\n - name: custom-bootstrap-volume\n configMap:\n name: {{ annotation .ObjectMeta `sidecar.istio.io/bootstrapOverride` \"\" }}\n {{- end }}\n # SDS channel between istioagent and Envoy\n - emptyDir:\n medium: Memory\n name: istio-envoy\n - name: istio-data\n emptyDir: {}\n - name: istio-podinfo\n downwardAPI:\n items:\n - path: \"labels\"\n fieldRef:\n fieldPath: metadata.labels\n - path: \"annotations\"\n fieldRef:\n fieldPath: metadata.annotations\n - name: istio-token\n projected:\n sources:\n - serviceAccountToken:\n path: istio-token\n \ + \ expirationSeconds: 43200\n audience: {{ .Values.global.sds.token.aud }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - name: istiod-ca-cert\n configMap:\n name: istio-ca-root-cert\n {{- end }}\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - name: istio-certs\n secret:\n optional: true\n {{ if eq .Spec.ServiceAccountName \"\" }}\n secretName: istio.default\n {{ else -}}\n secretName: {{ printf \"istio.%s\" .Spec.ServiceAccountName }}\n {{ end -}}\n {{- end }}\n {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolume` }}\n {{range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolume`) }}\n - name: \"{{ $index }}\"\n {{ toYaml $value | indent 4 }}\n {{ end }}\n {{ end }}\n {{- if and (eq .Values.global.proxy.tracer \"lightstep\") .ProxyConfig.GetTracing.GetTlsSettings }}\n - name: lightstep-certs\n secret:\n optional: true\n secretName: lightstep.cacert\n {{- end }}\n {{- if .Values.global.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n gateway: |\n {{- $containers := list }}\n {{- range $index, $container := .Spec.Containers }}{{ if not (eq $container.Name \"istio-proxy\") }}{{ $containers = append $containers $container.Name }}{{end}}{{- end}}\n metadata:\n labels:\n service.istio.io/canonical-name: {{ index .ObjectMeta.Labels `service.istio.io/canonical-name` | default (index .ObjectMeta.Labels `app.kubernetes.io/name`) | default (index .ObjectMeta.Labels `app`) | default .DeploymentMeta.Name | quote }}\n service.istio.io/canonical-revision: {{ index .ObjectMeta.Labels `service.istio.io/canonical-revision` | default (index .ObjectMeta.Labels `app.kubernetes.io/version`) | default (index .ObjectMeta.Labels `version`) | default \"latest\" | quote }}\n annotations: {\n istio.io/rev: {{ .Revision | default \"default\" | quote }},\n {{- if eq (len $containers) 1 }}\n kubectl.kubernetes.io/default-logs-container: \"{{ index $containers 0 }}\",\n kubectl.kubernetes.io/default-container: \"{{ index $containers 0 }}\",\n {{ end }}\n }\n spec:\n securityContext:\n {{- if .Values.gateways.securityContext }}\n {{- toYaml .Values.gateways.securityContext | nindent 4 }}\n {{- else }}\n sysctls:\n - name: net.ipv4.ip_unprivileged_port_start\n value: \"0\"\n {{- end }}\n containers:\n - name: istio-proxy\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n ports:\n - containerPort: 15090\n protocol: TCP\n name: http-envoy-prom\n args:\n - proxy\n - router\n - --domain\n - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}\n - --proxyLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel }}\n - --proxyComponentLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel }}\n - --log_output_level={{ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level }}\n {{- if .Values.global.sts.servicePort }}\n - --stsPort={{ .Values.global.sts.servicePort }}\n {{- end }}\n {{- if .Values.global.logAsJson }}\n - --log_as_json\n {{- end }}\n {{- if .Values.global.proxy.lifecycle }}\n lifecycle:\n {{ toYaml .Values.global.proxy.lifecycle\ + \ | indent 6 }}\n {{- end }}\n securityContext:\n runAsUser: {{ .ProxyUID | default \"1337\" }}\n runAsGroup: {{ .ProxyGID | default \"1337\" }}\n env:\n - name: PILOT_CERT_PROVIDER\n value: {{ .Values.global.pilotCertProvider }}\n - name: CA_ADDR\n {{- if .Values.global.caAddress }}\n value: {{ .Values.global.caAddress }}\n {{- else }}\n value: istiod{{- if not (eq .Values.revision \"\") }}-{{ .Values.revision }}{{- end }}.{{ .Values.global.istioNamespace }}.svc:15012\n {{- end }}\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: HOST_IP\n valueFrom:\n fieldRef:\n fieldPath: status.hostIP\n - name: ISTIO_CPU_LIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: PROXY_CONFIG\n value: |\n {{ protoToJSON .ProxyConfig }}\n - name: ISTIO_META_POD_PORTS\n value: |-\n [\n {{- $first := true }}\n {{- range $index1, $c := .Spec.Containers }}\n {{- range $index2, $p := $c.Ports }}\n {{- if (structToJSON $p) }}\n {{if not $first}},{{end}}{{ structToJSON $p }}\n {{- $first = false }}\n {{- end }}\n {{- end}}\n {{- end}}\n ]\n - name: GOMEMLIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.memory\n - name: GOMAXPROCS\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n {{- if .CompliancePolicy }}\n - name: COMPLIANCE_POLICY\n value: \"{{ .CompliancePolicy }}\"\n {{- end }}\n - name: ISTIO_META_APP_CONTAINERS\n value: \"{{ $containers | join \",\" }}\"\n - name: ISTIO_META_CLUSTER_ID\n value: \"{{ valueOrDefault .Values.global.multiCluster.clusterName `Kubernetes` }}\"\n - name: ISTIO_META_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: spec.nodeName\n - name: ISTIO_META_INTERCEPTION_MODE\n value: \"{{ .ProxyConfig.InterceptionMode.String }}\"\n {{- if .Values.global.network }}\n - name: ISTIO_META_NETWORK\n value: \"{{ .Values.global.network }}\"\n {{- end }}\n {{- if .DeploymentMeta.Name }}\n - name: ISTIO_META_WORKLOAD_NAME\n value: \"{{ .DeploymentMeta.Name }}\"\n {{ end }}\n {{- if and .TypeMeta.APIVersion .DeploymentMeta.Name }}\n - name: ISTIO_META_OWNER\n value: kubernetes://apis/{{ .TypeMeta.APIVersion }}/namespaces/{{ valueOrDefault .DeploymentMeta.Namespace `default` }}/{{ toLower .TypeMeta.Kind}}s/{{ .DeploymentMeta.Name }}\n {{- end}}\n {{- if .Values.global.meshID }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ .Values.global.meshID }}\"\n {{- else if (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\"\n {{- end }}\n {{- with (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: TRUST_DOMAIN\n value: \"{{ . }}\"\n {{- end }}\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n readinessProbe:\n \ + \ httpGet:\n path: /healthz/ready\n port: 15021\n initialDelaySeconds: {{.Values.global.proxy.readinessInitialDelaySeconds }}\n periodSeconds: {{ .Values.global.proxy.readinessPeriodSeconds }}\n timeoutSeconds: 3\n failureThreshold: {{ .Values.global.proxy.readinessFailureThreshold }}\n volumeMounts:\n - name: workload-socket\n mountPath: /var/run/secrets/workload-spiffe-uds\n - name: credential-socket\n mountPath: /var/run/secrets/credential-uds\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n mountPath: /var/run/secrets/workload-spiffe-credentials\n readOnly: true\n {{- else }}\n - name: workload-certs\n mountPath: /var/run/secrets/workload-spiffe-credentials\n {{- end }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - mountPath: /var/run/secrets/istio\n name: istiod-ca-cert\n {{- end }}\n - mountPath: /var/lib/istio/data\n name: istio-data\n # SDS channel between istioagent and Envoy\n - mountPath: /etc/istio/proxy\n name: istio-envoy\n - mountPath: /var/run/secrets/tokens\n name: istio-token\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - mountPath: /etc/certs/\n name: istio-certs\n readOnly: true\n {{- end }}\n - name: istio-podinfo\n mountPath: /etc/istio/pod\n volumes:\n - emptyDir: {}\n name: workload-socket\n - emptyDir: {}\n name: credential-socket\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n csi:\n driver: workloadcertificates.security.cloud.google.com\n {{- else}}\n - emptyDir: {}\n name: workload-certs\n {{- end }}\n # SDS channel between istioagent and Envoy\n - emptyDir:\n medium: Memory\n name: istio-envoy\n - name: istio-data\n emptyDir: {}\n - name: istio-podinfo\n downwardAPI:\n items:\n - path: \"labels\"\n fieldRef:\n fieldPath: metadata.labels\n - path: \"annotations\"\n fieldRef:\n fieldPath: metadata.annotations\n - name: istio-token\n projected:\n sources:\n - serviceAccountToken:\n path: istio-token\n expirationSeconds: 43200\n audience: {{ .Values.global.sds.token.aud }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - name: istiod-ca-cert\n configMap:\n name: istio-ca-root-cert\n {{- end }}\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - name: istio-certs\n secret:\n optional: true\n {{ if eq .Spec.ServiceAccountName \"\" }}\n secretName: istio.default\n {{ else -}}\n secretName: {{ printf \"istio.%s\" .Spec.ServiceAccountName }}\n {{ end -}}\n {{- end }}\n {{- if .Values.global.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n grpc-simple: |\n metadata:\n annotations:\n sidecar.istio.io/rewriteAppHTTPProbers: \"false\"\n spec:\n initContainers:\n - name: grpc-bootstrap-init\n image: \"{{ .Values.global.hub }}/busybox:1.28\"\n volumeMounts:\n - mountPath: /var/lib/grpc/data/\n name: grpc-io-proxyless-bootstrap\n env:\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: POD_NAME\n valueFrom:\n\ + \ fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: ISTIO_NAMESPACE\n value: |\n {{ .Values.global.istioNamespace }}\n command:\n - sh\n - \"-c\"\n - |-\n NODE_ID=\"sidecar~${INSTANCE_IP}~${POD_NAME}.${POD_NAMESPACE}~cluster.local\"\n SERVER_URI=\"dns:///istiod.${ISTIO_NAMESPACE}.svc:15010\"\n echo '\n {\n \"xds_servers\": [\n {\n \"server_uri\": \"'${SERVER_URI}'\",\n \"channel_creds\": [{\"type\": \"insecure\"}],\n \"server_features\" : [\"xds_v3\"]\n }\n ],\n \"node\": {\n \"id\": \"'${NODE_ID}'\",\n \"metadata\": {\n \"GENERATOR\": \"grpc\"\n }\n }\n }' > /var/lib/grpc/data/bootstrap.json\n containers:\n {{- range $index, $container := .Spec.Containers }}\n - name: {{ $container.Name }}\n env:\n - name: GRPC_XDS_BOOTSTRAP\n value: /var/lib/grpc/data/bootstrap.json\n - name: GRPC_GO_LOG_VERBOSITY_LEVEL\n value: \"99\"\n - name: GRPC_GO_LOG_SEVERITY_LEVEL\n value: info\n volumeMounts:\n - mountPath: /var/lib/grpc/data/\n name: grpc-io-proxyless-bootstrap\n {{- end }}\n volumes:\n - name: grpc-io-proxyless-bootstrap\n emptyDir: {}\n grpc-agent: |\n {{- define \"resources\" }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) }}\n requests:\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) -}}\n cpu: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU` }}\"\n {{ end }}\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}}\n memory: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory` }}\"\n {{ end }}\n {{- end }}\n {{- if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) }}\n limits:\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit`) -}}\n cpu: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPULimit` }}\"\n {{ end }}\n {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit`) -}}\n memory: \"{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemoryLimit` }}\"\n {{ end }}\n {{- end }}\n {{- else }}\n {{- if .Values.global.proxy.resources }}\n {{ toYaml .Values.global.proxy.resources | indent 6 }}\n {{- end }}\n {{- end }}\n {{- end }}\n {{- $containers := list }}\n {{- range $index, $container := .Spec.Containers }}{{ if not (eq $container.Name \"istio-proxy\") }}{{ $containers = append $containers $container.Name }}{{end}}{{- end}}\n metadata:\n labels:\n {{/* security.istio.io/tlsMode: istio must be set by user, if gRPC is using mTLS initialization code. We can't set it automatically. */}}\n service.istio.io/canonical-name: {{ index .ObjectMeta.Labels `service.istio.io/canonical-name` | default (index .ObjectMeta.Labels `app.kubernetes.io/name`) | default (index .ObjectMeta.Labels `app`) | default .DeploymentMeta.Name | quote }}\n service.istio.io/canonical-revision:\ + \ {{ index .ObjectMeta.Labels `service.istio.io/canonical-revision` | default (index .ObjectMeta.Labels `app.kubernetes.io/version`) | default (index .ObjectMeta.Labels `version`) | default \"latest\" | quote }}\n annotations: {\n istio.io/rev: {{ .Revision | default \"default\" | quote }},\n {{- if ge (len $containers) 1 }}\n {{- if not (isset .ObjectMeta.Annotations `kubectl.kubernetes.io/default-logs-container`) }}\n kubectl.kubernetes.io/default-logs-container: \"{{ index $containers 0 }}\",\n {{- end }}\n {{- if not (isset .ObjectMeta.Annotations `kubectl.kubernetes.io/default-container`) }}\n kubectl.kubernetes.io/default-container: \"{{ index $containers 0 }}\",\n {{- end }}\n {{- end }}\n sidecar.istio.io/rewriteAppHTTPProbers: \"false\",\n }\n spec:\n containers:\n - name: istio-proxy\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n ports:\n - containerPort: 15020\n protocol: TCP\n name: mesh-metrics\n args:\n - proxy\n - sidecar\n - --domain\n - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}\n - --proxyLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel }}\n - --proxyComponentLogLevel={{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel }}\n - --log_output_level={{ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level }}\n {{- if .Values.global.sts.servicePort }}\n - --stsPort={{ .Values.global.sts.servicePort }}\n {{- end }}\n {{- if .Values.global.logAsJson }}\n - --log_as_json\n {{- end }}\n lifecycle:\n postStart:\n exec:\n command:\n - pilot-agent\n - wait\n - --url=http://localhost:15020/healthz/ready\n env:\n - name: ISTIO_META_GENERATOR\n value: grpc\n - name: OUTPUT_CERTS\n value: /var/lib/istio/data\n {{- if eq .InboundTrafficPolicyMode \"localhost\" }}\n - name: REWRITE_PROBE_LEGACY_LOCALHOST_DESTINATION\n value: \"true\"\n {{- end }}\n - name: PILOT_CERT_PROVIDER\n value: {{ .Values.global.pilotCertProvider }}\n - name: CA_ADDR\n {{- if .Values.global.caAddress }}\n value: {{ .Values.global.caAddress }}\n {{- else }}\n value: istiod{{- if not (eq .Values.revision \"\") }}-{{ .Values.revision }}{{- end }}.{{ .Values.global.istioNamespace }}.svc:15012\n {{- end }}\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: HOST_IP\n valueFrom:\n fieldRef:\n fieldPath: status.hostIP\n - name: PROXY_CONFIG\n value: |\n {{ protoToJSON .ProxyConfig }}\n - name: ISTIO_META_POD_PORTS\n value: |-\n [\n {{- $first := true }}\n {{- range $index1, $c := .Spec.Containers }}\n {{- range $index2, $p := $c.Ports }}\n {{- if (structToJSON $p) }}\n {{if not $first}},{{end}}{{ structToJSON $p }}\n {{- $first = false }}\n {{- end }}\n {{- end}}\n {{- end}}\n ]\n - name: ISTIO_META_APP_CONTAINERS\n\ + \ value: \"{{ $containers | join \",\" }}\"\n - name: ISTIO_META_CLUSTER_ID\n value: \"{{ valueOrDefault .Values.global.multiCluster.clusterName `Kubernetes` }}\"\n - name: ISTIO_META_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: spec.nodeName\n {{- if .Values.global.network }}\n - name: ISTIO_META_NETWORK\n value: \"{{ .Values.global.network }}\"\n {{- end }}\n {{- if .DeploymentMeta.Name }}\n - name: ISTIO_META_WORKLOAD_NAME\n value: \"{{ .DeploymentMeta.Name }}\"\n {{ end }}\n {{- if and .TypeMeta.APIVersion .DeploymentMeta.Name }}\n - name: ISTIO_META_OWNER\n value: kubernetes://apis/{{ .TypeMeta.APIVersion }}/namespaces/{{ valueOrDefault .DeploymentMeta.Namespace `default` }}/{{ toLower .TypeMeta.Kind}}s/{{ .DeploymentMeta.Name }}\n {{- end}}\n {{- if .Values.global.meshID }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ .Values.global.meshID }}\"\n {{- else if (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\"\n {{- end }}\n {{- with (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: TRUST_DOMAIN\n value: \"{{ . }}\"\n {{- end }}\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n # grpc uses xds:/// to resolve – no need to resolve VIP\n - name: ISTIO_META_DNS_CAPTURE\n value: \"false\"\n - name: DISABLE_ENVOY\n value: \"true\"\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n {{ if ne (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) `0` }}\n readinessProbe:\n httpGet:\n path: /healthz/ready\n port: 15020\n initialDelaySeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/initialDelaySeconds` .Values.global.proxy.readinessInitialDelaySeconds }}\n periodSeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/periodSeconds` .Values.global.proxy.readinessPeriodSeconds }}\n timeoutSeconds: 3\n failureThreshold: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/failureThreshold` .Values.global.proxy.readinessFailureThreshold }}\n resources:\n {{ template \"resources\" . }}\n volumeMounts:\n - name: workload-socket\n mountPath: /var/run/secrets/workload-spiffe-uds\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n mountPath: /var/run/secrets/workload-spiffe-credentials\n readOnly: true\n {{- else }}\n - name: workload-certs\n mountPath: /var/run/secrets/workload-spiffe-credentials\n {{- end }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - mountPath: /var/run/secrets/istio\n name: istiod-ca-cert\n {{- end }}\n - mountPath: /var/lib/istio/data\n name: istio-data\n # UDS channel between istioagent and gRPC client for XDS/SDS\n - mountPath: /etc/istio/proxy\n name: istio-xds\n - mountPath: /var/run/secrets/tokens\n name: istio-token\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - mountPath: /etc/certs/\n name: istio-certs\n readOnly: true\n {{- end }}\n - name: istio-podinfo\n mountPath: /etc/istio/pod\n {{- end }}\n {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount` }}\n {{ range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount`)\ + \ }}\n - name: \"{{ $index }}\"\n {{ toYaml $value | indent 6 }}\n {{ end }}\n {{- end }}\n {{- range $index, $container := .Spec.Containers }}\n {{ if not (eq $container.Name \"istio-proxy\") }}\n - name: {{ $container.Name }}\n env:\n - name: \"GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT\"\n value: \"true\"\n - name: \"GRPC_XDS_BOOTSTRAP\"\n value: \"/etc/istio/proxy/grpc-bootstrap.json\"\n volumeMounts:\n - mountPath: /var/lib/istio/data\n name: istio-data\n # UDS channel between istioagent and gRPC client for XDS/SDS\n - mountPath: /etc/istio/proxy\n name: istio-xds\n {{- if eq $.Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n mountPath: /var/run/secrets/workload-spiffe-credentials\n readOnly: true\n {{- else }}\n - name: workload-certs\n mountPath: /var/run/secrets/workload-spiffe-credentials\n {{- end }}\n {{- end }}\n {{- end }}\n volumes:\n - emptyDir:\n name: workload-socket\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n csi:\n driver: workloadcertificates.security.cloud.google.com\n {{- else }}\n - emptyDir:\n name: workload-certs\n {{- end }}\n {{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }}\n - name: custom-bootstrap-volume\n configMap:\n name: {{ annotation .ObjectMeta `sidecar.istio.io/bootstrapOverride` \"\" }}\n {{- end }}\n # SDS channel between istioagent and Envoy\n - emptyDir:\n medium: Memory\n name: istio-xds\n - name: istio-data\n emptyDir: {}\n - name: istio-podinfo\n downwardAPI:\n items:\n - path: \"labels\"\n fieldRef:\n fieldPath: metadata.labels\n - path: \"annotations\"\n fieldRef:\n fieldPath: metadata.annotations\n - name: istio-token\n projected:\n sources:\n - serviceAccountToken:\n path: istio-token\n expirationSeconds: 43200\n audience: {{ .Values.global.sds.token.aud }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - name: istiod-ca-cert\n configMap:\n name: istio-ca-root-cert\n {{- end }}\n {{- if .Values.global.mountMtlsCerts }}\n # Use the key and cert mounted to /etc/certs/ for the in-cluster mTLS communications.\n - name: istio-certs\n secret:\n optional: true\n {{ if eq .Spec.ServiceAccountName \"\" }}\n secretName: istio.default\n {{ else -}}\n secretName: {{ printf \"istio.%s\" .Spec.ServiceAccountName }}\n {{ end -}}\n {{- end }}\n {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolume` }}\n {{range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolume`) }}\n - name: \"{{ $index }}\"\n {{ toYaml $value | indent 4 }}\n {{ end }}\n {{ end }}\n {{- if .Values.global.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n waypoint: |\n apiVersion: v1\n kind: ServiceAccount\n metadata:\n name: {{.ServiceAccount | quote}}\n namespace: {{.Namespace | quote}}\n annotations:\n {{- toJsonMap (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\") | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n ) | nindent 4 }}\n {{-\ + \ if ge .KubeVersion 128 }}\n # Safe since 1.28: https://github.com/kubernetes/kubernetes/pull/117412\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: \"{{.Name}}\"\n uid: \"{{.UID}}\"\n {{- end }}\n ---\n apiVersion: apps/v1\n kind: Deployment\n metadata:\n name: {{.DeploymentName | quote}}\n namespace: {{.Namespace | quote}}\n annotations:\n {{- toJsonMap (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\") | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n \"gateway.istio.io/managed\" \"istio.io-mesh-controller\"\n ) | nindent 4 }}\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: \"{{.Name}}\"\n uid: \"{{.UID}}\"\n spec:\n selector:\n matchLabels:\n \"{{.GatewayNameLabel}}\": \"{{.Name}}\"\n template:\n metadata:\n annotations:\n {{- toJsonMap\n (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\")\n (strdict \"istio.io/rev\" (.Revision | default \"default\"))\n (strdict\n \"prometheus.io/path\" \"/stats/prometheus\"\n \"prometheus.io/port\" \"15020\"\n \"prometheus.io/scrape\" \"true\"\n ) | nindent 8 }}\n labels:\n {{- toJsonMap\n (strdict\n \"sidecar.istio.io/inject\" \"false\"\n \"istio.io/dataplane-mode\" \"none\"\n \"service.istio.io/canonical-name\" .DeploymentName\n \"service.istio.io/canonical-revision\" \"latest\"\n )\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n \"gateway.istio.io/managed\" \"istio.io-mesh-controller\"\n ) | nindent 8}}\n spec:\n {{- if .Values.global.waypoint.affinity }}\n affinity:\n {{- toYaml .Values.global.waypoint.affinity | nindent 8 }}\n {{- end }}\n {{- if .Values.global.waypoint.topologySpreadConstraints }}\n topologySpreadConstraints:\n {{- toYaml .Values.global.waypoint.topologySpreadConstraints | nindent 8 }}\n {{- end }}\n {{- if .Values.global.waypoint.nodeSelector }}\n nodeSelector:\n {{- toYaml .Values.global.waypoint.nodeSelector | nindent 8 }}\n {{- end }}\n {{- if .Values.global.waypoint.tolerations }}\n tolerations:\n {{- toYaml .Values.global.waypoint.tolerations | nindent 8 }}\n {{- end }}\n terminationGracePeriodSeconds: 2\n serviceAccountName: {{.ServiceAccount | quote}}\n containers:\n - name: istio-proxy\n ports:\n - containerPort: 15020\n name: metrics\n protocol: TCP\n - containerPort: 15021\n name: status-port\n protocol: TCP\n - containerPort: 15090\n protocol: TCP\n name: http-envoy-prom\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n args:\n - proxy\n - waypoint\n - --domain\n \ + \ - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}\n - --serviceCluster\n - {{.ServiceAccount}}.$(POD_NAMESPACE)\n - --proxyLogLevel\n - {{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel | quote}}\n - --proxyComponentLogLevel\n - {{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel | quote}}\n - --log_output_level\n - {{ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level | quote}}\n {{- if .Values.global.logAsJson }}\n - --log_as_json\n {{- end }}\n env:\n - name: ISTIO_META_SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: ISTIO_META_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: spec.nodeName\n - name: PILOT_CERT_PROVIDER\n value: {{ .Values.global.pilotCertProvider }}\n - name: CA_ADDR\n {{- if .Values.global.caAddress }}\n value: {{ .Values.global.caAddress }}\n {{- else }}\n value: istiod{{- if not (eq .Values.revision \"\") }}-{{ .Values.revision }}{{- end }}.{{ .Values.global.istioNamespace }}.svc:15012\n {{- end }}\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: HOST_IP\n valueFrom:\n fieldRef:\n fieldPath: status.hostIP\n - name: ISTIO_CPU_LIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: PROXY_CONFIG\n value: |\n {{ protoToJSON .ProxyConfig }}\n {{- if .ProxyConfig.ProxyMetadata }}\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{- end }}\n - name: GOMEMLIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.memory\n - name: GOMAXPROCS\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: ISTIO_META_CLUSTER_ID\n value: \"{{ valueOrDefault .Values.global.multiCluster.clusterName `Kubernetes` }}\"\n {{- $network := valueOrDefault (index .InfrastructureLabels `topology.istio.io/network`) .Values.global.network }}\n {{- if $network }}\n - name: ISTIO_META_NETWORK\n value: \"{{ $network }}\"\n {{- end }}\n - name: ISTIO_META_INTERCEPTION_MODE\n value: REDIRECT\n - name: ISTIO_META_WORKLOAD_NAME\n value: {{.DeploymentName}}\n - name: ISTIO_META_OWNER\n value: kubernetes://apis/apps/v1/namespaces/{{.Namespace}}/deployments/{{.DeploymentName}}\n {{- if .Values.global.meshID }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ .Values.global.meshID }}\"\n {{- else if (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\"\n {{- end }}\n {{- if .Values.global.waypoint.resources }}\n resources:\n {{- toYaml\ + \ .Values.global.waypoint.resources | nindent 10 }}\n {{- end }}\n startupProbe:\n failureThreshold: 30\n httpGet:\n path: /healthz/ready\n port: 15021\n scheme: HTTP\n initialDelaySeconds: 1\n periodSeconds: 1\n successThreshold: 1\n timeoutSeconds: 1\n readinessProbe:\n failureThreshold: 4\n httpGet:\n path: /healthz/ready\n port: 15021\n scheme: HTTP\n initialDelaySeconds: 0\n periodSeconds: 15\n successThreshold: 1\n timeoutSeconds: 1\n securityContext:\n privileged: false\n {{- if not (eq .Values.global.platform \"openshift\") }}\n runAsGroup: 1337\n runAsUser: 1337\n {{- end }}\n allowPrivilegeEscalation: false\n readOnlyRootFilesystem: true\n runAsNonRoot: true\n capabilities:\n drop:\n - ALL\n {{- if .Values.gateways.seccompProfile }}\n seccompProfile:\n {{- toYaml .Values.gateways.seccompProfile | nindent 12 }}\n {{- end }}\n volumeMounts:\n - mountPath: /var/run/secrets/workload-spiffe-uds\n name: workload-socket\n - mountPath: /var/run/secrets/istio\n name: istiod-ca-cert\n - mountPath: /var/lib/istio/data\n name: istio-data\n - mountPath: /etc/istio/proxy\n name: istio-envoy\n - mountPath: /var/run/secrets/tokens\n name: istio-token\n - mountPath: /etc/istio/pod\n name: istio-podinfo\n volumes:\n - emptyDir: {}\n name: workload-socket\n - emptyDir:\n medium: Memory\n name: istio-envoy\n - emptyDir:\n medium: Memory\n name: go-proxy-envoy\n - emptyDir: {}\n name: istio-data\n - emptyDir: {}\n name: go-proxy-data\n - downwardAPI:\n items:\n - fieldRef:\n fieldPath: metadata.labels\n path: labels\n - fieldRef:\n fieldPath: metadata.annotations\n path: annotations\n name: istio-podinfo\n - name: istio-token\n projected:\n sources:\n - serviceAccountToken:\n audience: istio-ca\n expirationSeconds: 43200\n path: istio-token\n - configMap:\n name: istio-ca-root-cert\n name: istiod-ca-cert\n {{- if .Values.global.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n ---\n apiVersion: v1\n kind: Service\n metadata:\n annotations:\n {{ toJsonMap\n (strdict \"networking.istio.io/traffic-distribution\" \"PreferClose\")\n (omit .InfrastructureAnnotations\n \"kubectl.kubernetes.io/last-applied-configuration\"\n \"gateway.istio.io/name-override\"\n \"gateway.istio.io/service-account\"\n \"gateway.istio.io/controller-version\"\n ) | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n ) | nindent 4 }}\n name: {{.DeploymentName | quote}}\n namespace: {{.Namespace | quote}}\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: \"{{.Name}}\"\n uid: \"{{.UID}}\"\n spec:\n ipFamilyPolicy: PreferDualStack\n ports:\n {{- range $key, $val := .Ports }}\n - name: {{ $val.Name | quote }}\n port:\ + \ {{ $val.Port }}\n protocol: TCP\n appProtocol: {{ $val.AppProtocol }}\n {{- end }}\n selector:\n \"{{.GatewayNameLabel}}\": \"{{.Name}}\"\n {{- if and (.Spec.Addresses) (eq .ServiceType \"LoadBalancer\") }}\n loadBalancerIP: {{ (index .Spec.Addresses 0).Value | quote}}\n {{- end }}\n type: {{ .ServiceType | quote }}\n ---\n kube-gateway: |\n apiVersion: v1\n kind: ServiceAccount\n metadata:\n name: {{.ServiceAccount | quote}}\n namespace: {{.Namespace | quote}}\n annotations:\n {{- toJsonMap (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\") | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n ) | nindent 4 }}\n {{- if ge .KubeVersion 128 }}\n # Safe since 1.28: https://github.com/kubernetes/kubernetes/pull/117412\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: \"{{.Name}}\"\n uid: \"{{.UID}}\"\n {{- end }}\n ---\n apiVersion: apps/v1\n kind: Deployment\n metadata:\n name: {{.DeploymentName | quote}}\n namespace: {{.Namespace | quote}}\n annotations:\n {{- toJsonMap (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\") | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n \"gateway.istio.io/managed\" \"istio.io-gateway-controller\"\n ) | nindent 4 }}\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: {{.Name}}\n uid: \"{{.UID}}\"\n spec:\n selector:\n matchLabels:\n \"{{.GatewayNameLabel}}\": {{.Name}}\n template:\n metadata:\n annotations:\n {{- toJsonMap\n (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\")\n (strdict \"istio.io/rev\" (.Revision | default \"default\"))\n (strdict\n \"prometheus.io/path\" \"/stats/prometheus\"\n \"prometheus.io/port\" \"15020\"\n \"prometheus.io/scrape\" \"true\"\n ) | nindent 8 }}\n labels:\n {{- toJsonMap\n (strdict\n \"sidecar.istio.io/inject\" \"false\"\n \"service.istio.io/canonical-name\" .DeploymentName\n \"service.istio.io/canonical-revision\" \"latest\"\n )\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n \"gateway.istio.io/managed\" \"istio.io-gateway-controller\"\n ) | nindent 8 }}\n spec:\n securityContext:\n {{- if .Values.gateways.securityContext }}\n {{- toYaml .Values.gateways.securityContext | nindent 8 }}\n {{- else }}\n sysctls:\n - name: net.ipv4.ip_unprivileged_port_start\n value: \"0\"\n {{- if .Values.gateways.seccompProfile }}\n seccompProfile:\n {{- toYaml .Values.gateways.seccompProfile | nindent 10 }}\n {{- end }}\n {{- end }}\n serviceAccountName: {{.ServiceAccount | quote}}\n containers:\n - name: istio-proxy\n {{- if contains \"/\" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }}\n image: \"{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage`\ + \ .Values.global.proxy.image }}\"\n {{- else }}\n image: \"{{ .ProxyImage }}\"\n {{- end }}\n {{- if .Values.global.proxy.resources }}\n resources:\n {{- toYaml .Values.global.proxy.resources | nindent 10 }}\n {{- end }}\n {{with .Values.global.imagePullPolicy }}imagePullPolicy: \"{{.}}\"{{end}}\n securityContext:\n capabilities:\n drop:\n - ALL\n allowPrivilegeEscalation: false\n privileged: false\n readOnlyRootFilesystem: true\n runAsUser: {{ .ProxyUID | default \"1337\" }}\n runAsGroup: {{ .ProxyGID | default \"1337\" }}\n runAsNonRoot: true\n ports:\n - containerPort: 15020\n name: metrics\n protocol: TCP\n - containerPort: 15021\n name: status-port\n protocol: TCP\n - containerPort: 15090\n protocol: TCP\n name: http-envoy-prom\n args:\n - proxy\n - router\n - --domain\n - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }}\n - --proxyLogLevel\n - {{ annotation .ObjectMeta `sidecar.istio.io/logLevel` .Values.global.proxy.logLevel | quote}}\n - --proxyComponentLogLevel\n - {{ annotation .ObjectMeta `sidecar.istio.io/componentLogLevel` .Values.global.proxy.componentLogLevel | quote}}\n - --log_output_level\n - {{ annotation .ObjectMeta `sidecar.istio.io/agentLogLevel` .Values.global.logging.level | quote}}\n {{- if .Values.global.sts.servicePort }}\n - --stsPort={{ .Values.global.sts.servicePort }}\n {{- end }}\n {{- if .Values.global.logAsJson }}\n - --log_as_json\n {{- end }}\n {{- if .Values.global.proxy.lifecycle }}\n lifecycle:\n {{- toYaml .Values.global.proxy.lifecycle | nindent 10 }}\n {{- end }}\n env:\n - name: PILOT_CERT_PROVIDER\n value: {{ .Values.global.pilotCertProvider }}\n - name: CA_ADDR\n {{- if .Values.global.caAddress }}\n value: {{ .Values.global.caAddress }}\n {{- else }}\n value: istiod{{- if not (eq .Values.revision \"\") }}-{{ .Values.revision }}{{- end }}.{{ .Values.global.istioNamespace }}.svc:15012\n {{- end }}\n - name: POD_NAME\n valueFrom:\n fieldRef:\n fieldPath: metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: INSTANCE_IP\n valueFrom:\n fieldRef:\n fieldPath: status.podIP\n - name: SERVICE_ACCOUNT\n valueFrom:\n fieldRef:\n fieldPath: spec.serviceAccountName\n - name: HOST_IP\n valueFrom:\n fieldRef:\n fieldPath: status.hostIP\n - name: ISTIO_CPU_LIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: PROXY_CONFIG\n value: |\n {{ protoToJSON .ProxyConfig }}\n - name: ISTIO_META_POD_PORTS\n value: \"[]\"\n - name: ISTIO_META_APP_CONTAINERS\n value: \"\"\n - name: GOMEMLIMIT\n valueFrom:\n resourceFieldRef:\n resource: limits.memory\n - name: GOMAXPROCS\n valueFrom:\n resourceFieldRef:\n resource: limits.cpu\n - name: ISTIO_META_CLUSTER_ID\n value: \"{{ valueOrDefault .Values.global.multiCluster.clusterName .ClusterID }}\"\n - name: ISTIO_META_NODE_NAME\n valueFrom:\n \ + \ fieldRef:\n fieldPath: spec.nodeName\n - name: ISTIO_META_INTERCEPTION_MODE\n value: \"{{ .ProxyConfig.InterceptionMode.String }}\"\n {{- with (valueOrDefault (index .InfrastructureLabels \"topology.istio.io/network\") .Values.global.network) }}\n - name: ISTIO_META_NETWORK\n value: {{.|quote}}\n {{- end }}\n - name: ISTIO_META_WORKLOAD_NAME\n value: {{.DeploymentName|quote}}\n - name: ISTIO_META_OWNER\n value: \"kubernetes://apis/apps/v1/namespaces/{{.Namespace}}/deployments/{{.DeploymentName}}\"\n {{- if .Values.global.meshID }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ .Values.global.meshID }}\"\n {{- else if (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: ISTIO_META_MESH_ID\n value: \"{{ (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\"\n {{- end }}\n {{- with (valueOrDefault .MeshConfig.TrustDomain .Values.global.trustDomain) }}\n - name: TRUST_DOMAIN\n value: \"{{ . }}\"\n {{- end }}\n {{- range $key, $value := .ProxyConfig.ProxyMetadata }}\n - name: {{ $key }}\n value: \"{{ $value }}\"\n {{- end }}\n {{- with (index .InfrastructureLabels \"topology.istio.io/network\") }}\n - name: ISTIO_META_REQUESTED_NETWORK_VIEW\n value: {{.|quote}}\n {{- end }}\n startupProbe:\n failureThreshold: 30\n httpGet:\n path: /healthz/ready\n port: 15021\n scheme: HTTP\n initialDelaySeconds: 1\n periodSeconds: 1\n successThreshold: 1\n timeoutSeconds: 1\n readinessProbe:\n failureThreshold: 4\n httpGet:\n path: /healthz/ready\n port: 15021\n scheme: HTTP\n initialDelaySeconds: 0\n periodSeconds: 15\n successThreshold: 1\n timeoutSeconds: 1\n volumeMounts:\n - name: workload-socket\n mountPath: /var/run/secrets/workload-spiffe-uds\n - name: credential-socket\n mountPath: /var/run/secrets/credential-uds\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n mountPath: /var/run/secrets/workload-spiffe-credentials\n readOnly: true\n {{- else }}\n - name: workload-certs\n mountPath: /var/run/secrets/workload-spiffe-credentials\n {{- end }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - mountPath: /var/run/secrets/istio\n name: istiod-ca-cert\n {{- end }}\n - mountPath: /var/lib/istio/data\n name: istio-data\n # SDS channel between istioagent and Envoy\n - mountPath: /etc/istio/proxy\n name: istio-envoy\n - mountPath: /var/run/secrets/tokens\n name: istio-token\n - name: istio-podinfo\n mountPath: /etc/istio/pod\n volumes:\n - emptyDir: {}\n name: workload-socket\n - emptyDir: {}\n name: credential-socket\n {{- if eq .Values.global.caName \"GkeWorkloadCertificate\" }}\n - name: gke-workload-certificate\n csi:\n driver: workloadcertificates.security.cloud.google.com\n {{- else}}\n - emptyDir: {}\n name: workload-certs\n {{- end }}\n # SDS channel between istioagent and Envoy\n - emptyDir:\n medium: Memory\n name: istio-envoy\n - name: istio-data\n emptyDir: {}\n - name: istio-podinfo\n downwardAPI:\n\ + \ items:\n - path: \"labels\"\n fieldRef:\n fieldPath: metadata.labels\n - path: \"annotations\"\n fieldRef:\n fieldPath: metadata.annotations\n - name: istio-token\n projected:\n sources:\n - serviceAccountToken:\n path: istio-token\n expirationSeconds: 43200\n audience: {{ .Values.global.sds.token.aud }}\n {{- if eq .Values.global.pilotCertProvider \"istiod\" }}\n - name: istiod-ca-cert\n configMap:\n name: istio-ca-root-cert\n {{- end }}\n {{- if .Values.global.imagePullSecrets }}\n imagePullSecrets:\n {{- range .Values.global.imagePullSecrets }}\n - name: {{ . }}\n {{- end }}\n {{- end }}\n ---\n apiVersion: v1\n kind: Service\n metadata:\n annotations:\n {{ toJsonMap (omit .InfrastructureAnnotations \"kubectl.kubernetes.io/last-applied-configuration\" \"gateway.istio.io/name-override\" \"gateway.istio.io/service-account\" \"gateway.istio.io/controller-version\") | nindent 4 }}\n labels:\n {{- toJsonMap\n .InfrastructureLabels\n (strdict\n \"gateway.networking.k8s.io/gateway-name\" .Name\n ) | nindent 4 }}\n name: {{.DeploymentName | quote}}\n namespace: {{.Namespace | quote}}\n ownerReferences:\n - apiVersion: gateway.networking.k8s.io/v1beta1\n kind: Gateway\n name: {{.Name}}\n uid: {{.UID}}\n spec:\n ipFamilyPolicy: PreferDualStack\n ports:\n {{- range $key, $val := .Ports }}\n - name: {{ $val.Name | quote }}\n port: {{ $val.Port }}\n protocol: TCP\n appProtocol: {{ $val.AppProtocol }}\n {{- end }}\n selector:\n \"{{.GatewayNameLabel}}\": {{.Name}}\n {{- if and (.Spec.Addresses) (eq .ServiceType \"LoadBalancer\") }}\n loadBalancerIP: {{ (index .Spec.Addresses 0).Value | quote}}\n {{- end }}\n type: {{ .ServiceType | quote }}\n ---" diff --git a/rmk/infrastructure/istio-pilot/configmap-istio.yaml b/rmk/infrastructure/istio-pilot/configmap-istio.yaml new file mode 100644 index 0000000..30431e1 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/configmap-istio.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: istio + namespace: istio-system + labels: + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +data: + meshNetworks: 'networks: {}' + mesh: "defaultConfig:\n discoveryAddress: istiod.istio-system.svc:15012\n tracing:\n custom_tags:\n client_ip:\n header:\n name: x-forwarded-for\n user.id:\n header:\n name: x-user-id\n sampling: 100\n zipkin:\n address: otel-collector.opentelemetry-collector.svc.cluster.local:9411\ndefaultProviders:\n metrics:\n - prometheus\nenablePrometheusMerge: true\nenableTracing: true\nextensionProviders:\n- envoyOtelAls:\n logFormat:\n labels:\n authority: '%REQ(:AUTHORITY)%'\n bytes_in: '%BYTES_RECEIVED%'\n bytes_out: '%BYTES_SENT%'\n downstream_ip: '%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%'\n duration_ms: '%DURATION%'\n method: '%REQ(:METHOD)%'\n path: '%REQ_WITHOUT_QUERY(:PATH)%'\n protocol: '%PROTOCOL%'\n request_id: '%REQ(X-REQUEST-ID)%'\n response_code: '%RESPONSE_CODE%'\n response_flags: '%RESPONSE_FLAGS%'\n route: '%ROUTE_NAME%'\n sarex_kind: mesh_access\n start_time: '%START_TIME%'\n trace_id: '%TRACE_ID%'\n upstream_cluster: '%UPSTREAM_CLUSTER%'\n user_agent: '%REQ(USER-AGENT)%'\n user_org: '%REQ(X-SAREX-AUDIT-ORG)%'\n user_sub: '%REQ(X-SAREX-AUDIT-SUB)%'\n x_forwarded_for: '%REQ(X-FORWARDED-FOR)%'\n port: 4317\n service: access-collector.security-audit.svc.cluster.local\n name: audit-access\nrootNamespace: istio-system\ntrustDomain: cluster.local" diff --git a/rmk/infrastructure/istio-pilot/deployment-istiod.yaml b/rmk/infrastructure/istio-pilot/deployment-istiod.yaml new file mode 100644 index 0000000..ee9d99b --- /dev/null +++ b/rmk/infrastructure/istio-pilot/deployment-istiod.yaml @@ -0,0 +1,185 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + istio: pilot + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +spec: + strategy: + rollingUpdate: + maxSurge: 100% + maxUnavailable: 25% + selector: + matchLabels: + istio: pilot + template: + metadata: + labels: + app: istiod + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + sidecar.istio.io/inject: 'false' + operator.istio.io/component: Pilot + istio: pilot + istio.io/dataplane-mode: none + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 + annotations: + prometheus.io/port: '15014' + prometheus.io/scrape: 'true' + sidecar.istio.io/inject: 'false' + spec: + tolerations: + - key: cni.istio.io/not-ready + operator: Exists + serviceAccountName: istiod + containers: + - name: discovery + image: cr.yandex/crp3ccidau046kdj8g9q/contour/istio/pilot:1.24.0 + args: + - discovery + - --monitoringAddr=:15014 + - --log_output_level=default:info + - --domain + - cluster.local + - --keepaliveMaxServerConnectionAge + - 30m + ports: + - containerPort: 8080 + protocol: TCP + name: http-debug + - containerPort: 15010 + protocol: TCP + name: grpc-xds + - containerPort: 15012 + protocol: TCP + name: tls-xds + - containerPort: 15017 + protocol: TCP + name: https-webhooks + - containerPort: 15014 + protocol: TCP + name: http-monitoring + readinessProbe: + httpGet: + path: /ready + port: 8080 + initialDelaySeconds: 1 + periodSeconds: 3 + timeoutSeconds: 5 + env: + - name: REVISION + value: default + - name: PILOT_CERT_PROVIDER + value: istiod + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: SERVICE_ACCOUNT + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.serviceAccountName + - name: KUBECONFIG + value: /var/run/secrets/remote/config + - name: CA_TRUSTED_NODE_ACCOUNTS + value: istio-system/ztunnel + - name: PILOT_JWT_ENABLE_REMOTE_JWKS + value: envoy + - name: PILOT_TRACE_SAMPLING + value: '100' + - name: PILOT_ENABLE_ANALYSIS + value: 'false' + - name: CLUSTER_ID + value: Kubernetes + - name: GOMEMLIMIT + valueFrom: + resourceFieldRef: + resource: limits.memory + - name: GOMAXPROCS + valueFrom: + resourceFieldRef: + resource: limits.cpu + divisor: '1' + - name: PLATFORM + value: '' + resources: + requests: + cpu: 500m + memory: 2048Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + volumeMounts: + - name: istio-token + mountPath: /var/run/secrets/tokens + readOnly: true + - name: local-certs + mountPath: /var/run/secrets/istio-dns + - name: cacerts + mountPath: /etc/cacerts + readOnly: true + - name: istio-kubeconfig + mountPath: /var/run/secrets/remote + readOnly: true + - name: istio-csr-dns-cert + mountPath: /var/run/secrets/istiod/tls + readOnly: true + - name: istio-csr-ca-configmap + mountPath: /var/run/secrets/istiod/ca + readOnly: true + volumes: + - emptyDir: + medium: Memory + name: local-certs + - name: istio-token + projected: + sources: + - serviceAccountToken: + audience: istio-ca + expirationSeconds: 43200 + path: istio-token + - name: cacerts + secret: + secretName: cacerts + optional: true + - name: istio-kubeconfig + secret: + secretName: istio-kubeconfig + optional: true + - name: istio-csr-dns-cert + secret: + secretName: istiod-tls + optional: true + - name: istio-csr-ca-configmap + configMap: + name: istio-ca-root-cert + defaultMode: 420 + optional: true diff --git a/rmk/infrastructure/istio-pilot/horizontalpodautoscaler-istiod.yaml b/rmk/infrastructure/istio-pilot/horizontalpodautoscaler-istiod.yaml new file mode 100644 index 0000000..ac248d5 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/horizontalpodautoscaler-istiod.yaml @@ -0,0 +1,31 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + release: istiod + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +spec: + maxReplicas: 5 + minReplicas: 1 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: istiod + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 80 diff --git a/rmk/infrastructure/istio-pilot/mutatingwebhookconfiguration-istio-sidecar-injector.yaml b/rmk/infrastructure/istio-pilot/mutatingwebhookconfiguration-istio-sidecar-injector.yaml new file mode 100644 index 0000000..aa4837c --- /dev/null +++ b/rmk/infrastructure/istio-pilot/mutatingwebhookconfiguration-istio-sidecar-injector.yaml @@ -0,0 +1,157 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: istio-sidecar-injector + labels: + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + app: sidecar-injector + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +webhooks: +- name: rev.namespace.sidecar-injector.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /inject + port: 443 + sideEffects: None + rules: + - operations: + - CREATE + apiGroups: + - '' + apiVersions: + - v1 + resources: + - pods + failurePolicy: Fail + reinvocationPolicy: Never + admissionReviewVersions: + - v1 + namespaceSelector: + matchExpressions: + - key: istio.io/rev + operator: In + values: + - default + - key: istio-injection + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: sidecar.istio.io/inject + operator: NotIn + values: + - 'false' +- name: rev.object.sidecar-injector.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /inject + port: 443 + sideEffects: None + rules: + - operations: + - CREATE + apiGroups: + - '' + apiVersions: + - v1 + resources: + - pods + failurePolicy: Fail + reinvocationPolicy: Never + admissionReviewVersions: + - v1 + namespaceSelector: + matchExpressions: + - key: istio.io/rev + operator: DoesNotExist + - key: istio-injection + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: sidecar.istio.io/inject + operator: NotIn + values: + - 'false' + - key: istio.io/rev + operator: In + values: + - default +- name: namespace.sidecar-injector.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /inject + port: 443 + sideEffects: None + rules: + - operations: + - CREATE + apiGroups: + - '' + apiVersions: + - v1 + resources: + - pods + failurePolicy: Fail + reinvocationPolicy: Never + admissionReviewVersions: + - v1 + namespaceSelector: + matchExpressions: + - key: istio-injection + operator: In + values: + - enabled + objectSelector: + matchExpressions: + - key: sidecar.istio.io/inject + operator: NotIn + values: + - 'false' +- name: object.sidecar-injector.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /inject + port: 443 + sideEffects: None + rules: + - operations: + - CREATE + apiGroups: + - '' + apiVersions: + - v1 + resources: + - pods + failurePolicy: Fail + reinvocationPolicy: Never + admissionReviewVersions: + - v1 + namespaceSelector: + matchExpressions: + - key: istio-injection + operator: DoesNotExist + - key: istio.io/rev + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: sidecar.istio.io/inject + operator: In + values: + - 'true' + - key: istio.io/rev + operator: DoesNotExist diff --git a/rmk/infrastructure/istio-pilot/poddisruptionbudget-istiod.yaml b/rmk/infrastructure/istio-pilot/poddisruptionbudget-istiod.yaml new file mode 100644 index 0000000..2eb4a45 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/poddisruptionbudget-istiod.yaml @@ -0,0 +1,24 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + release: istiod + istio: pilot + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +spec: + minAvailable: 1 + selector: + matchLabels: + app: istiod + istio: pilot diff --git a/rmk/infrastructure/istio-pilot/role-istiod.yaml b/rmk/infrastructure/istio-pilot/role-istiod.yaml new file mode 100644 index 0000000..8e7f7b3 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/role-istiod.yaml @@ -0,0 +1,47 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +rules: +- apiGroups: + - networking.istio.io + verbs: + - create + resources: + - gateways +- apiGroups: + - '' + resources: + - secrets + verbs: + - create + - get + - watch + - list + - update + - delete +- apiGroups: + - '' + resources: + - configmaps + verbs: + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - update + - patch + - create diff --git a/rmk/infrastructure/istio-pilot/rolebinding-istiod.yaml b/rmk/infrastructure/istio-pilot/rolebinding-istiod.yaml new file mode 100644 index 0000000..c35fdf1 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/rolebinding-istiod.yaml @@ -0,0 +1,22 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: istiod +subjects: +- kind: ServiceAccount + name: istiod + namespace: istio-system diff --git a/rmk/infrastructure/istio-pilot/service-istiod.yaml b/rmk/infrastructure/istio-pilot/service-istiod.yaml new file mode 100644 index 0000000..7bdeca9 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/service-istiod.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: Service +metadata: + name: istiod + namespace: istio-system + labels: + istio.io/rev: default + install.operator.istio.io/owning-resource: unknown + operator.istio.io/component: Pilot + app: istiod + istio: pilot + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +spec: + ports: + - port: 15010 + name: grpc-xds + protocol: TCP + - port: 15012 + name: https-dns + protocol: TCP + - port: 443 + name: https-webhook + targetPort: 15017 + protocol: TCP + - port: 15014 + name: http-monitoring + protocol: TCP + selector: + app: istiod + istio: pilot diff --git a/rmk/infrastructure/istio-pilot/serviceaccount-istiod.yaml b/rmk/infrastructure/istio-pilot/serviceaccount-istiod.yaml new file mode 100644 index 0000000..7fdca8b --- /dev/null +++ b/rmk/infrastructure/istio-pilot/serviceaccount-istiod.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ServiceAccount +imagePullSecrets: +- name: regcred +metadata: + name: istiod + namespace: istio-system + labels: + app: istiod + release: istiod + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 diff --git a/rmk/infrastructure/istio-pilot/validatingwebhookconfiguration-istio-validator-istio-system.yaml b/rmk/infrastructure/istio-pilot/validatingwebhookconfiguration-istio-validator-istio-system.yaml new file mode 100644 index 0000000..3fba109 --- /dev/null +++ b/rmk/infrastructure/istio-pilot/validatingwebhookconfiguration-istio-validator-istio-system.yaml @@ -0,0 +1,45 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: istio-validator-istio-system + labels: + app: istiod + release: istiod + istio: istiod + istio.io/rev: default + app.kubernetes.io/name: istiod + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: istiod + app.kubernetes.io/part-of: istio + app.kubernetes.io/version: 1.24.0 + helm.sh/chart: istiod-contour-1.24.0 +webhooks: +- name: rev.validation.istio.io + clientConfig: + service: + name: istiod + namespace: istio-system + path: /validate + rules: + - operations: + - CREATE + - UPDATE + apiGroups: + - security.istio.io + - networking.istio.io + - telemetry.istio.io + - extensions.istio.io + apiVersions: + - '*' + resources: + - '*' + failurePolicy: Ignore + sideEffects: None + admissionReviewVersions: + - v1 + objectSelector: + matchExpressions: + - key: istio.io/rev + operator: In + values: + - default diff --git a/rmk/infrastructure/kafka/configmap-kafka-kafka-contour-controller-configuration.yaml b/rmk/infrastructure/kafka/configmap-kafka-kafka-contour-controller-configuration.yaml new file mode 100644 index 0000000..7ef4184 --- /dev/null +++ b/rmk/infrastructure/kafka/configmap-kafka-kafka-contour-controller-configuration.yaml @@ -0,0 +1,69 @@ +apiVersion: v1 +data: + server.properties: 'advertised.listeners=CLIENT://advertised-address-placeholder:9092,INTERNAL://advertised-address-placeholder:9094 + + controller.listener.names=CONTROLLER + + controller.quorum.bootstrap.servers=kafka-kafka-contour-controller-0.kafka-kafka-contour-controller-headless.kafka.svc.cluster.local:9093 + + default.replication.factor=1 + + inter.broker.listener.name=INTERNAL + + listener.name.client.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required; + + listener.name.client.scram-sha-512.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required; + + listener.name.client.ssl.client.auth=none + + listener.name.controller.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="controller_user" password="controller-password-placeholder" user_controller_user="controller-password-placeholder"; + + listener.name.controller.scram-sha-512.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="controller_user" password="controller-password-placeholder"; + + listener.name.internal.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="inter_broker_user" password="interbroker-password-placeholder" user_inter_broker_user="interbroker-password-placeholder"; + + listener.name.internal.scram-sha-512.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="inter_broker_user" password="interbroker-password-placeholder"; + + listener.security.protocol.map=CONTROLLER:SASL_PLAINTEXT,CLIENT:SASL_SSL,INTERNAL:SASL_PLAINTEXT + + listeners=CLIENT://:9092,INTERNAL://:9094,CONTROLLER://:9093 + + log.dir=/bitnami/kafka/data + + logs.dir=/opt/bitnami/kafka/logs + + min.insync.replicas=1 + + offsets.topic.replication.factor=1 + + process.roles=controller,broker + + sasl.enabled.mechanisms=PLAIN,SCRAM-SHA-512 + + sasl.mechanism.controller.protocol=PLAIN + + sasl.mechanism.inter.broker.protocol=PLAIN + + ssl.client.auth=required + + ssl.endpoint.identification.algorithm=https + + ssl.keystore.type=PEM + + ssl.truststore.type=PEM + + transaction.state.log.min.isr=1 + + transaction.state.log.replication.factor=1' +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-controller-configuration + namespace: kafka diff --git a/rmk/infrastructure/kafka/job-kafka-scram-users.yaml b/rmk/infrastructure/kafka/job-kafka-scram-users.yaml new file mode 100644 index 0000000..f5816c2 --- /dev/null +++ b/rmk/infrastructure/kafka/job-kafka-scram-users.yaml @@ -0,0 +1,83 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: kafka-scram-users + namespace: kafka + annotations: + kustomize.toolkit.fluxcd.io/force: enabled +spec: + backoffLimit: 2 + 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: kafka + vault.hashicorp.com/agent-inject-secret-admin: secrets/data/kafka/bootstrap + vault.hashicorp.com/agent-inject-template-admin: '{{- with secret "secrets/data/kafka/bootstrap" -}}{{ index .Data.data "interBrokerPassword" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-pm-user: secrets/data/kafka/apps/pm + vault.hashicorp.com/agent-inject-template-pm-user: '{{- with secret "secrets/data/kafka/apps/pm" -}}{{ index .Data.data "username" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-pm-pass: secrets/data/kafka/apps/pm + vault.hashicorp.com/agent-inject-template-pm-pass: '{{- with secret "secrets/data/kafka/apps/pm" -}}{{ index .Data.data "password" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-issues-user: secrets/data/kafka/apps/issues + vault.hashicorp.com/agent-inject-template-issues-user: '{{- with secret "secrets/data/kafka/apps/issues" -}}{{ index .Data.data "username" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-issues-pass: secrets/data/kafka/apps/issues + vault.hashicorp.com/agent-inject-template-issues-pass: '{{- with secret "secrets/data/kafka/apps/issues" -}}{{ index .Data.data "password" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-flows-user: secrets/data/kafka/apps/flows + vault.hashicorp.com/agent-inject-template-flows-user: '{{- with secret "secrets/data/kafka/apps/flows" -}}{{ index .Data.data "username" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-secret-flows-pass: secrets/data/kafka/apps/flows + vault.hashicorp.com/agent-inject-template-flows-pass: '{{- with secret "secrets/data/kafka/apps/flows" -}}{{ index .Data.data "password" }}{{- end -}} + + ' + spec: + serviceAccountName: kafka-kafka-contour + automountServiceAccountToken: true + restartPolicy: Never + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + securityContext: + runAsUser: 1001 + runAsNonRoot: true + fsGroup: 1001 + containers: + - name: kafka-scram-users + image: cr.yandex/crp3ccidau046kdj8g9q/contour/kafka-nn/kafka:4.0.0-debian-12-r10 + imagePullPolicy: IfNotPresent + env: + - name: KAFKA_HEAP_OPTS + value: -Xmx256m + command: + - /bin/bash + - -ec + - "K=/opt/bitnami/kafka/bin\nADMIN=kafka-kafka-contour-controller-0.kafka-kafka-contour-controller-headless.kafka.svc.cluster.local:9094\nCLIENT=kafka-kafka-contour.kafka.svc.cluster.local:9092\nS=/vault/secrets\nrc=0\nprintf 'security.protocol=SASL_PLAINTEXT\\nsasl.mechanism=PLAIN\\nsasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username=\"inter_broker_user\" password=\"%s\";\\n' \"$(cat $S/admin)\" > /tmp/admin.conf\nfor app in pm issues flows; do\n u=$(cat $S/$app-user); p=$(cat $S/$app-pass)\n if [ -z \"$u\" ] || [ -z \"$p\" ]; then\n echo \"$app: empty username or password in kafka/apps/$app\"; rc=1; continue\n fi\n if [ -f \"/tmp/pw-$u\" ]; then\n if [ \"$(cat /tmp/pw-$u)\" != \"$p\" ]; then\n echo \"$app: user $u already set from another app with a different password, skipped\"; rc=1\n else\n echo \"$app: user $u already set, same password\"\n fi\n continue\n fi\n printf '%s' \"$p\" > \"/tmp/pw-$u\"\n $K/kafka-configs.sh --bootstrap-server $ADMIN --command-config /tmp/admin.conf --alter --add-config \"SCRAM-SHA-512=[iterations=4096,password=$p]\" --entity-type users --entity-name \"$u\" > /dev/null\n echo \"$app: SCRAM-SHA-512 set for user $u\"\ndone\nsleep 5\nfor app in pm issues flows; do\n u=$(cat $S/$app-user); p=$(cat $S/$app-pass)\n printf 'security.protocol=SASL_SSL\\nsasl.mechanism=SCRAM-SHA-512\\nssl.truststore.type=PEM\\nssl.truststore.location=/kafka-ca/ca.crt\\nsasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username=\"%s\" password=\"%s\";\\n' \"$u\" \"$p\" > /tmp/$app.conf\n if $K/kafka-topics.sh --bootstrap-server $CLIENT --command-config /tmp/$app.conf --list > /dev/null; then\n echo \"$app: login as $u over SASL_SSL ok\"\n else\n echo \"$app: login as $u over SASL_SSL FAILED\"; rc=1\n fi\ndone\n$K/kafka-configs.sh --bootstrap-server $ADMIN --command-config /tmp/admin.conf --describe --entity-type users\nrm -f /tmp/*.conf /tmp/pw-*\nexit $rc\n" + resources: + requests: + cpu: 50m + memory: 384Mi + volumeMounts: + - name: kafka-ca + mountPath: /kafka-ca + readOnly: true + volumes: + - name: kafka-ca + secret: + secretName: kafka-kafka-contour-tls + items: + - key: ca.crt + path: ca.crt diff --git a/rmk/infrastructure/kafka/namespace-kafka.yaml b/rmk/infrastructure/kafka/namespace-kafka.yaml new file mode 100644 index 0000000..116536b --- /dev/null +++ b/rmk/infrastructure/kafka/namespace-kafka.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kafka + labels: + istio-injection: enabled diff --git a/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-broker.yaml b/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-broker.yaml new file mode 100644 index 0000000..c535f43 --- /dev/null +++ b/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-broker.yaml @@ -0,0 +1,29 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/component: broker + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-broker + namespace: kafka +spec: + egress: + - {} + ingress: + - ports: + - port: 9092 + - port: 9094 + podSelector: + matchLabels: + app.kubernetes.io/component: broker + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + policyTypes: + - Ingress + - Egress diff --git a/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-controller.yaml b/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-controller.yaml new file mode 100644 index 0000000..6822bbf --- /dev/null +++ b/rmk/infrastructure/kafka/networkpolicy-kafka-kafka-contour-controller.yaml @@ -0,0 +1,30 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-controller + namespace: kafka +spec: + egress: + - {} + ingress: + - ports: + - port: 9093 + - port: 9092 + - port: 9094 + podSelector: + matchLabels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + policyTypes: + - Ingress + - Egress diff --git a/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-broker.yaml b/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-broker.yaml new file mode 100644 index 0000000..64b62c8 --- /dev/null +++ b/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-broker.yaml @@ -0,0 +1,21 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/component: broker + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-broker + namespace: kafka +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/component: broker + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka diff --git a/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-controller.yaml b/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-controller.yaml new file mode 100644 index 0000000..e9aafdb --- /dev/null +++ b/rmk/infrastructure/kafka/poddisruptionbudget-kafka-kafka-contour-controller.yaml @@ -0,0 +1,21 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-controller + namespace: kafka +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka diff --git a/rmk/infrastructure/kafka/service-kafka-kafka-contour-controller-headless.yaml b/rmk/infrastructure/kafka/service-kafka-kafka-contour-controller-headless.yaml new file mode 100644 index 0000000..10e9f94 --- /dev/null +++ b/rmk/infrastructure/kafka/service-kafka-kafka-contour-controller-headless.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-controller-headless + namespace: kafka +spec: + clusterIP: None + ports: + - name: tcp-interbroker + port: 9094 + protocol: TCP + targetPort: interbroker + - name: tcp-client + port: 9092 + protocol: TCP + targetPort: client + - name: tcp-controller + port: 9093 + protocol: TCP + targetPort: controller + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + type: ClusterIP diff --git a/rmk/infrastructure/kafka/service-kafka-kafka-contour.yaml b/rmk/infrastructure/kafka/service-kafka-kafka-contour.yaml new file mode 100644 index 0000000..1f1777b --- /dev/null +++ b/rmk/infrastructure/kafka/service-kafka-kafka-contour.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: kafka + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour + namespace: kafka +spec: + ports: + - name: tcp-client + nodePort: null + port: 9092 + protocol: TCP + targetPort: client + selector: + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + sessionAffinity: None + type: ClusterIP diff --git a/rmk/infrastructure/kafka/serviceaccount-kafka-kafka-contour.yaml b/rmk/infrastructure/kafka/serviceaccount-kafka-kafka-contour.yaml new file mode 100644 index 0000000..1512fc0 --- /dev/null +++ b/rmk/infrastructure/kafka/serviceaccount-kafka-kafka-contour.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: kafka + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour + namespace: kafka diff --git a/rmk/infrastructure/kafka/statefulset-kafka-kafka-contour-controller.yaml b/rmk/infrastructure/kafka/statefulset-kafka-kafka-contour-controller.yaml new file mode 100644 index 0000000..511bab9 --- /dev/null +++ b/rmk/infrastructure/kafka/statefulset-kafka-kafka-contour-controller.yaml @@ -0,0 +1,309 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + name: kafka-kafka-contour-controller + namespace: kafka +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + serviceName: kafka-kafka-contour-controller-headless + template: + metadata: + annotations: + checksum/configuration: b57c3cb87ce0fe53ec223850b3f120cb6670bd27bbc1eb0acf04ef34a9cec22f + checksum/secret: e1bb07dc3d88ba30dc4edcfddf67bbb6c310331bac0adfe0a99de5e0c9df92e0 + checksum/tls-secret: 6e93cd86afe0759acd4df082f8dfc934ff758ff577f5765153bb524c2b7c8a72 + checksum/vault-bootstrap: f1c4ce89849196a46faac467e31194478405f764e5fb90574fc26505731bbc55 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-kafka-cluster-id: secrets/data/kafka/bootstrap + vault.hashicorp.com/agent-inject-secret-kafka-controller-password: secrets/data/kafka/bootstrap + vault.hashicorp.com/agent-inject-secret-kafka-inter-broker-password: secrets/data/kafka/bootstrap + vault.hashicorp.com/agent-inject-template-kafka-cluster-id: ' + + {{- with secret "secrets/data/kafka/bootstrap" -}}{{ index .Data.data "clusterId" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-template-kafka-controller-password: ' + + {{- with secret "secrets/data/kafka/bootstrap" -}}{{ index .Data.data "controllerPassword" }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-template-kafka-inter-broker-password: ' + + {{- with secret "secrets/data/kafka/bootstrap" -}}{{ index .Data.data "interBrokerPassword" }}{{- end -}} + + ' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: kafka + labels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kafka-contour + app.kubernetes.io/part-of: kafka + app.kubernetes.io/version: 4.0.0 + helm.sh/chart: kafka-contour-0.1.15 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/component: controller-eligible + app.kubernetes.io/instance: kafka + app.kubernetes.io/name: kafka-contour + topologyKey: kubernetes.io/hostname + weight: 1 + automountServiceAccountToken: true + containers: + - args: + - -ec + - "for pair in \\\n \"KAFKA_KRAFT_CLUSTER_ID:/vault/secrets/kafka-cluster-id\" \\\n \"KAFKA_INTER_BROKER_PASSWORD:/vault/secrets/kafka-inter-broker-password\" \\\n \"KAFKA_CONTROLLER_PASSWORD:/vault/secrets/kafka-controller-password\"\ndo\n key=\"${pair%%:*}\"\n file=\"${pair#*:}\"\n file_var=\"${key}_FILE\"\n if [ ! -f \"${file}\" ]; then\n echo \"Vault file ${file} not found\" >&2\n exit 1\n fi\n export \"${key}=$(tr -d '\\r\\n' < \"${file}\")\"\n unset \"${file_var}\"\ndone\nexec /opt/bitnami/scripts/kafka/entrypoint.sh /opt/bitnami/scripts/kafka/run.sh\n" + command: + - /bin/bash + env: + - name: KAFKA_HEAP_OPTS + value: -XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 + - name: KAFKA_CFG_PROCESS_ROLES + value: controller,broker + - name: KAFKA_INITIAL_CONTROLLERS_FILE + value: /shared/initial-controllers.txt + - name: BITNAMI_DEBUG + value: 'false' + - name: KAFKA_KRAFT_CLUSTER_ID_FILE + value: /vault/secrets/kafka-cluster-id + - name: KAFKA_INTER_BROKER_USER + value: inter_broker_user + - name: KAFKA_INTER_BROKER_PASSWORD_FILE + value: /vault/secrets/kafka-inter-broker-password + - name: KAFKA_CONTROLLER_USER + value: controller_user + - name: KAFKA_CONTROLLER_PASSWORD_FILE + value: /vault/secrets/kafka-controller-password + image: cr.yandex/crp3ccidau046kdj8g9q/contour/kafka-nn/kafka:4.0.0-debian-12-r10 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - pgrep + - -f + - kafka + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: kafka + ports: + - containerPort: 9093 + name: controller + - containerPort: 9092 + name: client + - containerPort: 9094 + name: interbroker + readinessProbe: + failureThreshold: 6 + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + tcpSocket: + port: controller + timeoutSeconds: 5 + resources: + limits: + cpu: 750m + ephemeral-storage: 2Gi + memory: 768Mi + requests: + cpu: 500m + ephemeral-storage: 50Mi + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + volumeMounts: + - mountPath: /bitnami/kafka + name: data + - mountPath: /opt/bitnami/kafka/logs + name: logs + - mountPath: /opt/bitnami/kafka/config/server.properties + name: kafka-config + subPath: server.properties + - mountPath: /tmp + name: tmp + - mountPath: /shared + name: init-shared + - mountPath: /opt/bitnami/kafka/config/certs + name: kafka-shared-certs + readOnly: true + enableServiceLinks: true + hostIPC: false + hostNetwork: false + imagePullSecrets: + - name: regcred + initContainers: + - args: + - -ec + - ". /opt/bitnami/scripts/libkafka.sh\nfile_to_multiline_property() {\n awk 'NR > 1{print line\"\\\\n\\\\\"}{line=$0;}END{print $0\" \"}' <\"${1:?missing file}\"\n}\nremove_previous_cert_value() {\n local key=\"${1:?missing key}\"\n local content\n if grep -q \"^[#\\\\s]*$key\\\\s*=.*\" \"$KAFKA_CONF_FILE\"; then\n content=\"$(sed \"/^[#\\\\s]*$key\\\\s*=.*-----BEGIN/,/-----END/d\" \"$KAFKA_CONF_FILE\")\"\n echo \"$content\" > \"$KAFKA_CONF_FILE\"\n fi\n}\nreplace_literal_in_file() {\n local file=\"${1:?missing file}\"\n local search=\"${2:?missing search}\"\n local replacement=\"${3-}\"\n local content\n content=\"$(cat \"$file\")\"\n content=\"${content//${search}/${replacement}}\"\n printf '%s' \"$content\" > \"$file\"\n}\nconfigure_kafka_tls() {\n # Remove previously existing keystores and certificates, if any\n rm -f /certs/kafka.keystore.jks /certs/kafka.truststore.jks\n rm -f /certs/tls.crt /certs/tls.key /certs/ca.crt\n find /certs -name \"xx*\" -exec rm {} \\;\n if [[ \"${KAFKA_TLS_TYPE}\" = \"PEM\" ]]; then\n # Copy PEM certificate and key\n if [[ -f \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.crt\" && \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.key\" ]]; then\n cp \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.crt\" /certs/tls.crt\n # Copy the PEM key ensuring the key used PEM format with PKCS#8\n openssl pkcs8 -topk8 -nocrypt -passin pass:\"${KAFKA_TLS_PEM_KEY_PASSWORD:-}\" -in \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.key\" > /certs/tls.key\n elif [[ -f /mounted-certs/tls.crt && -f /mounted-certs/tls.key ]]; then\n cp \"/mounted-certs/tls.crt\" /certs/tls.crt\n # Copy the PEM key ensuring the key used PEM format with PKCS#8\n openssl pkcs8 -topk8 -passin pass:\"${KAFKA_TLS_PEM_KEY_PASSWORD:-}\" -nocrypt -in \"/mounted-certs/tls.key\" > /certs/tls.key\n else\n error \"PEM key and cert files not found\"\n fi\n # Copy CA certificate\n if [[ -f /mounted-certs/ca.crt ]]; then\n cp /mounted-certs/ca.crt /certs/ca.crt\n else\n error \"CA certificate file not found\"\n fi\n remove_previous_cert_value \"ssl.keystore.key\"\n remove_previous_cert_value \"ssl.keystore.certificate.chain\"\n remove_previous_cert_value \"ssl.truststore.certificates\"\n kafka_server_conf_set \"ssl.keystore.key\" \"$(file_to_multiline_property \"/certs/tls.key\")\"\n kafka_server_conf_set \"ssl.keystore.certificate.chain\" \"$(file_to_multiline_property \"/certs/tls.crt\")\"\n kafka_server_conf_set \"ssl.truststore.certificates\" \"$(file_to_multiline_property \"/certs/ca.crt\")\"\n rm -f \"/certs/tls.crt\" \"/certs/tls.key\" \"/certs/ca.crt\"\n elif [[ \"$KAFKA_TLS_TYPE\" = \"JKS\" ]]; then\n if [[ -f \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.keystore.jks\" ]]; then\n cp \"/mounted-certs/kafka-${POD_ROLE}-${POD_ID}.keystore.jks\" /certs/kafka.keystore.jks\n elif [[ -f \"$KAFKA_TLS_KEYSTORE_FILE\" ]]; then\n cp \"$KAFKA_TLS_KEYSTORE_FILE\" /certs/kafka.keystore.jks\n else\n error \"Keystore file not found\"\n fi\n if [[ -f \"$KAFKA_TLS_TRUSTSTORE_FILE\" ]]; then\n cp \"$KAFKA_TLS_TRUSTSTORE_FILE\" /certs/kafka.truststore.jks\n else\n error \"Truststore file not found\"\n fi\n else\n error \"Invalid type $KAFKA_TLS_TYPE\"\n fi\n # Configure TLS password settings in Kafka configuration\n [[ -n \"${KAFKA_TLS_KEYSTORE_PASSWORD:-}\" ]] && kafka_server_conf_set \"ssl.keystore.password\" \"$KAFKA_TLS_KEYSTORE_PASSWORD\"\n [[ -n \"${KAFKA_TLS_TRUSTSTORE_PASSWORD:-}\" ]] && kafka_server_conf_set \"ssl.truststore.password\" \"$KAFKA_TLS_TRUSTSTORE_PASSWORD\"\n [[ -n \"${KAFKA_TLS_PEM_KEY_PASSWORD:-}\" ]] && kafka_server_conf_set \"ssl.key.password\" \"$KAFKA_TLS_PEM_KEY_PASSWORD\"\n # Avoid errors caused by previous checks\n true\n}\n\ + configure_kafka_sasl() {\n # Replace placeholders with passwords\n replace_literal_in_file \"$KAFKA_CONF_FILE\" \"interbroker-password-placeholder\" \"$KAFKA_INTER_BROKER_PASSWORD\"\n replace_literal_in_file \"$KAFKA_CONF_FILE\" \"controller-password-placeholder\" \"$KAFKA_CONTROLLER_PASSWORD\"\n read -r -a passwords <<< \"$(tr ',;' ' ' <<<\"${KAFKA_CLIENT_PASSWORDS:-}\")\"\n for ((i = 0; i < ${#passwords[@]}; i++)); do\n replace_literal_in_file \"$KAFKA_CONF_FILE\" \"password-placeholder-${i}\" \"${passwords[i]}\"\n done\n}\n\ncp /configmaps/server.properties $KAFKA_CONF_FILE\n\n# Get pod ID and role, last and second last fields in the pod name respectively\nPOD_ID=\"${MY_POD_NAME##*-}\"\nPOD_ROLE=\"${MY_POD_NAME%-*}\"; POD_ROLE=\"${POD_ROLE##*-}\"\n\n# Configure node.id\nID=$((POD_ID + KAFKA_MIN_ID))\n[[ -f \"/bitnami/kafka/data/meta.properties\" ]] && ID=\"$(grep \"node.id\" /bitnami/kafka/data/meta.properties | awk -F '=' '{print $2}')\"\nkafka_server_conf_set \"node.id\" \"$ID\"\n# Configure initial controllers\nif [[ \"controller\" =~ \"$POD_ROLE\" ]]; then\n INITIAL_CONTROLLERS=()\n for ((i = 0; i < 1; i++)); do\n var=\"KAFKA_CONTROLLER_${i}_DIR_ID\"; DIR_ID=\"${!var}\"\n [[ $i -eq $POD_ID ]] && [[ -f \"/bitnami/kafka/data/meta.properties\" ]] && DIR_ID=\"$(grep \"directory.id\" /bitnami/kafka/data/meta.properties | awk -F '=' '{print $2}')\"\n INITIAL_CONTROLLERS+=(\"${i}@${KAFKA_FULLNAME}-${POD_ROLE}-${i}.${KAFKA_CONTROLLER_SVC_NAME}.${MY_POD_NAMESPACE}.svc.${CLUSTER_DOMAIN}:${KAFKA_CONTROLLER_PORT}:${DIR_ID}\")\n done\n echo \"${INITIAL_CONTROLLERS[*]}\" | awk -v OFS=',' '{$1=$1}1' > /shared/initial-controllers.txt\nfi\nreplace_literal_in_file \"$KAFKA_CONF_FILE\" \"advertised-address-placeholder\" \"${MY_POD_NAME}.${KAFKA_FULLNAME}-${POD_ROLE}-headless.${MY_POD_NAMESPACE}.svc.${CLUSTER_DOMAIN}\"\nconfigure_kafka_tls\nsasl_env_vars=(\n KAFKA_CLIENT_PASSWORDS\n KAFKA_INTER_BROKER_PASSWORD\n KAFKA_INTER_BROKER_CLIENT_SECRET\n KAFKA_CONTROLLER_PASSWORD\n KAFKA_CONTROLLER_CLIENT_SECRET\n)\nfor env_var in \"${sasl_env_vars[@]}\"; do\n file_env_var=\"${env_var}_FILE\"\n if [[ -n \"${!file_env_var:-}\" ]]; then\n if [[ -r \"${!file_env_var:-}\" ]]; then\n export \"${env_var}=$(tr -d '\\r\\n' < \"${!file_env_var}\")\"\n unset \"${file_env_var}\"\n else\n warn \"Skipping export of '${env_var}'. '${!file_env_var:-}' is not readable.\"\n fi\n fi\ndone\nconfigure_kafka_sasl\nif [[ -f /secret-config/server-secret.properties ]]; then\n cat /secret-config/server-secret.properties >> $KAFKA_CONF_FILE\nfi\n" + command: + - /bin/bash + env: + - name: BITNAMI_DEBUG + value: 'false' + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: KAFKA_FULLNAME + value: kafka-kafka-contour + - name: CLUSTER_DOMAIN + value: cluster.local + - name: KAFKA_VOLUME_DIR + value: /bitnami/kafka + - name: KAFKA_CONF_FILE + value: /config/server.properties + - name: KAFKA_MIN_ID + value: '0' + - name: KAFKA_CONTROLLER_SVC_NAME + value: kafka-kafka-contour-controller-headless + - name: KAFKA_CONTROLLER_PORT + value: '9093' + - name: KAFKA_CONTROLLER_0_DIR_ID + valueFrom: + secretKeyRef: + key: controller-0-id + name: kafka-kafka-contour-kraft + - name: KAFKA_INTER_BROKER_USER + value: inter_broker_user + - name: KAFKA_INTER_BROKER_PASSWORD_FILE + value: /vault/secrets/kafka-inter-broker-password + - name: KAFKA_CONTROLLER_USER + value: controller_user + - name: KAFKA_CONTROLLER_PASSWORD_FILE + value: /vault/secrets/kafka-controller-password + - name: KAFKA_TLS_TYPE + value: PEM + image: cr.yandex/crp3ccidau046kdj8g9q/contour/kafka-nn/kafka:4.0.0-debian-12-r10 + imagePullPolicy: IfNotPresent + name: prepare-config + resources: + limits: + cpu: 150m + ephemeral-storage: 2Gi + memory: 192Mi + requests: + cpu: 100m + ephemeral-storage: 50Mi + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + add: [] + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /bitnami/kafka + name: data + - mountPath: /config + name: kafka-config + - mountPath: /configmaps + name: kafka-configmaps + - mountPath: /secret-config + name: kafka-secret-config + - mountPath: /tmp + name: tmp + - mountPath: /shared + name: init-shared + - mountPath: /certs + name: kafka-shared-certs + - mountPath: /mounted-certs + name: kafka-certs + readOnly: true + nodeSelector: + dedicated: generic + securityContext: + fsGroup: 1001 + fsGroupChangePolicy: Always + seccompProfile: + type: RuntimeDefault + supplementalGroups: [] + sysctls: [] + serviceAccountName: kafka-kafka-contour + tolerations: [] + volumes: + - configMap: + name: kafka-kafka-contour-controller-configuration + name: kafka-configmaps + - emptyDir: {} + name: kafka-secret-config + - emptyDir: {} + name: kafka-config + - emptyDir: {} + name: tmp + - emptyDir: {} + name: init-shared + - emptyDir: {} + name: kafka-shared-certs + - name: kafka-certs + projected: + defaultMode: 256 + sources: + - secret: + name: kafka-kafka-contour-tls + - emptyDir: {} + name: logs + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi + storageClassName: local-path diff --git a/rmk/infrastructure/rabbitmq/namespace-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/namespace-rabbitmq.yaml new file mode 100644 index 0000000..b701099 --- /dev/null +++ b/rmk/infrastructure/rabbitmq/namespace-rabbitmq.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: rabbitmq + labels: + istio-injection: enabled diff --git a/rmk/infrastructure/rabbitmq/networkpolicy-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/networkpolicy-rabbitmq.yaml new file mode 100644 index 0000000..eb2fcea --- /dev/null +++ b/rmk/infrastructure/rabbitmq/networkpolicy-rabbitmq.yaml @@ -0,0 +1,28 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq + namespace: rabbitmq +spec: + egress: + - {} + ingress: + - ports: + - port: 4369 + - port: 5672 + - port: 5671 + - port: 25672 + - port: 15672 + podSelector: + matchLabels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour + policyTypes: + - Ingress + - Egress diff --git a/rmk/infrastructure/rabbitmq/poddisruptionbudget-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/poddisruptionbudget-rabbitmq.yaml new file mode 100644 index 0000000..fc14cef --- /dev/null +++ b/rmk/infrastructure/rabbitmq/poddisruptionbudget-rabbitmq.yaml @@ -0,0 +1,17 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq + namespace: rabbitmq +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour diff --git a/rmk/infrastructure/rabbitmq/role-rabbitmq-endpoint-reader.yaml b/rmk/infrastructure/rabbitmq/role-rabbitmq-endpoint-reader.yaml new file mode 100644 index 0000000..d171de9 --- /dev/null +++ b/rmk/infrastructure/rabbitmq/role-rabbitmq-endpoint-reader.yaml @@ -0,0 +1,24 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq-endpoint-reader + namespace: rabbitmq +rules: +- apiGroups: + - '' + resources: + - endpoints + verbs: + - get +- apiGroups: + - '' + resources: + - events + verbs: + - create diff --git a/rmk/infrastructure/rabbitmq/rolebinding-rabbitmq-endpoint-reader.yaml b/rmk/infrastructure/rabbitmq/rolebinding-rabbitmq-endpoint-reader.yaml new file mode 100644 index 0000000..1c5838d --- /dev/null +++ b/rmk/infrastructure/rabbitmq/rolebinding-rabbitmq-endpoint-reader.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq-endpoint-reader + namespace: rabbitmq +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: rabbitmq-endpoint-reader +subjects: +- kind: ServiceAccount + name: rabbitmq diff --git a/rmk/infrastructure/rabbitmq/secret-rabbitmq-config.yaml b/rmk/infrastructure/rabbitmq/secret-rabbitmq-config.yaml new file mode 100644 index 0000000..ab3d1a5 --- /dev/null +++ b/rmk/infrastructure/rabbitmq/secret-rabbitmq-config.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + advanced.config: WwogIHtyYWJiaXQsIFsKICAgIHtsb29wYmFja191c2VycywgW119CiAgXX0KXS4= + rabbitmq.conf: IyMgVXNlcm5hbWUgYW5kIHBhc3N3b3JkCmRlZmF1bHRfdXNlciA9IF9fUkFCQklUTVFfVVNFUk5BTUVfXwojIyBDbHVzdGVyaW5nCiMjCmNsdXN0ZXJfbmFtZSA9IGluZnJhCmNsdXN0ZXJfZm9ybWF0aW9uLnBlZXJfZGlzY292ZXJ5X2JhY2tlbmQgID0gcmFiYml0X3BlZXJfZGlzY292ZXJ5X2s4cwpjbHVzdGVyX2Zvcm1hdGlvbi5rOHMuaG9zdCA9IGt1YmVybmV0ZXMuZGVmYXVsdApjbHVzdGVyX2Zvcm1hdGlvbi5rOHMuYWRkcmVzc190eXBlID0gaG9zdG5hbWUKY2x1c3Rlcl9mb3JtYXRpb24uazhzLnNlcnZpY2VfbmFtZSA9IHJhYmJpdG1xLWhlYWRsZXNzCmNsdXN0ZXJfZm9ybWF0aW9uLms4cy5ob3N0bmFtZV9zdWZmaXggPSAucmFiYml0bXEtaGVhZGxlc3MucmFiYml0bXEuc3ZjLmNsdXN0ZXIubG9jYWwKY2x1c3Rlcl9mb3JtYXRpb24ubm9kZV9jbGVhbnVwLmludGVydmFsID0gMTAKY2x1c3Rlcl9mb3JtYXRpb24ubm9kZV9jbGVhbnVwLm9ubHlfbG9nX3dhcm5pbmcgPSB0cnVlCmNsdXN0ZXJfcGFydGl0aW9uX2hhbmRsaW5nID0gYXV0b2hlYWwKCiMgcXVldWUgbWFzdGVyIGxvY2F0b3IKcXVldWVfbWFzdGVyX2xvY2F0b3IgPSBtaW4tbWFzdGVycwojIGVuYWJsZSBsb29wYmFjayB1c2VyCmxvb3BiYWNrX3VzZXJzLl9fUkFCQklUTVFfVVNFUk5BTUVfXyA9IGZhbHNlCiNkZWZhdWx0X3Zob3N0ID0gcmFiYml0bXEtdmhvc3QKI2Rpc2tfZnJlZV9saW1pdC5hYnNvbHV0ZSA9IDUwTUIKIyMgUHJvbWV0aGV1cyBtZXRyaWNzCiMjCnByb21ldGhldXMudGNwLnBvcnQgPSA5NDE5CiMjIE1lbW9yeSBUaHJlc2hvbGQKIyMKdG90YWxfbWVtb3J5X2F2YWlsYWJsZV9vdmVycmlkZV92YWx1ZSA9IDMyMjEyMjU0NzIKdm1fbWVtb3J5X2hpZ2hfd2F0ZXJtYXJrLnJlbGF0aXZlID0gMC45CiMjIFRDUCBMaXN0ZW4gT3B0aW9ucwojIwp0Y3BfbGlzdGVuX29wdGlvbnMuYmFja2xvZyA9IDEyOAp0Y3BfbGlzdGVuX29wdGlvbnMubm9kZWxheSA9IHRydWUKdGNwX2xpc3Rlbl9vcHRpb25zLmxpbmdlci5vbiAgICAgID0gdHJ1ZQp0Y3BfbGlzdGVuX29wdGlvbnMubGluZ2VyLnRpbWVvdXQgPSAwCnRjcF9saXN0ZW5fb3B0aW9ucy5rZWVwYWxpdmUgPSBmYWxzZQ== +kind: Secret +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq-config + namespace: rabbitmq +type: Opaque diff --git a/rmk/infrastructure/rabbitmq/service-rabbitmq-headless.yaml b/rmk/infrastructure/rabbitmq/service-rabbitmq-headless.yaml new file mode 100644 index 0000000..c51d8db --- /dev/null +++ b/rmk/infrastructure/rabbitmq/service-rabbitmq-headless.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq-headless + namespace: rabbitmq +spec: + clusterIP: None + ports: + - name: epmd + port: 4369 + targetPort: epmd + - name: amqp + port: 5672 + targetPort: amqp + - name: dist + port: 25672 + targetPort: dist + - name: http-stats + port: 15672 + targetPort: stats + publishNotReadyAddresses: true + selector: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour diff --git a/rmk/infrastructure/rabbitmq/service-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/service-rabbitmq.yaml new file mode 100644 index 0000000..110e737 --- /dev/null +++ b/rmk/infrastructure/rabbitmq/service-rabbitmq.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq + namespace: rabbitmq +spec: + ports: + - name: amqp + nodePort: null + port: 5672 + targetPort: amqp + - name: epmd + nodePort: null + port: 4369 + targetPort: epmd + - name: dist + nodePort: null + port: 25672 + targetPort: dist + - name: http-stats + nodePort: null + port: 15672 + targetPort: stats + selector: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour + sessionAffinity: None + type: ClusterIP diff --git a/rmk/infrastructure/rabbitmq/serviceaccount-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/serviceaccount-rabbitmq.yaml new file mode 100644 index 0000000..e631222 --- /dev/null +++ b/rmk/infrastructure/rabbitmq/serviceaccount-rabbitmq.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +automountServiceAccountToken: false +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq + namespace: rabbitmq diff --git a/rmk/infrastructure/rabbitmq/statefulset-rabbitmq.yaml b/rmk/infrastructure/rabbitmq/statefulset-rabbitmq.yaml new file mode 100644 index 0000000..5b4577c --- /dev/null +++ b/rmk/infrastructure/rabbitmq/statefulset-rabbitmq.yaml @@ -0,0 +1,278 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + name: rabbitmq + namespace: rabbitmq +spec: + podManagementPolicy: OrderedReady + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour + serviceName: rabbitmq-headless + template: + metadata: + annotations: + checksum/config: d22d0706db3a8534d9ab6bf25b8ce1288ed5795604fb8dd8dfaaad8d3399fc62 + checksum/vault-auth: 46627de3ebd19cfc65a7014807014e0eadd6a9f94ed0259e35956dfeb84df61d + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-rabbitmq-password: secrets/data/rabbitmq/auth + vault.hashicorp.com/agent-inject-secret-rabbitmq-username: secrets/data/rabbitmq/auth + vault.hashicorp.com/agent-inject-template-rabbitmq-password: ' + + {{- with secret "secrets/data/rabbitmq/auth" -}}{{ .Data.data.password }}{{- end -}} + + ' + vault.hashicorp.com/agent-inject-template-rabbitmq-username: ' + + {{- with secret "secrets/data/rabbitmq/auth" -}}{{ .Data.data.username }}{{- end -}} + + ' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: rabbitmq + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: rabbitmq-contour + app.kubernetes.io/version: 4.0.5 + helm.sh/chart: rabbitmq-contour-15.2.4 + spec: + affinity: + nodeAffinity: null + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour + topologyKey: kubernetes.io/hostname + weight: 1 + automountServiceAccountToken: true + containers: + - args: + - -ec + - "RABBITMQ_VAULT_USERNAME_FILE=\"/vault/secrets/rabbitmq-username\"\nRABBITMQ_VAULT_PASSWORD_FILE=\"/vault/secrets/rabbitmq-password\"\nif [ ! -f \"${RABBITMQ_VAULT_USERNAME_FILE}\" ]; then\n echo \"Vault username file ${RABBITMQ_VAULT_USERNAME_FILE} not found\" >&2\n exit 1\nfi\nif [ ! -f \"${RABBITMQ_VAULT_PASSWORD_FILE}\" ]; then\n echo \"Vault password file ${RABBITMQ_VAULT_PASSWORD_FILE} not found\" >&2\n exit 1\nfi\nexport RABBITMQ_USERNAME=\"$(tr -d '\\r\\n' < \"${RABBITMQ_VAULT_USERNAME_FILE}\")\"\nexport RABBITMQ_PASSWORD=\"$(tr -d '\\r\\n' < \"${RABBITMQ_VAULT_PASSWORD_FILE}\")\"\ncp /bitnami/rabbitmq/conf/rabbitmq.conf /tmp/rabbitmq.conf\nRABBITMQ_VAULT_USERNAME_ESCAPED=\"$(printf '%s' \"$RABBITMQ_USERNAME\" | sed 's/[\\\\/&]/\\\\\\\\&/g')\"\nsed -i \"s/__RABBITMQ_USERNAME__/${RABBITMQ_VAULT_USERNAME_ESCAPED}/g\" /tmp/rabbitmq.conf\nexport RABBITMQ_CONFIG_FILE=/tmp/rabbitmq\nexec /opt/bitnami/scripts/rabbitmq/entrypoint.sh /opt/bitnami/scripts/rabbitmq/run.sh\n" + command: + - /bin/bash + env: + - name: BITNAMI_DEBUG + value: 'true' + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: RABBITMQ_FORCE_BOOT + value: 'yes' + - name: RABBITMQ_NODE_NAME + value: rabbit@$(MY_POD_NAME).rabbitmq-headless.$(MY_POD_NAMESPACE).svc.cluster.local + - name: RABBITMQ_UPDATE_PASSWORD + value: 'no' + - name: RABBITMQ_MNESIA_DIR + value: /opt/bitnami/rabbitmq/.rabbitmq/mnesia/$(RABBITMQ_NODE_NAME) + - name: RABBITMQ_LDAP_ENABLE + value: 'no' + - name: RABBITMQ_LOGS + value: '-' + - name: RABBITMQ_ULIMIT_NOFILES + value: '65535' + - name: RABBITMQ_USE_LONGNAME + value: 'true' + - name: RABBITMQ_ERL_COOKIE + valueFrom: + secretKeyRef: + key: rabbitmq-erlang-cookie + name: rabbitmq-secret + - name: RABBITMQ_LOAD_DEFINITIONS + value: 'no' + - name: RABBITMQ_DEFINITIONS_FILE + value: /app/load_definition.json + - name: RABBITMQ_SECURE_PASSWORD + value: 'yes' + - name: RABBITMQ_PLUGINS + value: rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_auth_backend_ldap + envFrom: null + image: cr.yandex/crp3ccidau046kdj8g9q/contour/rabbitmq/rabbitmq:4.0.5-debian-12-r0 + imagePullPolicy: IfNotPresent + lifecycle: + preStop: + exec: + command: + - /bin/bash + - -ec + - "if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then\n /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t \"120\" -d \"true\"\nelse\n rabbitmqctl stop_app\nfi\n" + livenessProbe: + exec: + command: + - sh + - -ec + - curl -f --user "$(tr -d '\r\n' < /vault/secrets/rabbitmq-username):$(tr -d '\r\n' < /vault/secrets/rabbitmq-password)" 127.0.0.1:15672/api/health/checks/virtual-hosts + failureThreshold: 6 + initialDelaySeconds: 120 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 20 + name: rabbitmq + ports: + - containerPort: 5672 + name: amqp + - containerPort: 25672 + name: dist + - containerPort: 15672 + name: stats + - containerPort: 4369 + name: epmd + - containerPort: 9419 + name: metrics + readinessProbe: + exec: + command: + - sh + - -ec + - curl -f --user "$(tr -d '\r\n' < /vault/secrets/rabbitmq-username):$(tr -d '\r\n' < /vault/secrets/rabbitmq-password)" 127.0.0.1:15672/api/health/checks/local-alarms + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 20 + resources: + limits: + memory: 3Gi + requests: + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /bitnami/rabbitmq/conf + name: configuration + - mountPath: /tmp + name: empty-dir + subPath: tmp-dir + - mountPath: /opt/bitnami/rabbitmq/etc/rabbitmq + name: empty-dir + subPath: app-conf-dir + - mountPath: /opt/bitnami/rabbitmq/var/lib/rabbitmq + name: empty-dir + subPath: app-tmp-dir + - mountPath: /opt/bitnami/rabbitmq/.rabbitmq/ + name: empty-dir + subPath: app-erlang-cookie + - mountPath: /opt/bitnami/rabbitmq/var/log/rabbitmq + name: empty-dir + subPath: app-logs-dir + - mountPath: /opt/bitnami/rabbitmq/plugins + name: empty-dir + subPath: app-plugins-dir + - mountPath: /opt/bitnami/rabbitmq/.rabbitmq/mnesia + name: data + enableServiceLinks: true + imagePullSecrets: + - name: regcred + initContainers: + - args: + - -ec + - '#!/bin/bash + + + . /opt/bitnami/scripts/liblog.sh + + + info "Copying plugins dir to empty dir" + + # In order to not break the possibility of installing custom plugins, we need + + # to make the plugins directory writable, so we need to copy it to an empty dir volume + + cp -r --preserve=mode /opt/bitnami/rabbitmq/plugins/ /emptydir/app-plugins-dir + + ' + command: + - /bin/bash + image: cr.yandex/crp3ccidau046kdj8g9q/contour/rabbitmq/rabbitmq:4.0.5-debian-12-r0 + imagePullPolicy: IfNotPresent + name: prepare-plugins-dir + resources: + limits: + memory: 3Gi + requests: + memory: 1Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 1001 + runAsNonRoot: true + runAsUser: 1001 + seLinuxOptions: {} + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /emptydir + name: empty-dir + nodeSelector: + dedicated: generic + securityContext: + fsGroup: 1001 + fsGroupChangePolicy: Always + supplementalGroups: [] + sysctls: [] + serviceAccountName: rabbitmq + terminationGracePeriodSeconds: 120 + tolerations: [] + volumes: + - emptyDir: {} + name: empty-dir + - name: configuration + projected: + sources: + - secret: + name: rabbitmq-config + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + labels: + app.kubernetes.io/instance: rabbitmq + app.kubernetes.io/name: rabbitmq-contour + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: local-path diff --git a/rmk/infrastructure/superset/configmap-superset-extra-config.yaml b/rmk/infrastructure/superset/configmap-superset-extra-config.yaml new file mode 100644 index 0000000..280c826 --- /dev/null +++ b/rmk/infrastructure/superset/configmap-superset-extra-config.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: superset-extra-config + namespace: superset + labels: + app: superset-prod + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +data: + import_datasources.yaml: "databases:\n - database_name: trino\n sqlalchemy_uri: trino://superset@trino.trino.svc.cluster.local:8080\n expose_in_sqllab: true\n allow_ctas: true\n allow_cvas: true\n allow_dml: false\n" diff --git a/rmk/infrastructure/superset/configmap-superset-redis-configuration.yaml b/rmk/infrastructure/superset/configmap-superset-redis-configuration.yaml new file mode 100644 index 0000000..c4cfcf8 --- /dev/null +++ b/rmk/infrastructure/superset/configmap-superset-redis-configuration.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: superset-redis-configuration + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm +data: + redis.conf: '# User-supplied common configuration: + + # Enable AOF https://redis.io/topics/persistence#append-only-file + + appendonly yes + + # Disable RDB persistence, AOF persistence already enabled. + + save "" + + # End of common configuration' + master.conf: 'dir /data + + # User-supplied master configuration: + + rename-command FLUSHDB "" + + rename-command FLUSHALL "" + + # End of master configuration' + replica.conf: 'dir /data + + # User-supplied replica configuration: + + rename-command FLUSHDB "" + + rename-command FLUSHALL "" + + # End of replica configuration' diff --git a/rmk/infrastructure/superset/configmap-superset-redis-health.yaml b/rmk/infrastructure/superset/configmap-superset-redis-health.yaml new file mode 100644 index 0000000..d619453 --- /dev/null +++ b/rmk/infrastructure/superset/configmap-superset-redis-health.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: superset-redis-health + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm +data: + ping_readiness_local.sh: "#!/bin/bash\n\n[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD=\"$(< \"${REDIS_PASSWORD_FILE}\")\"\n[[ -n \"$REDIS_PASSWORD\" ]] && export REDISCLI_AUTH=\"$REDIS_PASSWORD\"\nresponse=$(\n timeout -s 15 $1 \\\n redis-cli \\\n -h localhost \\\n -p $REDIS_PORT \\\n ping\n)\nif [ \"$?\" -eq \"124\" ]; then\n echo \"Timed out\"\n exit 1\nfi\nif [ \"$response\" != \"PONG\" ]; then\n echo \"$response\"\n exit 1\nfi" + ping_liveness_local.sh: "#!/bin/bash\n\n[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD=\"$(< \"${REDIS_PASSWORD_FILE}\")\"\n[[ -n \"$REDIS_PASSWORD\" ]] && export REDISCLI_AUTH=\"$REDIS_PASSWORD\"\nresponse=$(\n timeout -s 15 $1 \\\n redis-cli \\\n -h localhost \\\n -p $REDIS_PORT \\\n ping\n)\nif [ \"$?\" -eq \"124\" ]; then\n echo \"Timed out\"\n exit 1\nfi\nresponseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')\nif [ \"$response\" != \"PONG\" ] && [ \"$responseFirstWord\" != \"LOADING\" ] && [ \"$responseFirstWord\" != \"MASTERDOWN\" ]; then\n echo \"$response\"\n exit 1\nfi" + ping_readiness_master.sh: "#!/bin/bash\n\n[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD=\"$(< \"${REDIS_MASTER_PASSWORD_FILE}\")\"\n[[ -n \"$REDIS_MASTER_PASSWORD\" ]] && export REDISCLI_AUTH=\"$REDIS_MASTER_PASSWORD\"\nresponse=$(\n timeout -s 15 $1 \\\n redis-cli \\\n -h $REDIS_MASTER_HOST \\\n -p $REDIS_MASTER_PORT_NUMBER \\\n ping\n)\nif [ \"$?\" -eq \"124\" ]; then\n echo \"Timed out\"\n exit 1\nfi\nif [ \"$response\" != \"PONG\" ]; then\n echo \"$response\"\n exit 1\nfi" + ping_liveness_master.sh: "#!/bin/bash\n\n[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD=\"$(< \"${REDIS_MASTER_PASSWORD_FILE}\")\"\n[[ -n \"$REDIS_MASTER_PASSWORD\" ]] && export REDISCLI_AUTH=\"$REDIS_MASTER_PASSWORD\"\nresponse=$(\n timeout -s 15 $1 \\\n redis-cli \\\n -h $REDIS_MASTER_HOST \\\n -p $REDIS_MASTER_PORT_NUMBER \\\n ping\n)\nif [ \"$?\" -eq \"124\" ]; then\n echo \"Timed out\"\n exit 1\nfi\nresponseFirstWord=$(echo $response | head -n1 | awk '{print $1;}')\nif [ \"$response\" != \"PONG\" ] && [ \"$responseFirstWord\" != \"LOADING\" ]; then\n echo \"$response\"\n exit 1\nfi" + ping_readiness_local_and_master.sh: 'script_dir="$(dirname "$0")" + + exit_status=0 + + "$script_dir/ping_readiness_local.sh" $1 || exit_status=$? + + "$script_dir/ping_readiness_master.sh" $1 || exit_status=$? + + exit $exit_status' + ping_liveness_local_and_master.sh: 'script_dir="$(dirname "$0")" + + exit_status=0 + + "$script_dir/ping_liveness_local.sh" $1 || exit_status=$? + + "$script_dir/ping_liveness_master.sh" $1 || exit_status=$? + + exit $exit_status' diff --git a/rmk/infrastructure/superset/configmap-superset-redis-scripts.yaml b/rmk/infrastructure/superset/configmap-superset-redis-scripts.yaml new file mode 100644 index 0000000..5b20f03 --- /dev/null +++ b/rmk/infrastructure/superset/configmap-superset-redis-scripts.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: superset-redis-scripts + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm +data: + start-master.sh: "#!/bin/bash\n\n[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD=\"$(< \"${REDIS_PASSWORD_FILE}\")\"\nif [[ -f /opt/bitnami/redis/mounted-etc/master.conf ]];then\n cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf\nfi\nif [[ -f /opt/bitnami/redis/mounted-etc/redis.conf ]];then\n cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf\nfi\nARGS=(\"--port\" \"${REDIS_PORT}\")\nARGS+=(\"--protected-mode\" \"no\")\nARGS+=(\"--include\" \"/opt/bitnami/redis/etc/redis.conf\")\nARGS+=(\"--include\" \"/opt/bitnami/redis/etc/master.conf\")\nexec redis-server \"${ARGS[@]}\"\n" diff --git a/rmk/infrastructure/superset/deployment-superset-worker.yaml b/rmk/infrastructure/superset/deployment-superset-worker.yaml new file mode 100644 index 0000000..538ed59 --- /dev/null +++ b/rmk/infrastructure/superset/deployment-superset-worker.yaml @@ -0,0 +1,110 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: superset-worker + namespace: superset + labels: + app: superset-prod-worker + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +spec: + replicas: 1 + selector: + matchLabels: + app: superset-prod-worker + release: superset + template: + metadata: + annotations: + checksum/superset_config.py: 2ffaff93924d8b7dab1776c9fe28e5646b1092191e6124a6cbc8ea742cf90a4d + checksum/superset_bootstrap.sh: 7f29f7bea1f93ac76c60569be0eba8e55753be29db1a7ba2e5a604009dd2e7d9 + checksum/connections: c04c32c1e5148a720bd68c52f7e45aaa9c615c65e1c083a1189c793482600bba + checksum/extraConfigs: c3b9ae5a9c4579a0a76d06e3a0164ed4aa1a410490b47349057da98fd4b3a2a4 + checksum/extraSecrets: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + checksum/extraSecretEnv: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + checksum/configOverrides: cec6ff16a0655b1682a7b17c33778422e35a744acfc09da7bd7d18d698929193 + checksum/configOverridesFiles: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + labels: + app: superset-prod-worker + release: superset + spec: + serviceAccountName: superset + securityContext: + runAsUser: 0 + initContainers: + - command: + - /bin/sh + - -c + - dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s + envFrom: + - secretRef: + name: superset-env + image: cr.yandex/crp3ccidau046kdj8g9q/contour/superset/superset:dockerize + imagePullPolicy: IfNotPresent + name: wait-for-postgres-redis + containers: + - name: superset-prod + image: cr.yandex/crp3ccidau046kdj8g9q/contour/superset/superset:4.1.1-amd64 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - pip install authlib && . /app/pythonpath/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker + env: + - name: SUPERSET_SECRET_KEY + valueFrom: + secretKeyRef: + name: superset-secret + key: secret.key + - name: DB_PASS + valueFrom: + secretKeyRef: + name: postgresql-auth + key: password + - name: SUPERSET_PORT + value: '8088' + - name: BABEL_DEFAULT_LOCALE + value: ru + - name: GUNICORN_TIMEOUT + value: '300' + - name: SERVER_WORKER_AMOUNT + value: '4' + - name: ENABLE_PROXY_FIX + value: 'true' + envFrom: + - secretRef: + name: superset-env + volumeMounts: + - name: superset-config + mountPath: /app/pythonpath + readOnly: true + - name: superset-extra-config + mountPath: /app/configs + readOnly: true + livenessProbe: + exec: + command: + - sh + - -c + - celery -A superset.tasks.celery_app:app inspect ping -d celery@$HOSTNAME + failureThreshold: 3 + initialDelaySeconds: 120 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 60 + resources: + limits: + memory: 2Gi + requests: + cpu: 500m + memory: 1Gi + imagePullSecrets: + - name: regcred + volumes: + - name: superset-config + secret: + secretName: superset-config + - name: superset-extra-config + configMap: + name: superset-extra-config diff --git a/rmk/infrastructure/superset/deployment-superset.yaml b/rmk/infrastructure/superset/deployment-superset.yaml new file mode 100644 index 0000000..baa47ba --- /dev/null +++ b/rmk/infrastructure/superset/deployment-superset.yaml @@ -0,0 +1,131 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: superset + namespace: superset + labels: + app: superset-prod + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +spec: + replicas: 1 + selector: + matchLabels: + app: superset-prod + release: superset + template: + metadata: + annotations: + checksum/superset_config.py: 2ffaff93924d8b7dab1776c9fe28e5646b1092191e6124a6cbc8ea742cf90a4d + checksum/superset_init.sh: ff251d03d362c4a3ff1451d24893d5d12811f67edc84efa39484a84c59c3f883 + checksum/superset_bootstrap.sh: 7f29f7bea1f93ac76c60569be0eba8e55753be29db1a7ba2e5a604009dd2e7d9 + checksum/connections: c04c32c1e5148a720bd68c52f7e45aaa9c615c65e1c083a1189c793482600bba + checksum/extraConfigs: c3b9ae5a9c4579a0a76d06e3a0164ed4aa1a410490b47349057da98fd4b3a2a4 + checksum/extraSecrets: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + checksum/extraSecretEnv: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + checksum/configOverrides: cec6ff16a0655b1682a7b17c33778422e35a744acfc09da7bd7d18d698929193 + checksum/configOverridesFiles: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a + labels: + app: superset-prod + release: superset + spec: + serviceAccountName: superset + securityContext: + runAsUser: 0 + initContainers: + - command: + - /bin/sh + - -c + - dockerize -wait "tcp://$DB_HOST:$DB_PORT" -timeout 120s + envFrom: + - secretRef: + name: superset-env + image: cr.yandex/crp3ccidau046kdj8g9q/contour/superset/superset:dockerize + imagePullPolicy: IfNotPresent + name: wait-for-postgres + containers: + - name: superset-prod + image: cr.yandex/crp3ccidau046kdj8g9q/contour/superset/superset:4.1.1-amd64 + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - pip install authlib && . /app/pythonpath/superset_bootstrap.sh; /usr/bin/run-server.sh + env: + - name: SUPERSET_SECRET_KEY + valueFrom: + secretKeyRef: + name: superset-secret + key: secret.key + - name: DB_PASS + valueFrom: + secretKeyRef: + name: postgresql-auth + key: password + - name: SUPERSET_PORT + value: '8088' + - name: BABEL_DEFAULT_LOCALE + value: ru + - name: GUNICORN_TIMEOUT + value: '300' + - name: SERVER_WORKER_AMOUNT + value: '4' + - name: ENABLE_PROXY_FIX + value: 'true' + envFrom: + - secretRef: + name: superset-env + volumeMounts: + - name: superset-config + mountPath: /app/pythonpath + readOnly: true + - name: superset-extra-config + mountPath: /app/configs + readOnly: true + ports: + - name: http + containerPort: 8088 + protocol: TCP + startupProbe: + failureThreshold: 60 + httpGet: + path: /health + port: http + initialDelaySeconds: 15 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: http + initialDelaySeconds: 15 + periodSeconds: 15 + successThreshold: 1 + timeoutSeconds: 1 + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: http + initialDelaySeconds: 16 + periodSeconds: 15 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + memory: 2Gi + requests: + cpu: 500m + memory: 1Gi + imagePullSecrets: + - name: regcred + volumes: + - name: superset-config + secret: + secretName: superset-config + - name: superset-extra-config + configMap: + name: superset-extra-config diff --git a/rmk/infrastructure/superset/namespace-superset.yaml b/rmk/infrastructure/superset/namespace-superset.yaml new file mode 100644 index 0000000..464d5e9 --- /dev/null +++ b/rmk/infrastructure/superset/namespace-superset.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: superset + labels: + istio-injection: disabled diff --git a/rmk/infrastructure/superset/secret-superset-config.yaml b/rmk/infrastructure/superset/secret-superset-config.yaml new file mode 100644 index 0000000..25d27c1 --- /dev/null +++ b/rmk/infrastructure/superset/secret-superset-config.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Secret +metadata: + name: superset-config + namespace: superset + labels: + app: superset + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +type: Opaque +stringData: + superset_config.py: "\nimport os\nfrom flask_caching.backends.rediscache import RedisCache\n\ndef env(key, default=None):\n return os.getenv(key, default)\n\n# Redis Base URL\nREDIS_BASE_URL=f\"{env('REDIS_PROTO')}://{env('REDIS_HOST')}:{env('REDIS_PORT')}\"\n\n# Redis URL Params\nREDIS_URL_PARAMS = \"\"\n\n# Build Redis URLs\nCACHE_REDIS_URL = f\"{REDIS_BASE_URL}/{env('REDIS_DB', 1)}{REDIS_URL_PARAMS}\"\nCELERY_REDIS_URL = f\"{REDIS_BASE_URL}/{env('REDIS_CELERY_DB', 0)}{REDIS_URL_PARAMS}\"\n\nMAPBOX_API_KEY = env('MAPBOX_API_KEY', '')\nCACHE_CONFIG = {\n 'CACHE_TYPE': 'RedisCache',\n 'CACHE_DEFAULT_TIMEOUT': 300,\n 'CACHE_KEY_PREFIX': 'superset_',\n 'CACHE_REDIS_URL': CACHE_REDIS_URL,\n}\nDATA_CACHE_CONFIG = CACHE_CONFIG\n\nSQLALCHEMY_DATABASE_URI = f\"postgresql+psycopg2://{env('DB_USER')}:{env('DB_PASS')}@{env('DB_HOST')}:{env('DB_PORT')}/{env('DB_NAME')}\"\nSQLALCHEMY_TRACK_MODIFICATIONS = True\n\nclass CeleryConfig:\n imports = (\"superset.sql_lab\", )\n broker_url = CELERY_REDIS_URL\n result_backend = CELERY_REDIS_URL\n\nCELERY_CONFIG = CeleryConfig\nRESULTS_BACKEND = RedisCache(\n host=env('REDIS_HOST'),\n port=env('REDIS_PORT'),\n key_prefix='superset_results',\n)\n\n\n# Overrides\n# enable_oauth\n\n# extend_timeout\nSQLLAB_ASYNC_TIME_LIMIT_SEC = 300\nSUPERSET_WEBSERVER_TIMEOUT = 300\nSQLLAB_TIMEOUT = 600\n\n# feature_flags\nFEATURE_FLAGS = {\n \"EMBEDDED_SUPERSET\": True,\n \"ENABLE_TEMPLATE_PROCESSING\": True,\n}\nGUEST_ROLE_NAME = \"Gamma\"\nGUEST_TOKEN_JWT_AUDIENCE = \"guest\"\nGUEST_TOKEN_JWT_SECRET = os.getenv(\"JWT_SECRET\")\nGUEST_TOKEN_JWT_EXP_SECONDS = 3600\n\n# iframe_config\nTALISMAN_ENABLED = True\nTALISMAN_CONFIG = {\n \"frame_options\": None,\n \"content_security_policy\": {\n \"base-uri\": [\"'self'\"],\n \"default-src\": [\"'self'\"],\n \"img-src\": [\"'self'\", \"blob:\", \"data:\", \"https://apachesuperset.gateway.scarf.sh\", \"https://static.scarf.sh/\"],\n \"worker-src\": [\"'self'\", \"blob:\"],\n \"connect-src\": [\"'self'\", \"https://api.mapbox.com\", \"https://events.mapbox.com\"],\n \"object-src\": [\"'none'\"],\n \"style-src\": [\"'self'\", \"'unsafe-inline'\"],\n \"script-src\": [\"'self'\", \"'strict-dynamic'\"],\n \"frame-ancestors\": [\"'self'\", \"https://sarex.stand.sarex.tech\", \"https://*.stand.sarex.tech\", \"https://bi.stand.sarex.tech\"],\n },\n \"content_security_policy_nonce_in\": [\"script-src\"],\n}\nX_FRAME_OPTIONS = None\nHTTP_HEADERS = {\n \"Content-Security-Policy\": \"frame-ancestors 'self' https://sarex.stand.sarex.tech https://*.stand.sarex.tech https://bi.stand.sarex.tech\",\n}\n\n# set_locale\nBABEL_DEFAULT_LOCALE = \"ru\"\n" + superset_init.sh: "#!/bin/sh\nset -eu\necho \"Upgrading DB schema...\"\nsuperset db upgrade\necho \"Initializing roles...\"\nsuperset init\n\n\nif [ -f \"/app/configs/import_datasources.yaml\" ]; then\n echo \"Importing database connections.... \"\n superset import_datasources -p /app/configs/import_datasources.yaml\nfi\n" + superset_bootstrap.sh: "#!/bin/bash\nif [ ! -f ~/bootstrap ]; then \n echo \"Running Superset with uid 0\" > ~/bootstrap\n pip install psycopg2-binary\n pip install trino\n pip install clickhouse-connect\n pip install Jinja2\nfi\n" + custom_sso_security_manager.py: "import logging\nfrom superset.security import SupersetSecurityManager\n\nclass CustomSsoSecurityManager(SupersetSecurityManager):\n def oauth_user_info(self, provider, response=None):\n logging.debug(\"Oauth2 provider: {0}.\".format(provider))\n if provider == 'zitadel':\n me = self.appbuilder.sm.oauth_remotes[provider].get('oidc/v1/userinfo').json()\n logging.debug(\"user_data: {0}\".format(me))\n return {\n 'name': me['name'],\n 'email': me['email'],\n 'id': me['preferred_username'],\n 'username': me['preferred_username'],\n 'first_name': me['given_name'],\n 'last_name': me['family_name']\n }\n" diff --git a/rmk/infrastructure/superset/secret-superset-env.yaml b/rmk/infrastructure/superset/secret-superset-env.yaml new file mode 100644 index 0000000..a4834a9 --- /dev/null +++ b/rmk/infrastructure/superset/secret-superset-env.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Secret +metadata: + name: superset-env + namespace: superset + annotations: + helm.sh/resource-policy: keep + labels: + app: superset + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +type: Opaque +stringData: + REDIS_HOST: superset-redis-headless + REDIS_USER: '' + REDIS_PORT: '6379' + REDIS_PROTO: redis + REDIS_DB: '1' + REDIS_CELERY_DB: '0' + DB_HOST: postgres.local.example.com + DB_PORT: '5432' + DB_USER: superset + DB_NAME: superset diff --git a/rmk/infrastructure/superset/service-superset-redis-headless.yaml b/rmk/infrastructure/superset/service-superset-redis-headless.yaml new file mode 100644 index 0000000..e6ee012 --- /dev/null +++ b/rmk/infrastructure/superset/service-superset-redis-headless.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: superset-redis-headless + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm + annotations: null +spec: + type: ClusterIP + clusterIP: None + ports: + - name: tcp-redis + port: 6379 + targetPort: redis + selector: + app.kubernetes.io/name: redis + app.kubernetes.io/instance: superset diff --git a/rmk/infrastructure/superset/service-superset-redis-master.yaml b/rmk/infrastructure/superset/service-superset-redis-master.yaml new file mode 100644 index 0000000..75ccdf8 --- /dev/null +++ b/rmk/infrastructure/superset/service-superset-redis-master.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Service +metadata: + name: superset-redis-master + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: master +spec: + type: ClusterIP + internalTrafficPolicy: Cluster + sessionAffinity: None + ports: + - name: tcp-redis + port: 6379 + targetPort: redis + nodePort: null + selector: + app.kubernetes.io/name: redis + app.kubernetes.io/instance: superset + app.kubernetes.io/component: master diff --git a/rmk/infrastructure/superset/service-superset.yaml b/rmk/infrastructure/superset/service-superset.yaml new file mode 100644 index 0000000..792a4f0 --- /dev/null +++ b/rmk/infrastructure/superset/service-superset.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: superset + namespace: superset + labels: + app: superset-prod + chart: superset-prod-0.13.3 + release: superset + heritage: Helm +spec: + type: ClusterIP + ports: + - port: 8088 + targetPort: http + protocol: TCP + name: http + selector: + app: superset-prod + release: superset diff --git a/rmk/infrastructure/superset/serviceaccount-superset-redis.yaml b/rmk/infrastructure/superset/serviceaccount-superset-redis.yaml new file mode 100644 index 0000000..7ddfb59 --- /dev/null +++ b/rmk/infrastructure/superset/serviceaccount-superset-redis.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ServiceAccount +automountServiceAccountToken: true +metadata: + name: superset-redis + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm diff --git a/rmk/infrastructure/superset/serviceaccount-superset.yaml b/rmk/infrastructure/superset/serviceaccount-superset.yaml new file mode 100644 index 0000000..0dcff83 --- /dev/null +++ b/rmk/infrastructure/superset/serviceaccount-superset.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: superset + namespace: superset + labels: + app.kubernetes.io/name: superset-prod + helm.sh/chart: superset-prod-0.13.3 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm + kubernetes.io/cluster-service: 'true' + addonmanager.kubernetes.io/mode: Reconcile diff --git a/rmk/infrastructure/superset/statefulset-superset-redis-master.yaml b/rmk/infrastructure/superset/statefulset-superset-redis-master.yaml new file mode 100644 index 0000000..609b037 --- /dev/null +++ b/rmk/infrastructure/superset/statefulset-superset-redis-master.yaml @@ -0,0 +1,135 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: superset-redis-master + namespace: superset + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: master +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: redis + app.kubernetes.io/instance: superset + app.kubernetes.io/component: master + serviceName: superset-redis-headless + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: redis + helm.sh/chart: redis-17.9.4 + app.kubernetes.io/instance: superset + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: master + annotations: + checksum/configmap: fe1cca2dea4020cb4b1623fc950515f7338ac9fd6e0328821274263d9e0e4d64 + checksum/health: 73f335f1a98f6f244d0ef2e3f93af8046efda1328e0421e6099d13241de96558 + checksum/scripts: 9790c77d02ac85c0f4b6067139404f8bc34ddcdf1da13c05021f0904c0451a8d + checksum/secret: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + spec: + imagePullSecrets: + - name: regcred + securityContext: + fsGroup: 1001 + serviceAccountName: superset-redis + affinity: + podAffinity: null + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: redis + app.kubernetes.io/instance: superset + app.kubernetes.io/component: master + topologyKey: kubernetes.io/hostname + weight: 1 + nodeAffinity: null + terminationGracePeriodSeconds: 30 + containers: + - name: redis + image: cr.yandex/crp3ccidau046kdj8g9q/contour/superset/redis:7.0.10-debian-11-r4 + imagePullPolicy: IfNotPresent + securityContext: + runAsUser: 1001 + command: + - /bin/bash + args: + - -c + - /opt/bitnami/scripts/start-scripts/start-master.sh + env: + - name: BITNAMI_DEBUG + value: 'false' + - name: REDIS_REPLICATION_MODE + value: master + - name: ALLOW_EMPTY_PASSWORD + value: 'yes' + - name: REDIS_TLS_ENABLED + value: 'no' + - name: REDIS_PORT + value: '6379' + ports: + - name: redis + containerPort: 6379 + livenessProbe: + initialDelaySeconds: 20 + periodSeconds: 5 + timeoutSeconds: 6 + successThreshold: 1 + failureThreshold: 5 + exec: + command: + - sh + - -c + - /health/ping_liveness_local.sh 5 + readinessProbe: + initialDelaySeconds: 20 + periodSeconds: 5 + timeoutSeconds: 2 + successThreshold: 1 + failureThreshold: 5 + exec: + command: + - sh + - -c + - /health/ping_readiness_local.sh 1 + resources: + limits: {} + requests: {} + volumeMounts: + - name: start-scripts + mountPath: /opt/bitnami/scripts/start-scripts + - name: health + mountPath: /health + - name: redis-data + mountPath: /data + - name: config + mountPath: /opt/bitnami/redis/mounted-etc + - name: redis-tmp-conf + mountPath: /opt/bitnami/redis/etc/ + - name: tmp + mountPath: /tmp + volumes: + - name: start-scripts + configMap: + name: superset-redis-scripts + defaultMode: 493 + - name: health + configMap: + name: superset-redis-health + defaultMode: 493 + - name: config + configMap: + name: superset-redis-configuration + - name: redis-tmp-conf + emptyDir: {} + - name: tmp + emptyDir: {} + - name: redis-data + emptyDir: {} diff --git a/rmk/infrastructure/trino/configmap-trino-catalog.yaml b/rmk/infrastructure/trino/configmap-trino-catalog.yaml new file mode 100644 index 0000000..1b34998 --- /dev/null +++ b/rmk/infrastructure/trino/configmap-trino-catalog.yaml @@ -0,0 +1,122 @@ +apiVersion: v1 +data: + clickhouse_db.properties: 'connector.name=tpch + + tpch.splits-per-node=4 + + ' + django_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/django_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + documentations_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/documentations_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + eav_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/eav_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + flows_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/flows_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + hive.properties: 'connector.name=tpch + + tpch.splits-per-node=4 + + ' + inspections_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/inspections_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + issues_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/issues_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + pm_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/pm_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' + premises_db.properties: "connector.name: postgresql\nconnection-url: jdbc:postgresql://b-c9q5eqhv4v1cu3kbtnst.mdb.yandexcloud.net:6432/premises_db?sslmode=require\nconnection-user: readonly\nconnection-password: ${ENV:PROD_PG_RO_PASSWORD}\npostgresql.array-mapping=AS_JSON \n" + tpcds.properties: 'connector.name=tpcds + + tpcds.splits-per-node=4 + + ' + tpch.properties: 'connector.name=tpch + + tpch.splits-per-node=4 + + ' + workspaces_db.properties: 'connector.name=postgresql + + connection-url=jdbc:postgresql://${ENV:TRINO_POSTGRES_HOST}:${ENV:TRINO_POSTGRES_PORT}/workspaces_db?sslmode=disable + + connection-user=${ENV:TRINO_POSTGRES_USER} + + connection-password=${ENV:TRINO_POSTGRES_PASSWORD} + + postgresql.array-mapping=AS_JSON + + ' +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: catalogs + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-catalog + namespace: trino diff --git a/rmk/infrastructure/trino/configmap-trino-coordinator.yaml b/rmk/infrastructure/trino/configmap-trino-coordinator.yaml new file mode 100644 index 0000000..31f0982 --- /dev/null +++ b/rmk/infrastructure/trino/configmap-trino-coordinator.yaml @@ -0,0 +1,77 @@ +apiVersion: v1 +data: + config.properties: 'coordinator=true + + node-scheduler.include-coordinator=false + + http-server.http.port=8080 + + query.max-memory=20GB + + query.max-memory-per-node=4GB + + memory.heap-headroom-per-node=1GB + + discovery.uri=http://localhost:8080 + + internal-communication.shared-secret=random-value-999 + + http-server.process-forwarded=true + + http-server.authentication.allow-insecure-over-http=true + + ' + jvm.config: '-server + + -agentpath:/usr/lib/trino/bin/libjvmkill.so + + -Xmx6G + + -XX:+UseG1GC + + -XX:G1HeapRegionSize=32M + + -XX:+ExplicitGCInvokesConcurrent + + -XX:+HeapDumpOnOutOfMemoryError + + -XX:+ExitOnOutOfMemoryError + + -XX:-OmitStackTraceInFastThrow + + -XX:ReservedCodeCacheSize=512M + + -XX:PerMethodRecompilationCutoff=10000 + + -XX:PerBytecodeRecompilationCutoff=10000 + + -Djdk.attach.allowAttachSelf=true + + -Djdk.nio.maxCachedBufferSize=2000000 + + # Allow loading dynamic agent used by JOL + + -XX:+EnableDynamicAgentLoading + + ' + log.properties: 'io.trino=INFO + + ' + node.properties: 'node.environment=production + + node.data-dir=/data/trino + + plugin.dir=/usr/lib/trino/plugin + + ' +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-coordinator + namespace: trino diff --git a/rmk/infrastructure/trino/configmap-trino-schemas-volume-coordinator.yaml b/rmk/infrastructure/trino/configmap-trino-schemas-volume-coordinator.yaml new file mode 100644 index 0000000..5066585 --- /dev/null +++ b/rmk/infrastructure/trino/configmap-trino-schemas-volume-coordinator.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +data: null +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-schemas-volume-coordinator + namespace: trino diff --git a/rmk/infrastructure/trino/configmap-trino-schemas-volume-worker.yaml b/rmk/infrastructure/trino/configmap-trino-schemas-volume-worker.yaml new file mode 100644 index 0000000..1f1bcad --- /dev/null +++ b/rmk/infrastructure/trino/configmap-trino-schemas-volume-worker.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +data: null +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-schemas-volume-worker + namespace: trino diff --git a/rmk/infrastructure/trino/configmap-trino-worker.yaml b/rmk/infrastructure/trino/configmap-trino-worker.yaml new file mode 100644 index 0000000..c966013 --- /dev/null +++ b/rmk/infrastructure/trino/configmap-trino-worker.yaml @@ -0,0 +1,75 @@ +apiVersion: v1 +data: + config.properties: 'coordinator=false + + http-server.http.port=8080 + + query.max-memory=20GB + + query.max-memory-per-node=20GB + + memory.heap-headroom-per-node=4GB + + discovery.uri=http://trino:8080 + + internal-communication.shared-secret=random-value-999 + + http-server.process-forwarded=true + + http-server.authentication.allow-insecure-over-http=true + + ' + jvm.config: '-server + + -agentpath:/usr/lib/trino/bin/libjvmkill.so + + -Xmx24G + + -XX:+UseG1GC + + -XX:G1HeapRegionSize=32M + + -XX:+ExplicitGCInvokesConcurrent + + -XX:+HeapDumpOnOutOfMemoryError + + -XX:+ExitOnOutOfMemoryError + + -XX:-OmitStackTraceInFastThrow + + -XX:ReservedCodeCacheSize=512M + + -XX:PerMethodRecompilationCutoff=10000 + + -XX:PerBytecodeRecompilationCutoff=10000 + + -Djdk.attach.allowAttachSelf=true + + -Djdk.nio.maxCachedBufferSize=2000000 + + # Allow loading dynamic agent used by JOL + + -XX:+EnableDynamicAgentLoading + + ' + log.properties: 'io.trino=INFO + + ' + node.properties: 'node.environment=production + + node.data-dir=/data/trino + + plugin.dir=/usr/lib/trino/plugin + + ' +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-worker + namespace: trino diff --git a/rmk/infrastructure/trino/deployment-trino-coordinator.yaml b/rmk/infrastructure/trino/deployment-trino-coordinator.yaml new file mode 100644 index 0000000..a39648e --- /dev/null +++ b/rmk/infrastructure/trino/deployment-trino-coordinator.yaml @@ -0,0 +1,108 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + trino.io/network-policy-protection: disabled + name: trino-coordinator + namespace: trino +spec: + progressDeadlineSeconds: 600 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/name: trino + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + checksum/catalog-config: b81a8c4cc901fb0746569b6484a69ac33966acd8375a720505e157d6be1aa0c5 + checksum/coordinator-config: 45e0008007ce6d7b5cbb5e91cbe3818419a55f2af90f3338fc1f82ac2983921a + labels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + trino.io/network-policy-protection: disabled + spec: + containers: + - env: + - name: TRINO_POSTGRES_HOST + value: postgres.local.example.com + - name: TRINO_POSTGRES_PORT + value: '5432' + envFrom: [] + image: cr.yandex/crp3ccidau046kdj8g9q/contour/trino/trino:432 + imagePullPolicy: IfNotPresent + lifecycle: {} + livenessProbe: + failureThreshold: 6 + httpGet: + path: /v1/info + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: trino-prod-coordinator + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + exec: + command: + - /usr/lib/trino/bin/health-check + failureThreshold: 6 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: + memory: 8Gi + requests: + cpu: 500m + memory: 6Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /etc/trino + name: config-volume + - mountPath: /etc/trino/catalog + name: catalog-volume + - mountPath: /etc/trino/schemas + name: schemas-volume + imagePullSecrets: + - name: regcred + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + serviceAccountName: trino + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + name: trino-coordinator + name: config-volume + - configMap: + name: trino-catalog + name: catalog-volume + - configMap: + name: trino-schemas-volume-coordinator + name: schemas-volume diff --git a/rmk/infrastructure/trino/deployment-trino-worker.yaml b/rmk/infrastructure/trino/deployment-trino-worker.yaml new file mode 100644 index 0000000..045c6bc --- /dev/null +++ b/rmk/infrastructure/trino/deployment-trino-worker.yaml @@ -0,0 +1,116 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + trino.io/network-policy-protection: disabled + name: trino-worker + namespace: trino +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/name: trino + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + checksum/catalog-config: b81a8c4cc901fb0746569b6484a69ac33966acd8375a720505e157d6be1aa0c5 + checksum/worker-config: 181a5191b4d48a0fef3669941ded6e0c21095dc185ddfe800262a90c9fc50e9c + labels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + trino.io/network-policy-protection: disabled + spec: + containers: + - env: + - name: TRINO_POSTGRES_HOST + value: postgres.local.example.com + - name: TRINO_POSTGRES_PORT + value: '5432' + envFrom: [] + image: cr.yandex/crp3ccidau046kdj8g9q/contour/trino/trino:432 + imagePullPolicy: IfNotPresent + lifecycle: null + livenessProbe: + failureThreshold: 6 + httpGet: + path: /v1/info + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: trino-prod-worker + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + exec: + command: + - /usr/lib/trino/bin/health-check + failureThreshold: 6 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: + memory: 32Gi + requests: + cpu: 500m + memory: 24Gi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /etc/trino + name: config-volume + - mountPath: /etc/trino/catalog + name: catalog-volume + - mountPath: /etc/trino/schemas + name: schemas-volume + imagePullSecrets: + - name: regcred + nodeSelector: + kubernetes.io/hostname: glp-sarex-proc1 + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + serviceAccountName: trino + terminationGracePeriodSeconds: 30 + tolerations: + - effect: NoSchedule + key: dedicated + operator: Equal + value: processing + volumes: + - configMap: + name: trino-worker + name: config-volume + - configMap: + name: trino-catalog + name: catalog-volume + - configMap: + name: trino-schemas-volume-worker + name: schemas-volume diff --git a/rmk/infrastructure/trino/namespace-trino.yaml b/rmk/infrastructure/trino/namespace-trino.yaml new file mode 100644 index 0000000..5584d59 --- /dev/null +++ b/rmk/infrastructure/trino/namespace-trino.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: trino + labels: + istio-injection: disabled diff --git a/rmk/infrastructure/trino/pod-trino-test-connection.yaml b/rmk/infrastructure/trino/pod-trino-test-connection.yaml new file mode 100644 index 0000000..a0d2925 --- /dev/null +++ b/rmk/infrastructure/trino/pod-trino-test-connection.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + helm.sh/hook: test + labels: + app.kubernetes.io/component: test + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + test: connection + name: trino-test-connection +spec: + containers: + - args: + - trino://trino:8080 + - --user=admin + - --debug + - --execute=SELECT 1 + - --no-progress + command: + - trino + image: cr.yandex/crp3ccidau046kdj8g9q/contour/trino/trino:432 + name: cli + restartPolicy: Never diff --git a/rmk/infrastructure/trino/service-trino-worker.yaml b/rmk/infrastructure/trino/service-trino-worker.yaml new file mode 100644 index 0000000..3ba8679 --- /dev/null +++ b/rmk/infrastructure/trino/service-trino-worker.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino-worker + namespace: trino +spec: + clusterIP: None + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/component: worker + app.kubernetes.io/instance: trino + app.kubernetes.io/name: trino diff --git a/rmk/infrastructure/trino/service-trino.yaml b/rmk/infrastructure/trino/service-trino.yaml new file mode 100644 index 0000000..8d2243c --- /dev/null +++ b/rmk/infrastructure/trino/service-trino.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino + namespace: trino +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/component: coordinator + app.kubernetes.io/instance: trino + app.kubernetes.io/name: trino + type: ClusterIP diff --git a/rmk/infrastructure/trino/serviceaccount-trino.yaml b/rmk/infrastructure/trino/serviceaccount-trino.yaml new file mode 100644 index 0000000..5d0400e --- /dev/null +++ b/rmk/infrastructure/trino/serviceaccount-trino.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: trino + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: trino + app.kubernetes.io/version: '432' + helm.sh/chart: trino-prod-0.33.0 + name: trino + namespace: trino diff --git a/rmk/infrastructure/vault/clusterrole-vault-vault-contour-agent-injector-clusterrole.yaml b/rmk/infrastructure/vault/clusterrole-vault-vault-contour-agent-injector-clusterrole.yaml new file mode 100644 index 0000000..0b018aa --- /dev/null +++ b/rmk/infrastructure/vault/clusterrole-vault-vault-contour-agent-injector-clusterrole.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + name: vault-vault-contour-agent-injector-clusterrole +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: + - get + - list + - watch + - patch diff --git a/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-agent-injector-binding.yaml b/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-agent-injector-binding.yaml new file mode 100644 index 0000000..0a45548 --- /dev/null +++ b/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-agent-injector-binding.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + name: vault-vault-contour-agent-injector-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: vault-vault-contour-agent-injector-clusterrole +subjects: +- kind: ServiceAccount + name: vault-vault-contour-agent-injector + namespace: vault diff --git a/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-server-binding.yaml b/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-server-binding.yaml new file mode 100644 index 0000000..94ed29c --- /dev/null +++ b/rmk/infrastructure/vault/clusterrolebinding-vault-vault-contour-server-binding.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour-server-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: vault-vault-contour + namespace: vault diff --git a/rmk/infrastructure/vault/configmap-vault-vault-contour-config.yaml b/rmk/infrastructure/vault/configmap-vault-vault-contour-config.yaml new file mode 100644 index 0000000..145d4a5 --- /dev/null +++ b/rmk/infrastructure/vault/configmap-vault-vault-contour-config.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +data: + extraconfig-from-values.hcl: "ui = true\n\nlistener \"tcp\" {\n tls_disable = 1\n address = \"[::]:8200\"\n cluster_address = \"[::]:8201\"\n # Enable unauthenticated metrics access (necessary for Prometheus Operator)\n #telemetry {\n # unauthenticated_metrics_access = \"true\"\n #}\n}\n\nstorage \"raft\" {\n path = \"/vault/data\"\n\n retry_join {\n leader_api_addr = \"http://vault-vault-contour-0.vault-vault-contour-internal:8200\"\n }\n retry_join {\n leader_api_addr = \"http://vault-vault-contour-1.vault-vault-contour-internal:8200\"\n }\n retry_join {\n leader_api_addr = \"http://vault-vault-contour-2.vault-vault-contour-internal:8200\"\n }\n}\n\nservice_registration \"kubernetes\" {}\n\ndisable_mlock = true" +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour-config + namespace: vault diff --git a/rmk/infrastructure/vault/deployment-vault-vault-contour-agent-injector.yaml b/rmk/infrastructure/vault/deployment-vault-vault-contour-agent-injector.yaml new file mode 100644 index 0000000..dbf6191 --- /dev/null +++ b/rmk/infrastructure/vault/deployment-vault-vault-contour-agent-injector.yaml @@ -0,0 +1,121 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + component: webhook + name: vault-vault-contour-agent-injector + namespace: vault +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour-agent-injector + component: webhook + template: + metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour-agent-injector + component: webhook + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour-agent-injector + component: webhook + topologyKey: kubernetes.io/hostname + containers: + - args: + - agent-inject + - 2>&1 + env: + - name: AGENT_INJECT_LISTEN + value: :8080 + - name: AGENT_INJECT_LOG_LEVEL + value: info + - name: AGENT_INJECT_VAULT_ADDR + value: http://vault-vault-contour.vault.svc:8200 + - name: AGENT_INJECT_VAULT_AUTH_PATH + value: auth/kubernetes + - name: AGENT_INJECT_VAULT_IMAGE + value: cr.yandex/crp3ccidau046kdj8g9q/vault/vault:1.21.2 + - name: AGENT_INJECT_TLS_AUTO + value: vault-vault-contour-agent-injector-cfg + - name: AGENT_INJECT_TLS_AUTO_HOSTS + value: vault-vault-contour-agent-injector-svc,vault-vault-contour-agent-injector-svc.vault,vault-vault-contour-agent-injector-svc.vault.svc + - name: AGENT_INJECT_LOG_FORMAT + value: standard + - name: AGENT_INJECT_REVOKE_ON_SHUTDOWN + value: 'false' + - name: AGENT_INJECT_CPU_REQUEST + value: 250m + - name: AGENT_INJECT_CPU_LIMIT + value: 500m + - name: AGENT_INJECT_MEM_REQUEST + value: 64Mi + - name: AGENT_INJECT_MEM_LIMIT + value: 128Mi + - name: AGENT_INJECT_DEFAULT_TEMPLATE + value: map + - name: AGENT_INJECT_TEMPLATE_CONFIG_EXIT_ON_RETRY_FAILURE + value: 'true' + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + image: cr.yandex/crp3ccidau046kdj8g9q/vault/vault-k8s:1.7.2 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 2 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTPS + initialDelaySeconds: 5 + periodSeconds: 2 + successThreshold: 1 + timeoutSeconds: 5 + name: sidecar-injector + readinessProbe: + failureThreshold: 2 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTPS + initialDelaySeconds: 5 + periodSeconds: 2 + successThreshold: 1 + timeoutSeconds: 5 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + startupProbe: + failureThreshold: 12 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTPS + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 5 + hostNetwork: false + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + securityContext: + fsGroup: 1000 + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 100 + serviceAccountName: vault-vault-contour-agent-injector diff --git a/rmk/infrastructure/vault/mutatingwebhookconfiguration-vault-vault-contour-agent-injector-cfg.yaml b/rmk/infrastructure/vault/mutatingwebhookconfiguration-vault-vault-contour-agent-injector-cfg.yaml new file mode 100644 index 0000000..0e3cd63 --- /dev/null +++ b/rmk/infrastructure/vault/mutatingwebhookconfiguration-vault-vault-contour-agent-injector-cfg.yaml @@ -0,0 +1,39 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + name: vault-vault-contour-agent-injector-cfg +webhooks: +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + caBundle: '' + service: + name: vault-vault-contour-agent-injector-svc + namespace: vault + path: /mutate + failurePolicy: Ignore + matchPolicy: Exact + name: vault.hashicorp.com + objectSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: NotIn + values: + - vault-contour-agent-injector + rules: + - apiGroups: + - '' + apiVersions: + - v1 + operations: + - CREATE + resources: + - pods + scope: Namespaced + sideEffects: None + timeoutSeconds: 30 diff --git a/rmk/infrastructure/vault/namespace-vault.yaml b/rmk/infrastructure/vault/namespace-vault.yaml new file mode 100644 index 0000000..77ee9e7 --- /dev/null +++ b/rmk/infrastructure/vault/namespace-vault.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: vault + labels: + istio-injection: enabled diff --git a/rmk/infrastructure/vault/poddisruptionbudget-vault-vault-contour.yaml b/rmk/infrastructure/vault/poddisruptionbudget-vault-vault-contour.yaml new file mode 100644 index 0000000..9a741ed --- /dev/null +++ b/rmk/infrastructure/vault/poddisruptionbudget-vault-vault-contour.yaml @@ -0,0 +1,17 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour + namespace: vault +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server diff --git a/rmk/infrastructure/vault/role-vault-vault-contour-discovery-role.yaml b/rmk/infrastructure/vault/role-vault-vault-contour-discovery-role.yaml new file mode 100644 index 0000000..65d07c2 --- /dev/null +++ b/rmk/infrastructure/vault/role-vault-vault-contour-discovery-role.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour-discovery-role + namespace: vault +rules: +- apiGroups: + - '' + resources: + - pods + verbs: + - get + - watch + - list + - update + - patch diff --git a/rmk/infrastructure/vault/rolebinding-vault-vault-contour-discovery-rolebinding.yaml b/rmk/infrastructure/vault/rolebinding-vault-vault-contour-discovery-rolebinding.yaml new file mode 100644 index 0000000..0b68d87 --- /dev/null +++ b/rmk/infrastructure/vault/rolebinding-vault-vault-contour-discovery-rolebinding.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour-discovery-rolebinding + namespace: vault +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: vault-vault-contour-discovery-role +subjects: +- kind: ServiceAccount + name: vault-vault-contour + namespace: vault diff --git a/rmk/infrastructure/vault/service-vault-vault-contour-active.yaml b/rmk/infrastructure/vault/service-vault-vault-contour-active.yaml new file mode 100644 index 0000000..89f5203 --- /dev/null +++ b/rmk/infrastructure/vault/service-vault-vault-contour-active.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + vault-active: 'true' + name: vault-vault-contour-active + namespace: vault +spec: + ports: + - name: http + port: 8200 + targetPort: 8200 + - name: https-internal + port: 8201 + targetPort: 8201 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server + vault-active: 'true' diff --git a/rmk/infrastructure/vault/service-vault-vault-contour-agent-injector-svc.yaml b/rmk/infrastructure/vault/service-vault-vault-contour-agent-injector-svc.yaml new file mode 100644 index 0000000..dcfd4ec --- /dev/null +++ b/rmk/infrastructure/vault/service-vault-vault-contour-agent-injector-svc.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + name: vault-vault-contour-agent-injector-svc + namespace: vault +spec: + ports: + - name: https + port: 443 + targetPort: 8080 + selector: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour-agent-injector + component: webhook diff --git a/rmk/infrastructure/vault/service-vault-vault-contour-internal.yaml b/rmk/infrastructure/vault/service-vault-vault-contour-internal.yaml new file mode 100644 index 0000000..5f15376 --- /dev/null +++ b/rmk/infrastructure/vault/service-vault-vault-contour-internal.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + vault-internal: 'true' + name: vault-vault-contour-internal + namespace: vault +spec: + clusterIP: None + ports: + - name: http + port: 8200 + targetPort: 8200 + - name: https-internal + port: 8201 + targetPort: 8201 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server diff --git a/rmk/infrastructure/vault/service-vault-vault-contour-standby.yaml b/rmk/infrastructure/vault/service-vault-vault-contour-standby.yaml new file mode 100644 index 0000000..abfd04f --- /dev/null +++ b/rmk/infrastructure/vault/service-vault-vault-contour-standby.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour-standby + namespace: vault +spec: + ports: + - name: http + port: 8200 + targetPort: 8200 + - name: https-internal + port: 8201 + targetPort: 8201 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server + vault-active: 'false' diff --git a/rmk/infrastructure/vault/service-vault-vault-contour.yaml b/rmk/infrastructure/vault/service-vault-vault-contour.yaml new file mode 100644 index 0000000..c56944e --- /dev/null +++ b/rmk/infrastructure/vault/service-vault-vault-contour.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour + namespace: vault +spec: + ports: + - name: http + port: 8200 + targetPort: 8200 + - name: https-internal + port: 8201 + targetPort: 8201 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server diff --git a/rmk/infrastructure/vault/serviceaccount-vault-vault-contour-agent-injector.yaml b/rmk/infrastructure/vault/serviceaccount-vault-vault-contour-agent-injector.yaml new file mode 100644 index 0000000..a7c1559 --- /dev/null +++ b/rmk/infrastructure/vault/serviceaccount-vault-vault-contour-agent-injector.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour-agent-injector + name: vault-vault-contour-agent-injector + namespace: vault diff --git a/rmk/infrastructure/vault/serviceaccount-vault-vault-contour.yaml b/rmk/infrastructure/vault/serviceaccount-vault-vault-contour.yaml new file mode 100644 index 0000000..0c2d826 --- /dev/null +++ b/rmk/infrastructure/vault/serviceaccount-vault-vault-contour.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + helm.sh/chart: vault-contour-0.2.3 + name: vault-vault-contour + namespace: vault diff --git a/rmk/infrastructure/vault/statefulset-vault-vault-contour.yaml b/rmk/infrastructure/vault/statefulset-vault-vault-contour.yaml new file mode 100644 index 0000000..121e0ed --- /dev/null +++ b/rmk/infrastructure/vault/statefulset-vault-vault-contour.yaml @@ -0,0 +1,152 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: vault-contour + name: vault-vault-contour + namespace: vault +spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain + podManagementPolicy: Parallel + replicas: 3 + selector: + matchLabels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server + serviceName: vault-vault-contour-internal + template: + metadata: + annotations: null + labels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server + helm.sh/chart: vault-contour-0.2.3 + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/instance: vault + app.kubernetes.io/name: vault-contour + component: server + topologyKey: kubernetes.io/hostname + containers: + - args: + - "cp /vault/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl;\n[ -n \"${HOST_IP}\" ] && sed -Ei \"s|HOST_IP|${HOST_IP?}|g\" /tmp/storageconfig.hcl;\n[ -n \"${POD_IP}\" ] && sed -Ei \"s|POD_IP|${POD_IP?}|g\" /tmp/storageconfig.hcl;\n[ -n \"${HOSTNAME}\" ] && sed -Ei \"s|HOSTNAME|${HOSTNAME?}|g\" /tmp/storageconfig.hcl;\n[ -n \"${API_ADDR}\" ] && sed -Ei \"s|API_ADDR|${API_ADDR?}|g\" /tmp/storageconfig.hcl;\n[ -n \"${TRANSIT_ADDR}\" ] && sed -Ei \"s|TRANSIT_ADDR|${TRANSIT_ADDR?}|g\" /tmp/storageconfig.hcl;\n[ -n \"${RAFT_ADDR}\" ] && sed -Ei \"s|RAFT_ADDR|${RAFT_ADDR?}|g\" /tmp/storageconfig.hcl;\n/usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl \n" + command: + - /bin/sh + - -ec + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: VAULT_K8S_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: VAULT_K8S_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: VAULT_ADDR + value: http://127.0.0.1:8200 + - name: VAULT_API_ADDR + value: http://$(POD_IP):8200 + - name: SKIP_CHOWN + value: 'true' + - name: SKIP_SETCAP + value: 'true' + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: VAULT_CLUSTER_ADDR + value: https://$(HOSTNAME).vault-vault-contour-internal:8201 + - name: VAULT_RAFT_NODE_ID + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: HOME + value: /home/vault + image: cr.yandex/crp3ccidau046kdj8g9q/vault/vault:1.21.2 + imagePullPolicy: IfNotPresent + lifecycle: + preStop: + exec: + command: + - /bin/sh + - -c + - sleep 5 && kill -SIGTERM $(pidof vault) + name: vault + ports: + - containerPort: 8200 + name: http + - containerPort: 8201 + name: https-internal + - containerPort: 8202 + name: http-rep + readinessProbe: + exec: + command: + - /bin/sh + - -ec + - vault status -tls-skip-verify + failureThreshold: 2 + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 3 + securityContext: + allowPrivilegeEscalation: false + volumeMounts: + - mountPath: /vault/data + name: data + - mountPath: /vault/config + name: config + - mountPath: /home/vault + name: home + hostNetwork: false + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + securityContext: + fsGroup: 1000 + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 100 + serviceAccountName: vault-vault-contour + terminationGracePeriodSeconds: 10 + tolerations: [] + volumes: + - configMap: + name: vault-vault-contour-config + name: config + - emptyDir: {} + name: home + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + storageClassName: local-path diff --git a/rmk/infrastructure/zitadel/configmap-corporate-ca.yaml b/rmk/infrastructure/zitadel/configmap-corporate-ca.yaml new file mode 100644 index 0000000..eaa11c2 --- /dev/null +++ b/rmk/infrastructure/zitadel/configmap-corporate-ca.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: corporate-ca + namespace: zitadel +data: + corporate-ca.crt: '# REPLACE: corporate root CA certificate in PEM format + + ' diff --git a/rmk/infrastructure/zitadel/configmap-zitadel-idp-contour-config-yaml.yaml b/rmk/infrastructure/zitadel/configmap-zitadel-idp-contour-config-yaml.yaml new file mode 100644 index 0000000..0db47f8 --- /dev/null +++ b/rmk/infrastructure/zitadel/configmap-zitadel-idp-contour-config-yaml.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +data: + zitadel-config-yaml: "ExternalDomain: login.stand.sarex.tech\nExternalSecure: true\nFirstInstance:\n Org:\n LoginClient:\n Machine:\n Name: Automatically Initialized IAM Login Client\n Username: login-client\n Pat.ExpirationDate: \"2039-01-01T00:00:00Z\"\nMachine:\n Identification:\n Hostname:\n Enabled: true\n Webhook:\n Enabled: true\nPort: 8080\nTLS:\n Enabled: false" +kind: ConfigMap +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '0' + labels: + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel-idp-contour-config-yaml diff --git a/rmk/infrastructure/zitadel/deployment-zitadel-idp-contour.yaml b/rmk/infrastructure/zitadel/deployment-zitadel-idp-contour.yaml new file mode 100644 index 0000000..aa86b1d --- /dev/null +++ b/rmk/infrastructure/zitadel/deployment-zitadel-idp-contour.yaml @@ -0,0 +1,159 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: start + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel-idp-contour +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: start + app.kubernetes.io/instance: zitadel + app.kubernetes.io/name: idp-contour + template: + metadata: + annotations: + checksum/configmap: 2dc68dd26a078e58f5fa1d9a019d4c4bb63b3f6018bf2d3f154611dac77d245d + checksum/secret-db-ssl-ca-crt: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + checksum/secret-zitadel-secrets: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-zitadel-vault-config.yaml: secrets/data/zitadel/postgresql + vault.hashicorp.com/agent-inject-template-zitadel-vault-config.yaml: "{{- with secret \"secrets/data/zitadel/postgresql\" -}}\nDatabase:\n postgres:\n User:\n Password: |-\n {{ index .Data.data \"password\" }}\n Admin:\n Password: |-\n {{ index .Data.data \"password\" }}\nFirstInstance:\n Org:\n Human:\n Password: |-\n {{ index .Data.data \"humanPassword\" }}\n{{- end -}}" + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: zitadel + labels: + app.kubernetes.io/component: start + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + sidecar.istio.io/inject: 'true' + spec: + containers: + - args: + - start + - --config + - /config/zitadel-config-yaml + - --config + - /vault/secrets/zitadel-vault-config.yaml + - --masterkeyFromEnv + env: + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: ZITADEL_MASTERKEY + valueFrom: + secretKeyRef: + key: masterkey + name: zitadel-masterkey + - name: ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED + value: 'false' + - name: ZITADEL_SYSTEMDEFAULTS_PASSWORDHASHER_VERIFIERS + value: bcrypt,pbkdf2 + - name: ZITADEL_MACHINE_IDENTIFICATION_HOSTNAME_ENABLED + value: 'true' + - name: ZITADEL_DATABASE_POSTGRES_HOST + value: postgresql.postgresql.svc.cluster.local + - name: ZITADEL_DATABASE_POSTGRES_PORT + value: '5432' + - name: ZITADEL_DATABASE_POSTGRES_USER_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_EXISTINGDATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_DATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE + value: disable + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE + value: disable + - name: ZITADEL_DEFAULTINSTANCE_ORG_HUMAN_USERNAME + value: zitadel-admin + - name: ZITADEL_DEFAULTINSTANCE_ORG_NAME + value: Sarex + - name: SSL_CERT_DIR + value: /etc/ssl/corporate:/etc/ssl/certs + image: cr.yandex/crp3ccidau046kdj8g9q/contour/zitadel/zitadel:4.12.2 + imagePullPolicy: Always + livenessProbe: + failureThreshold: 3 + httpGet: + httpHeaders: + - name: Host + value: login.stand.sarex.tech + path: /debug/healthz + port: http2-server + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 5 + name: idp-contour + ports: + - containerPort: 8080 + name: http2-server + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + httpHeaders: + - name: Host + value: login.stand.sarex.tech + path: /debug/ready + port: http2-server + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 5 + resources: {} + securityContext: + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + startupProbe: + failureThreshold: 30 + httpGet: + httpHeaders: + - name: Host + value: login.stand.sarex.tech + path: /debug/ready + port: http2-server + scheme: HTTP + periodSeconds: 1 + volumeMounts: + - mountPath: /config + name: zitadel-config-yaml + readOnly: true + - mountPath: /etc/ssl/corporate + name: corporate-ca + readOnly: true + enableServiceLinks: false + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + securityContext: + fsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: zitadel + tolerations: [] + volumes: + - configMap: + name: zitadel-idp-contour-config-yaml + name: zitadel-config-yaml + - configMap: + name: corporate-ca + name: corporate-ca diff --git a/rmk/infrastructure/zitadel/job-zitadel-idp-contour-init.yaml b/rmk/infrastructure/zitadel/job-zitadel-idp-contour-init.yaml new file mode 100644 index 0000000..d921d8b --- /dev/null +++ b/rmk/infrastructure/zitadel/job-zitadel-idp-contour-init.yaml @@ -0,0 +1,117 @@ +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '1' + labels: + app.kubernetes.io/component: init + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel-idp-contour-init +spec: + activeDeadlineSeconds: 300 + backoffLimit: 5 + template: + metadata: + annotations: + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-zitadel-vault-config.yaml: secrets/data/zitadel/postgresql + vault.hashicorp.com/agent-inject-template-zitadel-vault-config.yaml: "{{- with secret \"secrets/data/zitadel/postgresql\" -}}\nDatabase:\n postgres:\n User:\n Password: |-\n {{ index .Data.data \"password\" }}\n Admin:\n Password: |-\n {{ index .Data.data \"password\" }}\nFirstInstance:\n Org:\n Human:\n Password: |-\n {{ index .Data.data \"humanPassword\" }}\n{{- end -}}" + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: zitadel + labels: + app.kubernetes.io/component: init + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + sidecar.istio.io/inject: 'false' + spec: + containers: + - args: + - init + - zitadel + - --config + - /config/zitadel-config-yaml + - --config + - /vault/secrets/zitadel-vault-config.yaml + env: + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED + value: 'false' + - name: ZITADEL_SYSTEMDEFAULTS_PASSWORDHASHER_VERIFIERS + value: bcrypt,pbkdf2 + - name: ZITADEL_MACHINE_IDENTIFICATION_HOSTNAME_ENABLED + value: 'true' + - name: ZITADEL_DATABASE_POSTGRES_HOST + value: postgresql.postgresql.svc.cluster.local + - name: ZITADEL_DATABASE_POSTGRES_PORT + value: '5432' + - name: ZITADEL_DATABASE_POSTGRES_USER_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_EXISTINGDATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_DATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE + value: disable + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE + value: disable + - name: ZITADEL_DEFAULTINSTANCE_ORG_HUMAN_USERNAME + value: zitadel-admin + - name: ZITADEL_DEFAULTINSTANCE_ORG_NAME + value: Sarex + - name: SSL_CERT_DIR + value: /etc/ssl/corporate:/etc/ssl/certs + image: cr.yandex/crp3ccidau046kdj8g9q/contour/zitadel/zitadel:4.12.2 + imagePullPolicy: Always + name: idp-contour-init + resources: {} + securityContext: + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + volumeMounts: + - mountPath: /config + name: zitadel-config-yaml + readOnly: true + - mountPath: /etc/ssl/corporate + name: corporate-ca + readOnly: true + enableServiceLinks: false + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + restartPolicy: Never + securityContext: + fsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: zitadel + tolerations: [] + volumes: + - configMap: + defaultMode: 288 + name: zitadel-idp-contour-config-yaml + name: zitadel-config-yaml + - configMap: + name: corporate-ca + name: corporate-ca diff --git a/rmk/infrastructure/zitadel/job-zitadel-idp-contour-setup.yaml b/rmk/infrastructure/zitadel/job-zitadel-idp-contour-setup.yaml new file mode 100644 index 0000000..2af7358 --- /dev/null +++ b/rmk/infrastructure/zitadel/job-zitadel-idp-contour-setup.yaml @@ -0,0 +1,156 @@ +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '2' + labels: + app.kubernetes.io/component: setup + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel-idp-contour-setup +spec: + activeDeadlineSeconds: 3600 + backoffLimit: null + template: + metadata: + annotations: + proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' + traffic.sidecar.istio.io/excludeOutboundPorts: '8200' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-inject-secret-zitadel-vault-config.yaml: secrets/data/zitadel/postgresql + vault.hashicorp.com/agent-inject-template-zitadel-vault-config.yaml: "{{- with secret \"secrets/data/zitadel/postgresql\" -}}\nDatabase:\n postgres:\n User:\n Password: |-\n {{ index .Data.data \"password\" }}\n Admin:\n Password: |-\n {{ index .Data.data \"password\" }}\nFirstInstance:\n Org:\n Human:\n Password: |-\n {{ index .Data.data \"humanPassword\" }}\n{{- end -}}" + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: zitadel + labels: + app.kubernetes.io/component: setup + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + sidecar.istio.io/inject: 'false' + spec: + containers: + - args: + - setup + - --masterkeyFromEnv + - --config + - /config/zitadel-config-yaml + - --steps + - /config/zitadel-config-yaml + - --config + - /vault/secrets/zitadel-vault-config.yaml + - --steps + - /vault/secrets/zitadel-vault-config.yaml + - --init-projections=true + env: + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: ZITADEL_MASTERKEY + valueFrom: + secretKeyRef: + key: masterkey + name: zitadel-masterkey + - name: ZITADEL_FIRSTINSTANCE_MACHINEKEYPATH + value: /machinekey/sa.json + - name: ZITADEL_FIRSTINSTANCE_LOGINCLIENTPATPATH + value: /login-client/pat + - name: ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED + value: 'false' + - name: ZITADEL_SYSTEMDEFAULTS_PASSWORDHASHER_VERIFIERS + value: bcrypt,pbkdf2 + - name: ZITADEL_MACHINE_IDENTIFICATION_HOSTNAME_ENABLED + value: 'true' + - name: ZITADEL_DATABASE_POSTGRES_HOST + value: postgresql.postgresql.svc.cluster.local + - name: ZITADEL_DATABASE_POSTGRES_PORT + value: '5432' + - name: ZITADEL_DATABASE_POSTGRES_USER_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_EXISTINGDATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_DATABASE + value: zitadel + - name: ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE + value: disable + - name: ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE + value: disable + - name: ZITADEL_DEFAULTINSTANCE_ORG_HUMAN_USERNAME + value: zitadel-admin + - name: ZITADEL_DEFAULTINSTANCE_ORG_NAME + value: Sarex + - name: SSL_CERT_DIR + value: /etc/ssl/corporate:/etc/ssl/certs + image: cr.yandex/crp3ccidau046kdj8g9q/contour/zitadel/zitadel:4.12.2 + imagePullPolicy: Always + name: idp-contour-setup + resources: {} + securityContext: + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + volumeMounts: + - mountPath: /config + name: zitadel-config-yaml + readOnly: true + - mountPath: /login-client + name: login-client + - mountPath: /etc/ssl/corporate + name: corporate-ca + readOnly: true + - command: + - sh + - -c + - until [ ! -z $(kubectl -n zitadel get po ${POD_NAME} -o jsonpath="{.status.containerStatuses[?(@.name=='idp-contour-setup')].state.terminated}") ]; do echo 'waiting for idp-contour-setup container to terminate'; sleep 5; done && echo 'idp-contour-setup container terminated' && if [ -f /login-client/pat ]; then kubectl -n zitadel create secret generic login-client --from-file=pat=/login-client/pat; fi; + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + image: cr.yandex/crp3ccidau046kdj8g9q/contour/zitadel/kubectl:1.33.4 + name: idp-contour-login-client-pat + resources: {} + securityContext: + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + volumeMounts: + - mountPath: /login-client + name: login-client + readOnly: true + enableServiceLinks: false + imagePullSecrets: + - name: regcred + nodeSelector: + dedicated: generic + restartPolicy: Never + securityContext: + fsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: zitadel + tolerations: [] + volumes: + - configMap: + defaultMode: 288 + name: zitadel-idp-contour-config-yaml + name: zitadel-config-yaml + - emptyDir: {} + name: login-client + - configMap: + name: corporate-ca + name: corporate-ca diff --git a/rmk/infrastructure/zitadel/namespace-zitadel.yaml b/rmk/infrastructure/zitadel/namespace-zitadel.yaml new file mode 100644 index 0000000..ffe7f4c --- /dev/null +++ b/rmk/infrastructure/zitadel/namespace-zitadel.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: zitadel + labels: + istio-injection: enabled diff --git a/rmk/infrastructure/zitadel/role-zitadel.yaml b/rmk/infrastructure/zitadel/role-zitadel.yaml new file mode 100644 index 0000000..980b1da --- /dev/null +++ b/rmk/infrastructure/zitadel/role-zitadel.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '0' + labels: + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel +rules: +- apiGroups: + - '' + resources: + - secrets + verbs: + - get + - create +- apiGroups: + - '' + resources: + - pods + verbs: + - get diff --git a/rmk/infrastructure/zitadel/rolebinding-zitadel.yaml b/rmk/infrastructure/zitadel/rolebinding-zitadel.yaml new file mode 100644 index 0000000..a5a8d21 --- /dev/null +++ b/rmk/infrastructure/zitadel/rolebinding-zitadel.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '0' + labels: + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: zitadel +subjects: +- kind: ServiceAccount + name: zitadel diff --git a/rmk/infrastructure/zitadel/service-zitadel-idp-contour.yaml b/rmk/infrastructure/zitadel/service-zitadel-idp-contour.yaml new file mode 100644 index 0000000..550730f --- /dev/null +++ b/rmk/infrastructure/zitadel/service-zitadel-idp-contour.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel-idp-contour +spec: + ports: + - appProtocol: null + name: http2-server + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app.kubernetes.io/component: start + app.kubernetes.io/instance: zitadel + app.kubernetes.io/name: idp-contour + type: ClusterIP diff --git a/rmk/infrastructure/zitadel/serviceaccount-zitadel.yaml b/rmk/infrastructure/zitadel/serviceaccount-zitadel.yaml new file mode 100644 index 0000000..3b902aa --- /dev/null +++ b/rmk/infrastructure/zitadel/serviceaccount-zitadel.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-delete-policy: before-hook-creation + helm.sh/hook-weight: '0' + labels: + app.kubernetes.io/instance: zitadel + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: idp-contour + app.kubernetes.io/version: 4.12.2 + helm.sh/chart: idp-contour-4.12.13 + name: zitadel