mirror of
https://ghproxy.com/https://github.com/truecharts/charts.git
synced 2026-07-27 08:10:23 +08:00
Small common touchup
This commit is contained in:
@@ -19,4 +19,4 @@ name: common
|
||||
sources:
|
||||
- https://github.com/truecharts/apps/tree/master/library/common
|
||||
type: library
|
||||
version: 4.1.0
|
||||
version: 4.1.1
|
||||
|
||||
@@ -31,7 +31,7 @@ Main entrypoint for the common library chart. It will render all underlying temp
|
||||
{{- if .Values.secret -}}
|
||||
{{ include "common.secret" . | nindent 0 }}
|
||||
{{- end -}}
|
||||
{{ include "common.classes.portal" . | nindent 0 }}
|
||||
{{ include "common.class.portal" . | nindent 0 }}
|
||||
|
||||
{{ include "common.class.mountPermissions" . | nindent 0 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{{- define "common.classes.portal" -}}
|
||||
{{- define "common.class.portal" -}}
|
||||
|
||||
{{- if .Values.portal }}
|
||||
{{- if .Values.portal.enabled }}
|
||||
{{- $svc := index .Values.services (keys .Values.services | first) -}}
|
||||
{{- $primaryService := get .Values.service (include "common.service.primary" .) }}
|
||||
{{- $primaryPort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
||||
{{- $ingr := index .Values.ingress (keys .Values.ingress | first) -}}
|
||||
{{- $host := "$node_ip" }}
|
||||
{{- $port := 443 }}
|
||||
@@ -30,10 +31,10 @@
|
||||
{{- if and ( .Values.portal.ingressPort ) ( ne $host "$node_ip" ) }}
|
||||
{{- $port = .Values.portal.ingressPort }}
|
||||
{{- else if eq $host "$node_ip" }}
|
||||
{{- if eq $svc.type "NodePort" }}
|
||||
{{- $port = $svc.port.nodePort }}
|
||||
{{- if or ( eq $svc.port.protocol "HTTP" ) ( eq $svc.port.protocol "HTTPS" ) }}
|
||||
{{- $portProtocol = $svc.port.protocol }}
|
||||
{{- if eq $primaryService.type "NodePort" }}
|
||||
{{- $port = $primaryPort.nodePort }}
|
||||
{{- if or ( eq $primaryPort.protocol "HTTP" ) ( eq $primaryPort.protocol "HTTPS" ) }}
|
||||
{{- $portProtocol = $primaryPort.protocol }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -54,7 +55,7 @@
|
||||
{{- $path = .Values.portal.path }}
|
||||
{{- end }}
|
||||
|
||||
{{- print "---" | nindent 0 -}}
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
|
||||
@@ -222,7 +222,7 @@ service:
|
||||
# Additional ports can be added by adding a dictionary key similar to the 'http' service.
|
||||
# @default -- See below
|
||||
ports:
|
||||
http:
|
||||
main:
|
||||
# -- Enables or disables the port
|
||||
enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user