-
Notifications
You must be signed in to change notification settings - Fork 194
fix: k8s client setup if agent service account auth is not used #731
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
base: master
Are you sure you want to change the base?
fix: k8s client setup if agent service account auth is not used #731
Conversation
c4a2ca5
to
0b9115e
Compare
/retest |
e2e test failure is related to actions/runner-images#11985 /cc @cheftako |
Currently the setting up of k8s client is broken if service account authentication is not used between server and agent. This condition `if o.AgentNamespace != "" {` acts as a gatekeeper for setting the k8s client which worked fine previously as server never needed to talk to apiserver apart from authenticating agents using service account token. However when lease controller logic was added, it meant that setting up k8s client was required if lease controller was enabled but authentication was done using mTLS instead of service account authentication. This fixes that. Closing kubernetes-sigs#728 in favour of this. Signed-off-by: Imran Pochi <imranpochi@microsoft.com>
0b9115e
to
3e4b939
Compare
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheftako, ipochi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Change looks good. Lets see what we need to do to get the tests healthy. |
/retest |
ipv6 runners have a kernel bug actions/runner-images#11985 , this is the reason of CI failed. |
There is an error in github actions runner that runs on 22.04. This issue hasn't been rectified yet but the issue is not reported on 24.04 issue details: actions/runner-images#11985 So this bumps the action to run on ubuntu 24.04 Signed-off-by: Imran Pochi <imranpochi@microsoft.com>
New changes are detected. LGTM label has been removed. |
switching to 24.04 github action runner introduces this error chmod: cannot operate on dangling symlink '/usr/local/bin/now' hence instead of chmod all binaries present in /usr/local/bin, we only chmod the binaries that we copy. Signed-off-by: Imran Pochi <imranpochi@microsoft.com>
Currently the setting up of k8s client is broken if service account
authentication is not used between server and agent.
This condition
if o.AgentNamespace != "" {
acts as a gatekeeper forsetting the k8s client which worked fine previously as server never
needed to talk to apiserver apart from authenticating agents using
service account token.
However when lease controller logic was added, it meant that setting up
k8s client was required if lease controller was enabled but
authentication was done using mTLS instead of service account
authentication.
This fixes that.
Closing #728 in favour of this.