
# edge-oidc domain
export DOMAIN=$(kubectl get svc edge-oidc -o jsonpath="{.status.loadBalancer.ingress[*].hostname}")
# keycloak http
export PROVIDER_HOST=$(kubectl get svc keycloak-backend -o jsonpath="{.status.loadBalancer.ingress[*].hostname}")
export PROVIDER="http://$PROVIDER_HOST:80/auth/realms/greymatter"
# full edge-oidc URL
export SERVICE_URL?="https://$(kubectl get svc edge-oidc -o jsonpath="{.status.loadBalancer.ingress[*].hostname}"):10808"
envsubst < $original >> $templated

# apply configs
greymatter delete domain edge-oidc
greymatter delete listener edge-oidc