mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
Merge pull request #68 from k8s-at-home/bug/media-common
[media-common] fix nested kube check and update for kube version 1.19 check
This commit is contained in:
commit
d90ddd9e2b
@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: media-common
|
name: media-common
|
||||||
description: Common dependancy chart for media ecosystem containers
|
description: Common dependancy chart for media ecosystem containers
|
||||||
type: application
|
type: application
|
||||||
version: 1.2.0
|
version: 1.3.0
|
||||||
keywords:
|
keywords:
|
||||||
- media-common
|
- media-common
|
||||||
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $kubeVersion := .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- $fullName := include "media-common.fullname" . -}}
|
{{- $fullName := include "media-common.fullname" . -}}
|
||||||
{{- $svcPort := .Values.service.port -}}
|
{{- $svcPort := .Values.service.port -}}
|
||||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- if semverCompare ">= 1.19-0" $kubeVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">= 1.14-0 < 1.19-0" $kubeVersion -}}
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
@ -32,17 +35,29 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
{{- range .paths }}
|
{{- range .paths }}
|
||||||
- path: {{ . }}
|
- path: {{ .path }}
|
||||||
|
{{- if semverCompare ">= 1.14-0" $kubeVersion}}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if semverCompare ">= 1.19-0" $kubeVersion}}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- else }}
|
||||||
serviceName: {{ $fullName }}
|
serviceName: {{ $fullName }}
|
||||||
servicePort: {{ $svcPort }}
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range $index, $ingress := .Values.ingress.extraIngresses }}
|
{{- range $index, $ingress := .Values.ingress.extraIngresses }}
|
||||||
---
|
---
|
||||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- if semverCompare ">= 1.19-0" $kubeVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">= 1.14-0 < 1.19-0" $kubeVersion -}}
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
{{- end }}
|
{{- end }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
@ -71,11 +86,21 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
{{- range .paths }}
|
{{- range .paths }}
|
||||||
- path: {{ . }}
|
- path: {{ .path }}
|
||||||
|
{{- if semverCompare ">= 1.14-0" $kubeVersion}}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if semverCompare ">= 1.19-0" $kubeVersion}}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- else }}
|
||||||
serviceName: {{ $fullName }}
|
serviceName: {{ $fullName }}
|
||||||
servicePort: {{ $svcPort }}
|
servicePort: {{ $svcPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -50,7 +50,9 @@ ingress:
|
|||||||
hosts:
|
hosts:
|
||||||
- host: chart-example.local
|
- host: chart-example.local
|
||||||
paths:
|
paths:
|
||||||
- /
|
- path: /
|
||||||
|
# Ignored if not kubeVersion >= 1.14-0
|
||||||
|
pathType: Prefix
|
||||||
tls: []
|
tls: []
|
||||||
# - secretName: chart-example-tls
|
# - secretName: chart-example-tls
|
||||||
# hosts:
|
# hosts:
|
||||||
@ -65,7 +67,9 @@ ingress:
|
|||||||
# hosts:
|
# hosts:
|
||||||
# - host: chart-example.local
|
# - host: chart-example.local
|
||||||
# paths:
|
# paths:
|
||||||
# - /api
|
# - path: /api
|
||||||
|
# # Ignored if not kubeVersion >= 1.14-0
|
||||||
|
# pathType: Prefix
|
||||||
# tls: []
|
# tls: []
|
||||||
# # - secretName: chart-example-tls
|
# # - secretName: chart-example-tls
|
||||||
# # hosts:
|
# # hosts:
|
||||||
|
Loading…
Reference in New Issue
Block a user