-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add action to handle SSL values as secrets for TLS configuration (
#394) * feat: add action to handle SSL values as secrets for TLS configuration This commits introduces actions that allow users to configure the TLS ingress gateway for a single host directly passing the SSL cert and key to the charm. - save-tls-secret: allows users to pass the ssl-key and ssl-crt values, which the charm saves in a juju secret (owned by the charm) and uses them to reconcile the ingress Gateway with such information. - remove-tls-secret: a handy action that allows users to remove the TLS secret, which in turn removes the TLS configuration from the ingress Gateway. This commit also adds unit and integration tests to increase the coverage due to the recent changes. WARNING: please note this feature is only supported in 1.17 and 1.18, and it will be removed after releasing 1.18 in favour of the TLS provider method. Fixes #380
- Loading branch information
Showing
7 changed files
with
464 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
set-tls: | ||
description: | | ||
Manually pass SSL cert and key values to configure the Ingress Gateway with TLS. | ||
Configuring TLS with this action is mutually exclusive to using TLS certificate providers. | ||
params: | ||
ssl-key: | ||
type: string | ||
pattern: "^.*[a-zA-Z0-9]+.*$" | ||
minLength: 1 | ||
description: | | ||
The SSL key output as a string. Can be set with | ||
$ juju run set-tls istio-pilot/<unit-number> ssl-key="$(cat KEY_FILE)" | ||
ssl-crt: | ||
type: string | ||
minLength: 1 | ||
pattern: "^.*[a-zA-Z0-9]+.*$" | ||
description: | | ||
The SSL cert output as a string. Can be set with | ||
$ juju run set-tls istio-pilot/<unit-number> ssl-crt="$(cat CERT_FILE)" | ||
required: [ssl-key, ssl-crt] | ||
unset-tls: | ||
description: Remove SSL cert and key values from the Ingress Gateway TLS configuration. | ||
additionalProperties: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.