Skip to content

Commit

Permalink
feat: support providing override secret name for ingress tls
Browse files Browse the repository at this point in the history
  • Loading branch information
oferziss-armis authored and eshepelyuk committed Mar 3, 2021
1 parent f6bbbe0 commit 147f6bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
tls:
- hosts:
- {{ .Values.ingress.host | quote }}
secretName: {{ .Values.ingress.host | replace "." "-" | quote }}
secretName: {{ .Values.ingress.tls.secret | default (.Values.ingress.host | replace "." "-") | quote }}
{{- end }}
rules:
- host: {{ .Values.ingress.host | quote }}
Expand Down
8 changes: 7 additions & 1 deletion values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
"limits": { "type": "object", "title": "resource limits", "default": {} },
"requests": { "type": "object", "title": "resource requests", "default": {} }
}
},
"tls": {
"type": ["null", "object"], "title": "use TLS secret", "default": null,
"properties": {
"secret": { "type": "string", "title": "Secret name to attach to the ingress object" }
}
}
},

Expand Down Expand Up @@ -131,7 +137,7 @@
"properties": {
"host": { "type": "string", "title": "ingress host" },
"path": { "type": "string", "title": "ingress path" },
"tls": { "type": "boolean", "title": "use TLS secret", "default": false },
"tls": { "$ref": "#/definitions/tls" },
"labels": { "type": "object", "title": "optional ingress labels", "default": {} },
"annotations": { "type": "object", "title": "optional ingress annotations", "default": {} }
}
Expand Down
3 changes: 2 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ ingress: null
#
# # Enable TLS configuration for the hostname defined at ingress.host
# # secret name will be "${ingress.host.replace(".", "-")}"
# tls: false
# tls: null
# # secret: null
#
# # optional ingress annotations
# annotations: {}
Expand Down

0 comments on commit 147f6bc

Please sign in to comment.