File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ apiVersion: v2
22description : Helm chart to expose host IP services and generate optional Ingress entries per port.
33name : host-ip-service
44type : application
5- version : 0.0.1
5+ version : 0.0.6
66annotations :
77 " helm.sh/schema " : values.schema.json
Original file line number Diff line number Diff line change 1- {{- $globalAnnotations := .Values.ingress.annotations | default dict }}
1+ {{- $ingress := coalesce .Values.ingress dict }}
2+ {{- $globalAnnotations := coalesce $ingress.annotations dict }}
23{{- range .Values.endpoint.ports }}
3- {{- if and .ingress.enabled .ingress.host }}
4+ {{- if and .ingress .ingress.host }}
45---
56apiVersion : networking.k8s.io/v1
67kind : Ingress
78metadata :
89 name : {{ printf "%s-%s" $.Values.endpoint.name .name }}
910 namespace : {{ $.Values.namespace }}
1011 annotations :
11- {{- range $k, $v := merge $globalAnnotations (.ingress.annotations | default dict) }}
12+ {{- range $k, $v := merge $globalAnnotations (coalesce .ingress.annotations dict) }}
1213 {{ $k }}: {{ $v | quote }}
1314 {{- end }}
1415spec :
15- ingressClassName : {{ .Values. ingress.className | default "nginx" }}
16+ ingressClassName : {{ coalesce $ ingress.className "nginx" }}
1617 rules :
1718 - host : {{ .ingress.host }}
1819 http :
2425 name : {{ $.Values.endpoint.name }}
2526 port :
2627 number : {{ .port }}
27- {{- if $.Values. ingress.tls }}
28+ {{- if $ingress.tls }}
2829 tls :
29- {{- range $.Values. ingress.tls }}
30+ {{- range $ingress.tls }}
3031 - secretName : {{ .secretName }}
3132 hosts :
3233 {{- range .hosts }}
Original file line number Diff line number Diff line change 55 "properties" : {
66 "namespace" : {
77 "type" : " string" ,
8+ "default" : " default" ,
89 "description" : " Namespace where resources are deployed"
910 },
1011 "endpoint" : {
3839 "properties" : {
3940 "enabled" : {
4041 "type" : " boolean" ,
42+ "default" : false ,
4143 "description" : " Whether to create an ingress for this port"
4244 },
4345 "host" : {
5456 "additionalProperties" : {
5557 "type" : " string"
5658 },
59+ "default" : {},
5760 "description" : " Custom annotations for this ingress"
5861 }
5962 },
60- "required " : [ " enabled " ]
63+ "default " : {}
6164 }
6265 },
6366 "required" : [" name" , " port" ]
6871 },
6972 "ingress" : {
7073 "type" : " object" ,
74+ "default" : {},
7175 "description" : " Global ingress settings" ,
7276 "properties" : {
7377 "className" : {
7478 "type" : " string" ,
79+ "default" : " nginx" ,
7580 "description" : " Ingress class to use (e.g., nginx, traefik)"
7681 },
7782 "annotations" : {
7883 "type" : " object" ,
84+ "default" : {},
7985 "description" : " Global ingress annotations" ,
8086 "additionalProperties" : {
8187 "type" : " string"
8288 }
8389 },
8490 "tls" : {
8591 "type" : " array" ,
92+ "default" : [],
8693 "description" : " TLS configuration for ingress" ,
8794 "items" : {
8895 "type" : " object" ,
105112 }
106113 }
107114 },
108- "required" : [" namespace " , " endpoint" ]
115+ "required" : [" endpoint" ]
109116}
You can’t perform that action at this time.
0 commit comments