Skip to content

Commit

Permalink
merge(#3657): updated Helm chart 1.4.5->2.0.0 and Ingress template
Browse files Browse the repository at this point in the history
  • Loading branch information
akijakya authored Jan 24, 2023
2 parents bccd04a + 39e0bcf commit b458639
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 25 deletions.
4 changes: 2 additions & 2 deletions charts/pipeline/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
name: pipeline
home: https://banzaicloud.com
version: 1.4.5
version: 2.0.0
description: A Helm chart for Banzai Cloud Pipeline, a solution-oriented application platform which allows enterprises to develop, deploy and securely scale container-based applications in multi- and hybrid-cloud environments.
keywords:
- pipeline
- kubernetes
- banzaicloud
- cloud

appVersion: 0.81.0
appVersion: 0.82.0

maintainers:
- name: Banzai Cloud
Expand Down
2 changes: 1 addition & 1 deletion charts/pipeline/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{- $serviceName := include "pipeline.fullname" . -}}
{{- $servicePort := .Values.service.externalPort -}}
{{- range .Values.ingress.hosts }}
{{- $url := splitList "/" . }}
{{- $url := splitList "/" .host }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ first $url }}{{ rest $url | join "/" }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
Expand Down
59 changes: 48 additions & 11 deletions charts/pipeline/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,63 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "pipeline.fullname" . -}}
{{- $servicePort := .Values.service.externalPort -}}
{{- $fullName := include "pipeline.fullname" . -}}
{{- $svcPort := .Values.service.externalPort -}}
{{- 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 -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "pipeline.fullname" . }}
name: {{ $fullName }}
labels:
{{ include "pipeline.labels" . | nindent 4 }}
{{- include "pipeline.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- 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 }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- $url := splitList "/" . }}
- host: {{ first $url }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- path: /{{ rest $url | join "/" }}
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end}}
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}


36 changes: 25 additions & 11 deletions charts/pipeline/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,31 @@ serviceMonitor:
labels: {}

ingress:
enabled: false
annotations: {}
# traefik.frontend.rule.type: PathPrefix
hosts: []
# - "/"
# - "domain.com/xyz"
# - "domain.com"
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# -- Enable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).
enabled: false

# -- Ingress [class name](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class).
className: ""

# -- Annotations to be added to the ingress.
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

# -- Ingress host configuration.
# @default -- See [values.yaml](values.yaml).
hosts:
- host: chart-example.local
paths:
- path: /
pathType: Prefix

# -- Ingress TLS configuration.
# @default -- See [values.yaml](values.yaml).
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

## Additional environment variables to set
extraEnvs: []
Expand Down

0 comments on commit b458639

Please sign in to comment.