From 15bcfcdce46074c2281ee94c953a45aafda84dbc Mon Sep 17 00:00:00 2001 From: deploy Date: Sat, 19 Sep 2026 19:32:48 +0000 Subject: [PATCH] feat(acme): runtimes consolidados ao lado dos servicos (P4.3-P4.9) --- tenants/acme/00-namespace-quota-netpol.yaml | 2 +- .../acme/07-sealed-consentimento-selo.yaml | 15 +++ tenants/acme/65-runtime-core.yaml | 86 +++++++++++++++++ tenants/acme/66-runtime-operacao.yaml | 84 ++++++++++++++++ tenants/acme/67-runtime-saude.yaml | 95 +++++++++++++++++++ 5 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 tenants/acme/07-sealed-consentimento-selo.yaml create mode 100644 tenants/acme/65-runtime-core.yaml create mode 100644 tenants/acme/66-runtime-operacao.yaml create mode 100644 tenants/acme/67-runtime-saude.yaml diff --git a/tenants/acme/00-namespace-quota-netpol.yaml b/tenants/acme/00-namespace-quota-netpol.yaml index 706e4a9..8e4b7db 100644 --- a/tenants/acme/00-namespace-quota-netpol.yaml +++ b/tenants/acme/00-namespace-quota-netpol.yaml @@ -16,7 +16,7 @@ metadata: spec: hard: requests.cpu: "4" - requests.memory: 6Gi + requests.memory: 7Gi limits.cpu: "20" limits.memory: 16Gi pods: "30" diff --git a/tenants/acme/07-sealed-consentimento-selo.yaml b/tenants/acme/07-sealed-consentimento-selo.yaml new file mode 100644 index 0000000..fbe698a --- /dev/null +++ b/tenants/acme/07-sealed-consentimento-selo.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: consentimento-selo + namespace: acme-prod +spec: + encryptedData: + segredo: AgCk4rJ0PRUxNLifptIwC+p7tstVvLq0MokuAezVR2V6hxP9I7yYI5Ve/v2ttmvenvYjWUNuM2PtwOi8S2mo2HbWLMboHRjJv5Fmkr2c5wBPM4xoFK6pAAc6tNNHdeZTIQeEzUrT8nqCW97XEpJfNLoeVdLVNsTrkPl6cXRb/w2aNFZVFlRZJtFg3SPih/8bbcQTdevIXtL3ElE0Vt0is5k8zCVpMzR2iPCtMsLJj6kk7JG3/SNDWAD1boUklcnENXPULrhgOdP4gLS155yH4fNdVkII6rkvphjhOphjo4RRS3ICxLHdsemwfAzy/43IdWq9cWQedsvLTUYBXZSvMKdjDhobuEnMFVO8CevVZWMhsU90Yc/P0jwSWWnLij6rv2Ac8DIw6aSbOBiOeGStZloqlsMI6Nqvc/UOwcbcAEw91bHp1E9AkI5sH8fQlELUcFsg2HfFy2nRX2fnca8GY3TclhBLenKQYbGh6uYkXY89rjDMswFPLmcCCmIV7jh8AyTojrp0DPhXZyl1h9cOGkz5XYDlnNTIAXgMRoMCFpIBYjYO0xoejmimVJTJfl8KQp5OrBokr5ZERD5RMjEK6t1hUt9mP6LER0DMY47cpXIFz2NHwHQAem/lxKiB0UPOTSOUcr0aizVUtkyTW8oaE7pnJD58ayFqhaGzgpG0mSiFOqwGdKd8tSDZmpGkTweR6JvBt5E8YkAjKHx54/ZVX86iEoYbcqcz+bOo8mbe8pC5m0dTr+Xvcfol + template: + metadata: + creationTimestamp: null + name: consentimento-selo + namespace: acme-prod diff --git a/tenants/acme/65-runtime-core.yaml b/tenants/acme/65-runtime-core.yaml new file mode 100644 index 0000000..470e185 --- /dev/null +++ b/tenants/acme/65-runtime-core.yaml @@ -0,0 +1,86 @@ +# P4.3-P4.9 — runtime-core do acme. GERADO por scripts/consolidar_demo.py a partir +# da uniao do ambiente dos servicos que ele absorve. Nao edite a mao sem rodar o +# --check de novo. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: runtime-core + namespace: acme-prod + labels: + app: runtime-core +spec: + replicas: 1 + selector: + matchLabels: + app: runtime-core + template: + metadata: + labels: + app: runtime-core + athleticmap.io/contexto: runtime-core + spec: + containers: + - name: runtime-core + image: docker.io/library/runtime-core:1.1-demo + imagePullPolicy: Never + ports: + - containerPort: 8083 + env: + - name: SPRING_DATASOURCE_URL + value: jdbc:postgresql://pgbouncer.plataforma-prod.svc.cluster.local:6432/athleticmap_acme + - name: SPRING_DATASOURCE_USERNAME + value: r_acme + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: db-compartilhado + key: password + - name: ATM_JWK_SET_URI + value: http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs + - name: ATM_ISSUER + value: https://auth-acme.athleticmap.influxdigital.com.br/realms/athleticmap + - name: ATM_TENANT + value: acme + - name: ATM_KC_ADMIN_ENABLED + value: 'true' + - name: ATM_KC_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: kc-admin-secret + key: client-secret + - name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE + value: '10' + resources: + requests: + cpu: 100m + memory: 384Mi + limits: + cpu: '1' + memory: 768Mi + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: 8083 + initialDelaySeconds: 25 + periodSeconds: 10 + failureThreshold: 30 + livenessProbe: + httpGet: + path: /actuator/health/liveness + port: 8083 + initialDelaySeconds: 90 + periodSeconds: 20 + failureThreshold: 6 +--- +apiVersion: v1 +kind: Service +metadata: + name: runtime-core + namespace: acme-prod +spec: + selector: + app: runtime-core + ports: + - name: http + port: 80 + targetPort: 8083 diff --git a/tenants/acme/66-runtime-operacao.yaml b/tenants/acme/66-runtime-operacao.yaml new file mode 100644 index 0000000..bd1e7b1 --- /dev/null +++ b/tenants/acme/66-runtime-operacao.yaml @@ -0,0 +1,84 @@ +# P4.3-P4.9 — runtime-operacao do acme. GERADO por scripts/consolidar_demo.py a partir +# da uniao do ambiente dos servicos que ele absorve. Nao edite a mao sem rodar o +# --check de novo. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: runtime-operacao + namespace: acme-prod + labels: + app: runtime-operacao +spec: + replicas: 0 + selector: + matchLabels: + app: runtime-operacao + template: + metadata: + labels: + app: runtime-operacao + athleticmap.io/contexto: runtime-operacao + spec: + containers: + - name: runtime-operacao + image: docker.io/library/runtime-operacao:1.1-demo + imagePullPolicy: Never + ports: + - containerPort: 8083 + env: + - name: SPRING_DATASOURCE_URL + value: jdbc:postgresql://pgbouncer.plataforma-prod.svc.cluster.local:6432/athleticmap_acme + - name: SPRING_DATASOURCE_USERNAME + value: r_acme + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: db-compartilhado + key: password + - name: ATM_JWK_SET_URI + value: http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs + - name: ATM_ISSUER + value: https://auth-acme.athleticmap.influxdigital.com.br/realms/athleticmap + - name: ATM_TENANT + value: acme + - name: ATM_CONSENTIMENTO_SEGREDO + valueFrom: + secretKeyRef: + name: consentimento-selo + key: segredo + - name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE + value: '10' + resources: + requests: + cpu: 100m + memory: 384Mi + limits: + cpu: '1' + memory: 768Mi + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: 8083 + initialDelaySeconds: 25 + periodSeconds: 10 + failureThreshold: 30 + livenessProbe: + httpGet: + path: /actuator/health/liveness + port: 8083 + initialDelaySeconds: 90 + periodSeconds: 20 + failureThreshold: 6 +--- +apiVersion: v1 +kind: Service +metadata: + name: runtime-operacao + namespace: acme-prod +spec: + selector: + app: runtime-operacao + ports: + - name: http + port: 80 + targetPort: 8083 diff --git a/tenants/acme/67-runtime-saude.yaml b/tenants/acme/67-runtime-saude.yaml new file mode 100644 index 0000000..0723091 --- /dev/null +++ b/tenants/acme/67-runtime-saude.yaml @@ -0,0 +1,95 @@ +# P4.3-P4.9 — runtime-saude do acme. GERADO por scripts/consolidar_demo.py a partir +# da uniao do ambiente dos servicos que ele absorve. Nao edite a mao sem rodar o +# --check de novo. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: runtime-saude + namespace: acme-prod + labels: + app: runtime-saude +spec: + replicas: 0 + selector: + matchLabels: + app: runtime-saude + template: + metadata: + labels: + app: runtime-saude + athleticmap.io/contexto: runtime-saude + spec: + containers: + - name: runtime-saude + image: docker.io/library/runtime-saude:1.2-demo + imagePullPolicy: Never + ports: + - containerPort: 8083 + env: + - name: SPRING_DATASOURCE_URL + value: jdbc:postgresql://pgbouncer.plataforma-prod.svc.cluster.local:6432/athleticmap_acme + - name: SPRING_DATASOURCE_USERNAME + value: r_acme + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: db-compartilhado + key: password + - name: ATM_JWK_SET_URI + value: http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs + - name: ATM_ISSUER + value: https://auth-acme.athleticmap.influxdigital.com.br/realms/athleticmap + - name: ATM_TENANT + value: acme + - name: GARMIN_REDIRECT_URI + value: https://acme.athleticmap.influxdigital.com.br/api/public/integrations/garmin/callback + - name: GARMIN_FRONTEND_REDIRECT + value: https://acme.athleticmap.influxdigital.com.br/integracoes/garmin + - name: GARMIN_CLIENT_ID + valueFrom: + secretKeyRef: + name: garmin-oauth + key: GARMIN_CLIENT_ID + - name: GARMIN_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: garmin-oauth + key: GARMIN_CLIENT_SECRET + - name: ATM_AUDITORIA_RETENCAO_DIAS + value: '730' + - name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE + value: '10' + resources: + requests: + cpu: 100m + memory: 384Mi + limits: + cpu: '1' + memory: 768Mi + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: 8083 + initialDelaySeconds: 25 + periodSeconds: 10 + failureThreshold: 30 + livenessProbe: + httpGet: + path: /actuator/health/liveness + port: 8083 + initialDelaySeconds: 90 + periodSeconds: 20 + failureThreshold: 6 +--- +apiVersion: v1 +kind: Service +metadata: + name: runtime-saude + namespace: acme-prod +spec: + selector: + app: runtime-saude + ports: + - name: http + port: 80 + targetPort: 8083