feat: migrar tenants para *.athleticmap.influxdigital.com.br
This commit is contained in:
@@ -44,7 +44,7 @@ spec:
|
||||
- name: KC_PROXY_HEADERS
|
||||
value: xforwarded
|
||||
- name: KC_HOSTNAME
|
||||
value: "auth-demo.187.77.37.184.nip.io"
|
||||
value: "auth-demo.athleticmap.influxdigital.com.br"
|
||||
- name: KC_HOSTNAME_STRICT
|
||||
value: "false"
|
||||
ports:
|
||||
|
||||
@@ -18,7 +18,7 @@ spec:
|
||||
imagePullPolicy: Never
|
||||
env:
|
||||
- { name: ATM_JWK_SET_URI, value: "http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs" }
|
||||
- { name: ATM_ISSUER, value: "https://auth-demo.187.77.37.184.nip.io/realms/athleticmap" }
|
||||
- { name: ATM_ISSUER, value: "https://auth-demo.athleticmap.influxdigital.com.br/realms/athleticmap" }
|
||||
- { name: ATM_TENANT, value: "demo" }
|
||||
ports: [{ containerPort: 8083 }]
|
||||
readinessProbe:
|
||||
@@ -64,7 +64,7 @@ data:
|
||||
<!doctype html>
|
||||
<html lang="pt-br"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Athletic Map — Demo</title>
|
||||
<script src="https://auth-demo.187.77.37.184.nip.io/js/keycloak.js"></script>
|
||||
<script src="https://auth-demo.athleticmap.influxdigital.com.br/js/keycloak.js"></script>
|
||||
<style>
|
||||
body{font-family:system-ui,sans-serif;background:#155eef;color:#eaf2ff;margin:0;padding:2rem}
|
||||
.card{max-width:760px;margin:2rem auto;background:#0e2f57;border-top:4px solid #ffd23f;border-radius:12px;padding:2rem;box-shadow:0 12px 40px rgba(0,0,0,.4)}
|
||||
@@ -75,7 +75,7 @@ data:
|
||||
</style></head>
|
||||
<body><div class="card" id="app"><p class="muted">Carregando…</p></div>
|
||||
<script>
|
||||
const kc = new Keycloak({ url: 'https://auth-demo.187.77.37.184.nip.io', realm: 'athleticmap', clientId: 'spa' });
|
||||
const kc = new Keycloak({ url: 'https://auth-demo.athleticmap.influxdigital.com.br', realm: 'athleticmap', clientId: 'spa' });
|
||||
kc.init({ onLoad: 'login-required', pkceMethod: 'S256', checkLoginIframe: false }).then(function (auth) {
|
||||
if (!auth) { document.getElementById('app').innerHTML = '<p>Nao autenticado.</p>'; return; }
|
||||
var t = kc.tokenParsed;
|
||||
@@ -104,7 +104,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: { app: frontend }
|
||||
annotations: { configVersion: "spa-1" }
|
||||
annotations: { configVersion: "spa-2" }
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
@@ -135,16 +135,16 @@ spec:
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- demo.187.77.37.184.nip.io
|
||||
- auth-demo.187.77.37.184.nip.io
|
||||
- demo.athleticmap.influxdigital.com.br
|
||||
- auth-demo.athleticmap.influxdigital.com.br
|
||||
secretName: demo-tls
|
||||
rules:
|
||||
- host: demo.187.77.37.184.nip.io
|
||||
- host: demo.athleticmap.influxdigital.com.br
|
||||
http:
|
||||
paths:
|
||||
- { path: /api, pathType: Prefix, backend: { service: { name: backend, port: { number: 80 } } } }
|
||||
- { path: /, pathType: Prefix, backend: { service: { name: frontend, port: { number: 80 } } } }
|
||||
- host: auth-demo.187.77.37.184.nip.io
|
||||
- host: auth-demo.athleticmap.influxdigital.com.br
|
||||
http:
|
||||
paths:
|
||||
- { path: /, pathType: Prefix, backend: { service: { name: keycloak, port: { number: 8080 } } } }
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
athleticmap-realm.json: |
|
||||
{
|
||||
"realm": "athleticmap",
|
||||
"enabled": true,
|
||||
"displayName": "Athletic Map",
|
||||
"loginWithEmailAllowed": true,
|
||||
"roles": {
|
||||
"realm": [
|
||||
{ "name": "admin" },
|
||||
{ "name": "atm_athlete" },
|
||||
{ "name": "atm_trainer" },
|
||||
{ "name": "atm_team_admin" },
|
||||
{ "name": "atm_fed_admin" }
|
||||
]
|
||||
},
|
||||
"clients": [
|
||||
{
|
||||
"clientId": "spa",
|
||||
"name": "Athletic Map SPA",
|
||||
"publicClient": true,
|
||||
"protocol": "openid-connect",
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": false,
|
||||
"redirectUris": ["https://demo.187.77.37.184.nip.io/*"],
|
||||
"webOrigins": ["https://demo.187.77.37.184.nip.io"],
|
||||
"attributes": {
|
||||
"pkce.code.challenge.method": "S256",
|
||||
"post.logout.redirect.uris": "https://demo.187.77.37.184.nip.io/*"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kc-realm-import
|
||||
namespace: demo-prod
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
- name: KC_PROXY_HEADERS
|
||||
value: xforwarded
|
||||
- name: KC_HOSTNAME
|
||||
value: "auth.187.77.37.184.nip.io"
|
||||
value: "auth-piloto.athleticmap.influxdigital.com.br"
|
||||
- name: KC_HOSTNAME_STRICT
|
||||
value: "false"
|
||||
ports:
|
||||
|
||||
@@ -18,7 +18,7 @@ spec:
|
||||
imagePullPolicy: Never
|
||||
env:
|
||||
- { name: ATM_JWK_SET_URI, value: "http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs" }
|
||||
- { name: ATM_ISSUER, value: "https://auth.187.77.37.184.nip.io/realms/athleticmap" }
|
||||
- { name: ATM_ISSUER, value: "https://auth-piloto.athleticmap.influxdigital.com.br/realms/athleticmap" }
|
||||
- { name: ATM_TENANT, value: "piloto" }
|
||||
ports: [{ containerPort: 8083 }]
|
||||
readinessProbe:
|
||||
@@ -64,7 +64,7 @@ data:
|
||||
<!doctype html>
|
||||
<html lang="pt-br"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Athletic Map — Piloto</title>
|
||||
<script src="https://auth.187.77.37.184.nip.io/js/keycloak.js"></script>
|
||||
<script src="https://auth-piloto.athleticmap.influxdigital.com.br/js/keycloak.js"></script>
|
||||
<style>
|
||||
body{font-family:system-ui,sans-serif;background:#0a2547;color:#eaf2ff;margin:0;padding:2rem}
|
||||
.card{max-width:760px;margin:2rem auto;background:#0e2f57;border-top:4px solid #37ca37;border-radius:12px;padding:2rem;box-shadow:0 12px 40px rgba(0,0,0,.4)}
|
||||
@@ -75,7 +75,7 @@ data:
|
||||
</style></head>
|
||||
<body><div class="card" id="app"><p class="muted">Carregando…</p></div>
|
||||
<script>
|
||||
const kc = new Keycloak({ url: 'https://auth.187.77.37.184.nip.io', realm: 'athleticmap', clientId: 'spa' });
|
||||
const kc = new Keycloak({ url: 'https://auth-piloto.athleticmap.influxdigital.com.br', realm: 'athleticmap', clientId: 'spa' });
|
||||
kc.init({ onLoad: 'login-required', pkceMethod: 'S256', checkLoginIframe: false }).then(function (auth) {
|
||||
if (!auth) { document.getElementById('app').innerHTML = '<p>Nao autenticado.</p>'; return; }
|
||||
var t = kc.tokenParsed;
|
||||
@@ -104,7 +104,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: { app: frontend }
|
||||
annotations: { configVersion: "spa-1" }
|
||||
annotations: { configVersion: "spa-2" }
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
@@ -135,16 +135,16 @@ spec:
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- piloto.187.77.37.184.nip.io
|
||||
- auth.187.77.37.184.nip.io
|
||||
- piloto.athleticmap.influxdigital.com.br
|
||||
- auth-piloto.athleticmap.influxdigital.com.br
|
||||
secretName: piloto-tls
|
||||
rules:
|
||||
- host: piloto.187.77.37.184.nip.io
|
||||
- host: piloto.athleticmap.influxdigital.com.br
|
||||
http:
|
||||
paths:
|
||||
- { path: /api, pathType: Prefix, backend: { service: { name: backend, port: { number: 80 } } } }
|
||||
- { path: /, pathType: Prefix, backend: { service: { name: frontend, port: { number: 80 } } } }
|
||||
- host: auth.187.77.37.184.nip.io
|
||||
- host: auth-piloto.athleticmap.influxdigital.com.br
|
||||
http:
|
||||
paths:
|
||||
- { path: /, pathType: Prefix, backend: { service: { name: keycloak, port: { number: 8080 } } } }
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
athleticmap-realm.json: |
|
||||
{
|
||||
"realm": "athleticmap",
|
||||
"enabled": true,
|
||||
"displayName": "Athletic Map",
|
||||
"loginWithEmailAllowed": true,
|
||||
"roles": {
|
||||
"realm": [
|
||||
{ "name": "admin" },
|
||||
{ "name": "atm_athlete" },
|
||||
{ "name": "atm_trainer" },
|
||||
{ "name": "atm_team_admin" },
|
||||
{ "name": "atm_fed_admin" }
|
||||
]
|
||||
},
|
||||
"clients": [
|
||||
{
|
||||
"clientId": "spa",
|
||||
"name": "Athletic Map SPA",
|
||||
"publicClient": true,
|
||||
"protocol": "openid-connect",
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": false,
|
||||
"redirectUris": ["https://piloto.187.77.37.184.nip.io/*"],
|
||||
"webOrigins": ["https://piloto.187.77.37.184.nip.io"],
|
||||
"attributes": {
|
||||
"pkce.code.challenge.method": "S256",
|
||||
"post.logout.redirect.uris": "https://piloto.187.77.37.184.nip.io/*"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kc-realm-import
|
||||
namespace: piloto-prod
|
||||
|
||||
Reference in New Issue
Block a user