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