mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
[common] Fix classes logic (#112)
This commit is contained in:
parent
f36de85c15
commit
6b9650f348
@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: common
|
name: common
|
||||||
description: Function library for k8s-at-home charts
|
description: Function library for k8s-at-home charts
|
||||||
type: library
|
type: library
|
||||||
version: 1.0.1
|
version: 1.0.2
|
||||||
keywords:
|
keywords:
|
||||||
- k8s-at-home
|
- k8s-at-home
|
||||||
- common
|
- common
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
{{- $apiv1beta1 := .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
|
{{- $apiv1beta1 := .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
|
||||||
{{- $ingressName := include "common.names.fullname" . -}}
|
{{- $ingressName := include "common.names.fullname" . -}}
|
||||||
{{- $values := .Values.ingress -}}
|
{{- $values := .Values.ingress -}}
|
||||||
{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "ingress") -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- $values = .ObjectValues.ingress -}}
|
{{- with .ObjectValues.ingress -}}
|
||||||
|
{{- $values = . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- if hasKey $values "nameSuffix" -}}
|
{{- if hasKey $values "nameSuffix" -}}
|
||||||
{{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}}
|
{{- $ingressName = printf "%v-%v" $ingressName $values.nameSuffix -}}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{{- define "common.classes.pvc" -}}
|
{{- define "common.classes.pvc" -}}
|
||||||
{{- $values := .Values.persistence -}}
|
{{- $values := .Values.persistence -}}
|
||||||
{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "persistence") -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- $values = .ObjectValues.persistence -}}
|
{{- with .ObjectValues.persistence -}}
|
||||||
|
{{- $values = . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- $pvcName := include "common.names.fullname" . -}}
|
{{- $pvcName := include "common.names.fullname" . -}}
|
||||||
{{- if hasKey $values "nameSuffix" -}}
|
{{- if hasKey $values "nameSuffix" -}}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{{- define "common.classes.service" -}}
|
{{- define "common.classes.service" -}}
|
||||||
{{- $values := .Values.service -}}
|
{{- $values := .Values.service -}}
|
||||||
{{- if and (hasKey . "ObjectValues") (hasKey .ObjectValues "service") -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- $values = .ObjectValues.service -}}
|
{{- with .ObjectValues.service -}}
|
||||||
|
{{- $values = . -}}
|
||||||
|
{{- end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- $svcType := $values.type -}}
|
{{- $svcType := $values.type -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
Loading…
Reference in New Issue
Block a user