diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 9c498b6..2a33d7e 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -8,6 +8,9 @@ metadata: name: {{ include "common.fullname" ( dict "root" $ "service" $.Values.ingress "serviceName" $hostGroupName ) }} {{- include "common.metadata" ( dict "root" $ "service" $.Values.ingress "serviceName" $hostGroupName ) | nindent 2 }} spec: +{{- with $.Values.ingress.ingressClassName }} + ingressClassName: {{ . }} +{{- end }} # Add tls only if ingress.tls.enabled is set to true and the other fields are complete. {{- if and ( hasKey $hostGroupDefinition "tls" ) ( eq $hostGroupDefinition.tls.enabled true ) }} tls: @@ -17,8 +20,6 @@ spec: {{- end }} {{- if $hostGroupDefinition.tls.secretName }} secretName: {{ $hostGroupDefinition.tls.secretName }} - {{- else }} - secretName: {{ $fullName }}-{{ $hostGroupName }} {{- end }} {{- end }} rules: diff --git a/values.md b/values.md index 0e51004..b9ff208 100644 --- a/values.md +++ b/values.md @@ -25,6 +25,7 @@ - **`prefixTrunc`**: Refer to _[#/definitions/prefixTrunc](#definitions/prefixTrunc)_. - **`labels`**: Refer to _[#/definitions/labels](#definitions/labels)_. - **`annotations`**: Refer to _[#/definitions/annotations](#definitions/annotations)_. + - **`ingressClassName`** _(string)_: Ingress class name. Will be omitted if not specified. - **`hostGroups`** _(object)_: Can contain additional properties. - **Additional properties** _(object)_: Cannot contain additional properties. - **`hosts`** _(array)_ diff --git a/values.schema.json b/values.schema.json index 20533b9..f60d88a 100644 --- a/values.schema.json +++ b/values.schema.json @@ -339,6 +339,10 @@ "annotations": { "$ref": "#/definitions/annotations" }, + "ingressClassName": { + "type": "string", + "description": "Ingress class name. Will be omitted if not specified." + }, "hostGroups": { "type": "object", "additionalProperties": {