Skip to content

Commit

Permalink
fix(charts): Fix ingress yaml indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed Oct 20, 2023
1 parent 695ae4c commit 9bd210a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion charts/bpdm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apiVersion: v2
name: bpdm
type: application
description: A Helm chart for Kubernetes that deploys the gate and pool applications
version: 3.1.0-alpha.5
version: 3.1.0-alpha.6
appVersion: "4.1.0-alpha.3"
home: https://github.com/eclipse-tractusx/bpdm
sources:
Expand Down
120 changes: 60 additions & 60 deletions charts/bpdm/charts/bpdm-orchestrator/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
################################################################################
# Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
################################################################################
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
################################################################################

{{if .Values.ingress.enabled}}
{{ if .Values.ingress.enabled }}


{{- $fullName := include "bpdm.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion))}}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class")}}
{{- $fullName := include "bpdm.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end}}
{{- end}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
{{- else -}}
apiVersion: extensions/v1beta1
{{- end}}
{{- end }}
kind: Ingress
metadata:
name: {{$fullName}}
name: {{ $fullName }}
labels:
{{- include "bpdm.labels" . | nindent 4}}
{{- with .Values.ingress.annotations}}
{{- include "bpdm.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4}}
{{- end}}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)}}
ingressClassName: {{.Values.ingress.className}}
{{- end}}
{{- if .Values.ingress.tls}}
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls}}
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts}}
- {{. | quote}}
{{- end}}
secretName: {{.secretName}}
{{- end}}
{{- end}}
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts}}
- host: {{.host | quote}}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths}}
- path: {{.path}}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion)}}
pathType: {{.pathType}}
{{- end}}
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion}}
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{$fullName}}
name: {{ $fullName }}
port:
number: {{$svcPort}}
{{- else}}
serviceName: {{$fullName}}
servicePort: {{$svcPort}}
{{- end}}
{{- end}}
{{- end}}
{{- end}}
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 9bd210a

Please sign in to comment.