-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add action to handle SSL values as secrets for TLS configuration #394
Conversation
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
7a598d8
to
6b0a0a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @DnPlas
left some comments, and I suggest @ca-scribner gives it a look as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a first pass with initial thoughts. Will dig deeper next.
The main comment so far is that I think we should avoid running a partial reconciliation of the charm for handling secret events. We were burned on that in this charm in the past, and moved to doing a full reconcile on all events. afaict that same logic works well here too
#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
feat: add action to handle SSL values as secrets for TLS configuration (#394)
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.
which the charm saves in a juju secret (owned by the charm) and uses
them to reconcile the ingress Gateway with such information.
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
Manual testing instructions
This feature requires juju 3.x
latest/edge
and relate themistio-pilot
charm and refresh. Wait for active and idle.gateway
resource is not configured forTLS
:save-tls-secret
action to pass values (strings)$ juju run istio-pilot/0 save-tls-secret ssl-key=foo ssl-crt=bar Running operation 111 with 1 task - task 112 on unit-istio-pilot-0 Waiting for task 112...
Secret
the gateway uses for TLS:remove-tls-secret
action and watch the Gateway be reconfigured w/o TLSsave-tls-secret
action and watch the unit go to BlockedStatus