diff --git a/k8s/deployment/templates/blue-green-ingress.yaml.tpl b/k8s/deployment/templates/blue-green-ingress.yaml.tpl index 323fa4dc..314de1fe 100644 --- a/k8s/deployment/templates/blue-green-ingress.yaml.tpl +++ b/k8s/deployment/templates/blue-green-ingress.yaml.tpl @@ -68,3 +68,15 @@ spec: name: bg-deployment port: name: use-annotation +{{- range .scope.domains }} + - host: {{ .name }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: bg-deployment + port: + name: use-annotation +{{- end }} diff --git a/k8s/deployment/templates/initial-ingress.yaml.tpl b/k8s/deployment/templates/initial-ingress.yaml.tpl index 287a17fb..dbcdaa12 100644 --- a/k8s/deployment/templates/initial-ingress.yaml.tpl +++ b/k8s/deployment/templates/initial-ingress.yaml.tpl @@ -62,4 +62,16 @@ spec: service: name: d-{{ .scope.id }}-{{ .deployment.id }} port: - number: 8080 \ No newline at end of file + number: 8080 +{{- range .scope.domains }} + - host: {{ .name }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: d-{{ $.scope.id }}-{{ $.deployment.id }} + port: + number: 8080 +{{- end }} \ No newline at end of file diff --git a/k8s/deployment/templates/istio/blue-green-httproute.yaml.tpl b/k8s/deployment/templates/istio/blue-green-httproute.yaml.tpl index cad75173..5f45ad58 100644 --- a/k8s/deployment/templates/istio/blue-green-httproute.yaml.tpl +++ b/k8s/deployment/templates/istio/blue-green-httproute.yaml.tpl @@ -45,6 +45,9 @@ metadata: spec: hostnames: - {{ .scope.domain }} +{{- range .scope.domains }} + - {{ .name }} +{{- end }} parentRefs: - group: gateway.networking.k8s.io kind: Gateway diff --git a/k8s/deployment/templates/istio/initial-httproute.yaml.tpl b/k8s/deployment/templates/istio/initial-httproute.yaml.tpl index d01162e4..f300a5d3 100644 --- a/k8s/deployment/templates/istio/initial-httproute.yaml.tpl +++ b/k8s/deployment/templates/istio/initial-httproute.yaml.tpl @@ -45,6 +45,9 @@ metadata: spec: hostnames: - {{ .scope.domain }} +{{- range .scope.domains }} + - {{ .name }} +{{- end }} parentRefs: - group: gateway.networking.k8s.io kind: Gateway diff --git a/k8s/specs/service-spec.json.tpl b/k8s/specs/service-spec.json.tpl index 7c94c55a..eb2e55f3 100644 --- a/k8s/specs/service-spec.json.tpl +++ b/k8s/specs/service-spec.json.tpl @@ -546,6 +546,18 @@ } }, "description":"Configure automatic deployment from Git branches" + }, + "custom_domains": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "default": true + } + } } } }