[blocked on nephio#1170] Stop pinning the o2ims operator's Kubernetes API address - #146
Open
thc1006 wants to merge 1 commit into
Open
[blocked on nephio#1170] Stop pinning the o2ims operator's Kubernetes API address#146thc1006 wants to merge 1 commit into
thc1006 wants to merge 1 commit into
Conversation
The deployment sets KUBERNETES_BASE_URL to https://kubernetes.default.svc, which is the one address Kubernetes does not promise a serving certificate for. The control plane is expected to present a valid certificate for the hostname or IP that $KUBERNETES_SERVICE_HOST represents, and the operator derives that address itself, so pinning the name here only preserves a dependency on a SAN that a cluster is free not to carry. This needs nephio-project/nephio#1169 first. That is where the operator learned to verify the API server's certificate and to fall back on the advertised address; until an image carrying it is deployed, the operator's own default for KUBERNETES_BASE_URL is http://127.0.0.1:8080, a kubectl proxy that does not exist inside the pod. Merging this before then would break every deployment made from this package. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
thc1006
marked this pull request as ready for review
August 16, 2026 03:02
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.
nephio/optional/o2ims/app/deployment.yamlpins the API server address:Quoting the Kubernetes documentation on accessing the API from a Pod:
That distinction did not matter while the operator skipped certificate verification, which is the defect nephio-project/nephio#1169 fixes. Once it verifies, the pinned name is the one address whose certificate a cluster is free not to carry, and the operator already derives the advertised one for itself. Removing the pin is all that is left to do here.
In practice
kubeadmandkindboth putkubernetes.default.svcin the serving certificate's SANs, so this is not expected to change behaviour on a typical cluster. It removes the reliance, rather than fixing a breakage.Sequencing
The manifest and the image version independently, and this package uses
image: docker.io/nephio/o2ims-operator:latestwithimagePullPolicy: IfNotPresent, so a node holding an olderlatestwould still be running the old code after this merges. The safe order is: nephio-project/nephio#1170 merges, the postsubmit publishes an image containing it, that image's${BUILD_ID}tag or digest is pinned in this file, then this merges. Pinning matters as much as ordering: withlatestandIfNotPresent, a node holding an older cachedlatestkeeps running the old binary even after a rollout.If you would rather not sequence two repositories, an alternative is to keep the variable and set it to
https://$(KUBERNETES_SERVICE_HOST):$(KUBERNETES_SERVICE_PORT), which the kubelet expands from the service environment and which works against both the old and the new operator code. I have not tested that expansion against a live cluster, so I have not proposed it as the change — say the word and I will verify it and switch.Context
Part of a small series on the operators' Kubernetes clients:
The
nephio/optional/focom-operatorpackage here needs nothing: its bundle carries noenvblock at all, so neitherPORCH_HTTPS_VERIFYnorKUBERNETES_BASE_URLis set from this repository.