From e1dd19ab84019514e4b2c2e93c3f64db17f353e4 Mon Sep 17 00:00:00 2001 From: Youssef El Houti Date: Sat, 15 Oct 2022 22:37:26 +0200 Subject: [PATCH] feat: allows to override ingress host --- helm/charts/templates/ingress.yaml | 13 +++++++------ helm/charts/values.yaml | 2 ++ packs/C++/charts/templates/ingress.yaml | 13 +++++++------ packs/C++/charts/values.yaml | 2 ++ packs/D/charts/templates/ingress.yaml | 13 +++++++------ packs/D/charts/values.yaml | 2 ++ packs/appserver/charts/templates/ingress.yaml | 13 +++++++------ packs/appserver/charts/values.yaml | 2 ++ packs/csharp/charts/templates/ingress.yaml | 13 +++++++------ packs/csharp/charts/values.yaml | 2 ++ packs/cwp/charts/templates/ingress.yaml | 13 +++++++------ packs/cwp/charts/values.yaml | 2 ++ packs/go-mongodb/charts/templates/ingress.yaml | 13 +++++++------ packs/go-mongodb/charts/values.yaml | 2 ++ packs/go/charts/templates/ingress.yaml | 13 +++++++------ packs/go/charts/values.yaml | 2 ++ packs/gradle/charts/templates/ingress.yaml | 13 +++++++------ packs/gradle/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/javascript-ui-nginx/charts/values.yaml | 2 ++ .../javascript-yarn/charts/templates/ingress.yaml | 14 ++++++++------ packs/javascript-yarn/charts/values.yaml | 2 ++ packs/javascript/charts/templates/ingress.yaml | 13 +++++++------ packs/javascript/charts/values.yaml | 2 ++ packs/maven-java11/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-java11/charts/values.yaml | 2 ++ packs/maven-java14/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-java14/charts/values.yaml | 2 ++ packs/maven-java16/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-java16/charts/values.yaml | 2 ++ packs/maven-java17/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-java17/charts/values.yaml | 2 ++ packs/maven-java21/charts/templates/ingress.yaml | 14 ++++++++------ packs/maven-java21/charts/values.yaml | 2 ++ .../maven-node-ruby/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-node-ruby/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/maven-quarkus-native/charts/values.yaml | 2 ++ packs/maven-quarkus/charts/templates/ingress.yaml | 13 +++++++------ packs/maven-quarkus/charts/values.yaml | 2 ++ packs/maven/charts/templates/ingress.yaml | 13 +++++++------ packs/maven/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/ml-python-gpu-service/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/ml-python-gpu-training/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/ml-python-service/charts/values.yaml | 2 ++ .../charts/templates/ingress.yaml | 13 +++++++------ packs/ml-python-training/charts/values.yaml | 2 ++ packs/php/charts/templates/ingress.yaml | 13 +++++++------ packs/php/charts/values.yaml | 2 ++ packs/python/charts/templates/ingress.yaml | 13 +++++++------ packs/python/charts/values.yaml | 2 ++ packs/ruby/charts/templates/ingress.yaml | 13 +++++++------ packs/ruby/charts/values.yaml | 2 ++ packs/rust/charts/templates/ingress.yaml | 13 +++++++------ packs/rust/charts/values.yaml | 2 ++ packs/scala/charts/templates/ingress.yaml | 13 +++++++------ packs/scala/charts/values.yaml | 2 ++ packs/typescript/charts/templates/ingress.yaml | 13 +++++++------ packs/typescript/charts/values.yaml | 2 ++ 62 files changed, 281 insertions(+), 186 deletions(-) diff --git a/helm/charts/templates/ingress.yaml b/helm/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/helm/charts/templates/ingress.yaml +++ b/helm/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/helm/charts/values.yaml b/helm/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/helm/charts/values.yaml +++ b/helm/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/C++/charts/templates/ingress.yaml b/packs/C++/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/C++/charts/templates/ingress.yaml +++ b/packs/C++/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/C++/charts/values.yaml b/packs/C++/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/C++/charts/values.yaml +++ b/packs/C++/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/D/charts/templates/ingress.yaml b/packs/D/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/D/charts/templates/ingress.yaml +++ b/packs/D/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/D/charts/values.yaml b/packs/D/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/D/charts/values.yaml +++ b/packs/D/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/appserver/charts/templates/ingress.yaml b/packs/appserver/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/appserver/charts/templates/ingress.yaml +++ b/packs/appserver/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/appserver/charts/values.yaml b/packs/appserver/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/appserver/charts/values.yaml +++ b/packs/appserver/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/csharp/charts/templates/ingress.yaml b/packs/csharp/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/csharp/charts/templates/ingress.yaml +++ b/packs/csharp/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/csharp/charts/values.yaml b/packs/csharp/charts/values.yaml index 9a3ea17f97..b9a3e2acd6 100644 --- a/packs/csharp/charts/values.yaml +++ b/packs/csharp/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/cwp/charts/templates/ingress.yaml b/packs/cwp/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/cwp/charts/templates/ingress.yaml +++ b/packs/cwp/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/cwp/charts/values.yaml b/packs/cwp/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/cwp/charts/values.yaml +++ b/packs/cwp/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/go-mongodb/charts/templates/ingress.yaml b/packs/go-mongodb/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/go-mongodb/charts/templates/ingress.yaml +++ b/packs/go-mongodb/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/go-mongodb/charts/values.yaml b/packs/go-mongodb/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/go-mongodb/charts/values.yaml +++ b/packs/go-mongodb/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/go/charts/templates/ingress.yaml b/packs/go/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/go/charts/templates/ingress.yaml +++ b/packs/go/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/go/charts/values.yaml b/packs/go/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/go/charts/values.yaml +++ b/packs/go/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/gradle/charts/templates/ingress.yaml b/packs/gradle/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/gradle/charts/templates/ingress.yaml +++ b/packs/gradle/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/gradle/charts/values.yaml b/packs/gradle/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/gradle/charts/values.yaml +++ b/packs/gradle/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/javascript-ui-nginx/charts/templates/ingress.yaml b/packs/javascript-ui-nginx/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/javascript-ui-nginx/charts/templates/ingress.yaml +++ b/packs/javascript-ui-nginx/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/javascript-ui-nginx/charts/values.yaml b/packs/javascript-ui-nginx/charts/values.yaml index 9a3ea17f97..b9a3e2acd6 100644 --- a/packs/javascript-ui-nginx/charts/values.yaml +++ b/packs/javascript-ui-nginx/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/javascript-yarn/charts/templates/ingress.yaml b/packs/javascript-yarn/charts/templates/ingress.yaml index 7c641c1075..8f5c32ed4e 100755 --- a/packs/javascript-yarn/charts/templates/ingress.yaml +++ b/packs/javascript-yarn/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -16,6 +17,7 @@ metadata: {{- end }} name: {{ .Values.service.name }} {{- if .Values.ingress.labels }} + labels: {{ toYaml .Values.ingress.labels | indent 4 }} {{- end }} spec: @@ -30,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/javascript-yarn/charts/values.yaml b/packs/javascript-yarn/charts/values.yaml index 1e47a8907b..bf49557bba 100644 --- a/packs/javascript-yarn/charts/values.yaml +++ b/packs/javascript-yarn/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/javascript/charts/templates/ingress.yaml b/packs/javascript/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/javascript/charts/templates/ingress.yaml +++ b/packs/javascript/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/javascript/charts/values.yaml b/packs/javascript/charts/values.yaml index 1e47a8907b..bf49557bba 100644 --- a/packs/javascript/charts/values.yaml +++ b/packs/javascript/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-java11/charts/templates/ingress.yaml b/packs/maven-java11/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven-java11/charts/templates/ingress.yaml +++ b/packs/maven-java11/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-java11/charts/values.yaml b/packs/maven-java11/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-java11/charts/values.yaml +++ b/packs/maven-java11/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-java14/charts/templates/ingress.yaml b/packs/maven-java14/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven-java14/charts/templates/ingress.yaml +++ b/packs/maven-java14/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-java14/charts/values.yaml b/packs/maven-java14/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-java14/charts/values.yaml +++ b/packs/maven-java14/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-java16/charts/templates/ingress.yaml b/packs/maven-java16/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100644 --- a/packs/maven-java16/charts/templates/ingress.yaml +++ b/packs/maven-java16/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-java16/charts/values.yaml b/packs/maven-java16/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-java16/charts/values.yaml +++ b/packs/maven-java16/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-java17/charts/templates/ingress.yaml b/packs/maven-java17/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100644 --- a/packs/maven-java17/charts/templates/ingress.yaml +++ b/packs/maven-java17/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-java17/charts/values.yaml b/packs/maven-java17/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-java17/charts/values.yaml +++ b/packs/maven-java17/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-java21/charts/templates/ingress.yaml b/packs/maven-java21/charts/templates/ingress.yaml index 7c641c1075..8f5c32ed4e 100644 --- a/packs/maven-java21/charts/templates/ingress.yaml +++ b/packs/maven-java21/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -16,6 +17,7 @@ metadata: {{- end }} name: {{ .Values.service.name }} {{- if .Values.ingress.labels }} + labels: {{ toYaml .Values.ingress.labels | indent 4 }} {{- end }} spec: @@ -30,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-java21/charts/values.yaml b/packs/maven-java21/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-java21/charts/values.yaml +++ b/packs/maven-java21/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-node-ruby/charts/templates/ingress.yaml b/packs/maven-node-ruby/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven-node-ruby/charts/templates/ingress.yaml +++ b/packs/maven-node-ruby/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-node-ruby/charts/values.yaml b/packs/maven-node-ruby/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/maven-node-ruby/charts/values.yaml +++ b/packs/maven-node-ruby/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-quarkus-native/charts/templates/ingress.yaml b/packs/maven-quarkus-native/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven-quarkus-native/charts/templates/ingress.yaml +++ b/packs/maven-quarkus-native/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-quarkus-native/charts/values.yaml b/packs/maven-quarkus-native/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-quarkus-native/charts/values.yaml +++ b/packs/maven-quarkus-native/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven-quarkus/charts/templates/ingress.yaml b/packs/maven-quarkus/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven-quarkus/charts/templates/ingress.yaml +++ b/packs/maven-quarkus/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven-quarkus/charts/values.yaml b/packs/maven-quarkus/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven-quarkus/charts/values.yaml +++ b/packs/maven-quarkus/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/maven/charts/templates/ingress.yaml b/packs/maven/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/maven/charts/templates/ingress.yaml +++ b/packs/maven/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/maven/charts/values.yaml b/packs/maven/charts/values.yaml index a7ed6f5e23..5341d65be3 100644 --- a/packs/maven/charts/values.yaml +++ b/packs/maven/charts/values.yaml @@ -102,6 +102,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/ml-python-gpu-service/charts/templates/ingress.yaml b/packs/ml-python-gpu-service/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/ml-python-gpu-service/charts/templates/ingress.yaml +++ b/packs/ml-python-gpu-service/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/ml-python-gpu-service/charts/values.yaml b/packs/ml-python-gpu-service/charts/values.yaml index 992c41c232..ea911149aa 100644 --- a/packs/ml-python-gpu-service/charts/values.yaml +++ b/packs/ml-python-gpu-service/charts/values.yaml @@ -101,6 +101,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/ml-python-gpu-training/charts/templates/ingress.yaml b/packs/ml-python-gpu-training/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/ml-python-gpu-training/charts/templates/ingress.yaml +++ b/packs/ml-python-gpu-training/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/ml-python-gpu-training/charts/values.yaml b/packs/ml-python-gpu-training/charts/values.yaml index 285bbf20e4..da30872b7e 100644 --- a/packs/ml-python-gpu-training/charts/values.yaml +++ b/packs/ml-python-gpu-training/charts/values.yaml @@ -101,6 +101,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" serviceAccount: enabled: true diff --git a/packs/ml-python-service/charts/templates/ingress.yaml b/packs/ml-python-service/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/ml-python-service/charts/templates/ingress.yaml +++ b/packs/ml-python-service/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/ml-python-service/charts/values.yaml b/packs/ml-python-service/charts/values.yaml index 8b8eab65b9..0bafa54140 100644 --- a/packs/ml-python-service/charts/values.yaml +++ b/packs/ml-python-service/charts/values.yaml @@ -101,6 +101,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" serviceAccount: enabled: true diff --git a/packs/ml-python-training/charts/templates/ingress.yaml b/packs/ml-python-training/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/ml-python-training/charts/templates/ingress.yaml +++ b/packs/ml-python-training/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/ml-python-training/charts/values.yaml b/packs/ml-python-training/charts/values.yaml index 8b8eab65b9..0bafa54140 100644 --- a/packs/ml-python-training/charts/values.yaml +++ b/packs/ml-python-training/charts/values.yaml @@ -101,6 +101,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" serviceAccount: enabled: true diff --git a/packs/php/charts/templates/ingress.yaml b/packs/php/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/php/charts/templates/ingress.yaml +++ b/packs/php/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/php/charts/values.yaml b/packs/php/charts/values.yaml index 9a3ea17f97..b9a3e2acd6 100644 --- a/packs/php/charts/values.yaml +++ b/packs/php/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/python/charts/templates/ingress.yaml b/packs/python/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/python/charts/templates/ingress.yaml +++ b/packs/python/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/python/charts/values.yaml b/packs/python/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/python/charts/values.yaml +++ b/packs/python/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/ruby/charts/templates/ingress.yaml b/packs/ruby/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/ruby/charts/templates/ingress.yaml +++ b/packs/ruby/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/ruby/charts/values.yaml b/packs/ruby/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/ruby/charts/values.yaml +++ b/packs/ruby/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/rust/charts/templates/ingress.yaml b/packs/rust/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/rust/charts/templates/ingress.yaml +++ b/packs/rust/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/rust/charts/values.yaml b/packs/rust/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/rust/charts/values.yaml +++ b/packs/rust/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/scala/charts/templates/ingress.yaml b/packs/scala/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/scala/charts/templates/ingress.yaml +++ b/packs/scala/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/scala/charts/values.yaml b/packs/scala/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/scala/charts/values.yaml +++ b/packs/scala/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific diff --git a/packs/typescript/charts/templates/ingress.yaml b/packs/typescript/charts/templates/ingress.yaml index 418e659eca..8f5c32ed4e 100755 --- a/packs/typescript/charts/templates/ingress.yaml +++ b/packs/typescript/charts/templates/ingress.yaml @@ -1,4 +1,5 @@ -{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- if and (or .Values.ingress.host .Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }} +{{- $host := (.Values.ingress.host | default (printf "%s%s%s" .Values.service.name .Values.jxRequirements.ingress.namespaceSubDomain .Values.jxRequirements.ingress.domain)) | quote }} {{- $annotations := dict }} {{- $_ := merge $annotations .Values.ingress.annotations .Values.jxRequirements.ingress.annotations }} {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }} @@ -31,19 +32,19 @@ spec: number: {{ .Values.service.externalPort }} {{- if eq "NodePort" .Values.jxRequirements.ingress.serviceType }} path: "/{{ .Release.Namespace }}/hook" -{{- else if .Values.jxRequirements.ingress.domain }} - host: {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} +{{- else if or .Values.ingress.host .Values.jxRequirements.ingress.domain }} + host: {{ $host }} {{- end }} {{- if .Values.jxRequirements.ingress.tls.enabled }} tls: - hosts: - - {{ .Values.service.name }}{{ .Values.jxRequirements.ingress.namespaceSubDomain }}{{ .Values.jxRequirements.ingress.domain }} + - {{ $host }} {{- if and (hasKey .Values.jxRequirements.ingress.tls "secretName") (.Values.jxRequirements.ingress.tls.secretName) }} secretName: "{{ .Values.jxRequirements.ingress.tls.secretName }}" {{- else if .Values.jxRequirements.ingress.tls.production }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-p" {{- else }} - secretName: "tls-{{ .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" + secretName: "tls-{{ .Values.ingress.host | default .Values.jxRequirements.ingress.domain | replace "." "-" }}-s" {{- end }} {{- end }} {{- end }} diff --git a/packs/typescript/charts/values.yaml b/packs/typescript/charts/values.yaml index 0aa99c3a00..5e811ce42a 100644 --- a/packs/typescript/charts/values.yaml +++ b/packs/typescript/charts/values.yaml @@ -99,6 +99,8 @@ ingress: classAnnotation: "" # Add labels to the ingress labels: {} + # defaults to .service.name + jxRequirements.ingress.namespaceSubDomain + jxRequirements.ingress.domain + host: "" # ingress path type pathType: ImplementationSpecific