feat: add csr-domain-name
config option (#381)
#386
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: enable csr-domain-name config option so istio-pilot can use it on CSRs
The istio-pilot charm already has a mechanism in place to discover the ingress gateway address from the
Service
, but it is limited to only returning IP addresses, which not all TLS certificate providers accept as a valid cert subject. Having the domain-name config option will allow users to specify the domain name they'd like to use when integrating with TLS certificate operators. This feature expands the support for integrating with TLS certificate providers that cannot issue signed certificates on a CSR that only contains an IP address (like we used to do). This commit also adds some test coverage to test the recently added code.Fixes #379
NOTE: CI may fail because of #385 and #384
Testing instructions
Assuming you've got a microk8s deployment with
Ensure the upgrade is done correctly:
istio-operators
istio-pilot
to the version in this PRjuju refresh istio-pilot --channel latest/edge/pr-386 --revision <check-revision-in-CI>
Ensure the certificate has the correct domain name
juju deploy self-signed-certificates
juju relate self-signed-certificates istio-pilot
juju config istio-pilot csr-domain-name="istio-test.com"
csr-domain-name
that was set in (3)