Repository navigation
Conversation
…ustom LB name Add three load balancer service annotations: - oci-load-balancer-backendset-ca-bundle: attach an OCI Certificates Service CA bundle to the backend set SSL configuration. - oci-load-balancer-verify-peer-certificate: enable backend peer certificate verification against that CA bundle (was effectively hardcoded off). When a CA bundle is set, verify-depth now defaults to 1 to match the value OCI assigns, avoiding spurious reconcile updates. - oci-load-balancer-name: set a custom display-name prefix; the Service UID is appended and the result truncated to the 1024-char limit. A CA bundle can now be supplied without oci-load-balancer-ssl-ports; the backend set SSL configuration is generated from the service ports. Signed-off-by: karan-winfo <karanbparmar45@gmail.com>
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Backend set SSL could reference a listener/secret cert, but there was no way to trust an OCI Certificates Service CA bundle on the backend set, and
VerifyPeerCertificatewas effectively fixed tofalse, so the LB never verified backend certificates. There was also no way to give the LB a readable display name.What changed
Three Service annotations:
oci.oraclecloud.com/oci-load-balancer-backendset-ca-bundle— attach a CA bundle OCID to the backend set SSL config.oci.oraclecloud.com/oci-load-balancer-verify-peer-certificate— enable backend peer verification (true/yes/1). When a CA bundle is set,verify-depthdefaults to1to match the value OCI assigns, so reconciliation doesn't churn.oci.oraclecloud.com/oci-load-balancer-name— custom display-name prefix; the Service UID is appended (<name>-<uid>) and truncated to 1024 chars.A CA bundle can now be supplied without
oci-load-balancer-ssl-ports; the backend set SSL config is derived from the service ports.Why
Verifying backends against a private CA is a common mTLS/zero-trust requirement, and CA bundles are the OCI-native way to express trust. Custom names make LBs identifiable in the console.
Compatibility
Additive and opt-in. With none of the annotations set, behavior is unchanged: no CA bundle,
verify-peer=false, existing name scheme.verify-depthdefaulting to 1 only applies when a CA bundle is present.Validation
go test ./pkg/cloudprovider/providers/oci/— new unit tests for name generation, verify-depth defaulting/drift, explicit-depth preservation, and CA-bundle-only SSL.End-to-end on a live OKE cluster, a LoadBalancer Service produced an OCI LB with: custom name
<name>-<uid>, flexible 10/10, backend set CA bundle attached,verify-depth=1,verify-peer-certificate=true; the config persisted across a controller restart + resync, and HTTP requests through the LB returned 200.Note for maintainers
During validation,
CreateLoadBalancerwith a backend-set CA bundle (trustedCertificateAuthorityIds) consistently returned an opaque HTTP 500 when the request was signed by an Instance Principal, while a byte-identical request signed by a user principal succeeded. This was isolated from subnet, payload, IAM (reproduced with broad admin), tags, listener config, and controller concurrency — it correlates only with instance-principal auth + CA-bundle association. It's an OCI service-side behavior, not a CCM issue, but worth flagging since the in-cluster CCM commonly runs under Instance Principal.