-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(backend) Enable auth between pesistence agent and pipelineAPI (ReportServer) #9699
Conversation
/retest |
49e7874
to
e446cc9
Compare
/retest |
} else if statusCode.Code() == codes.Unauthenticated && strings.Contains(err.Error(), "service account token has expired") { | ||
//if unauthenticated because SA token is expired, re-read/refresh the token and try again | ||
p.tokenRefresher.RefreshToken() | ||
return util.NewCustomError(err, util.CUSTOM_CODE_TRANSIENT, |
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.
Although I see you're following an existing pattern, for my education how would user discover such error? Would this be surfaced back by apiserver?
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.
Hi! Sorry for my late response.
The user could observe the status of the Run and inspect the logs of the persistent agent. The errors are not directly displayed on the UI.
If a "transient" error occurs the Persistent Agent will retry with an exponential delay
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.
Here, If an error occurs on token refresh, I just log the error and let the worker thread retries. Any other suggestions on what to do if the refresh token fails?
manifests/kustomize/base/pipeline/ml-pipeline-persistenceagent-deployment.yaml
Show resolved
Hide resolved
/assign @chensun |
1. Add authentication and authorization logic to PipelineAPI's PeportServer & 2. Make Persistence Agent authenticate itself through Service Account Token Volume Projection. Signed-off-by: diana <[email protected]>
Only Persistent agent can KFPipeline API "Report (Scheduled)Workflows" no matter the namespace workflows belongs to. Signed-off-by: diana <[email protected]>
8635d29
to
1de9bd0
Compare
@difince is any help needed? |
4333fc2
to
19e6d60
Compare
- unit tests added - do not stop the ticker on stopCh Signed-off-by: diana <[email protected]>
19e6d60
to
bc9e1e0
Compare
|
||
ticker := time.NewTicker(*tr.seconds) | ||
go func() { | ||
for range ticker.C { |
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.
I was unsure about the use of the stopCh
, so I removed it. WDYT? Please inspect the changes introduced by my third commit.
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.
/lgtm
/approve
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chensun 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 |
I'm investigating the test failure, which is likely unrelated to this change. |
/retest-required |
…eportServer) (#9699) * Enable auth between pesistence agent and pipelineAPI (ReportServer) 1. Add authentication and authorization logic to PipelineAPI's PeportServer & 2. Make Persistence Agent authenticate itself through Service Account Token Volume Projection. Signed-off-by: diana <[email protected]> * Do not use MULTIUSER on report weorkflows Only Persistent agent can KFPipeline API "Report (Scheduled)Workflows" no matter the namespace workflows belongs to. Signed-off-by: diana <[email protected]> * Add unit tests - unit tests added - do not stop the ticker on stopCh Signed-off-by: diana <[email protected]> --------- Signed-off-by: diana <[email protected]>
…eportServer) (kubeflow#9699) * Enable auth between pesistence agent and pipelineAPI (ReportServer) 1. Add authentication and authorization logic to PipelineAPI's PeportServer & 2. Make Persistence Agent authenticate itself through Service Account Token Volume Projection. Signed-off-by: diana <[email protected]> * Do not use MULTIUSER on report weorkflows Only Persistent agent can KFPipeline API "Report (Scheduled)Workflows" no matter the namespace workflows belongs to. Signed-off-by: diana <[email protected]> * Add unit tests - unit tests added - do not stop the ticker on stopCh Signed-off-by: diana <[email protected]> --------- Signed-off-by: diana <[email protected]>
…eportServer) (kubeflow#9699) * Enable auth between pesistence agent and pipelineAPI (ReportServer) 1. Add authentication and authorization logic to PipelineAPI's PeportServer & 2. Make Persistence Agent authenticate itself through Service Account Token Volume Projection. Signed-off-by: diana <[email protected]> * Do not use MULTIUSER on report weorkflows Only Persistent agent can KFPipeline API "Report (Scheduled)Workflows" no matter the namespace workflows belongs to. Signed-off-by: diana <[email protected]> * Add unit tests - unit tests added - do not stop the ticker on stopCh Signed-off-by: diana <[email protected]> --------- Signed-off-by: diana <[email protected]>
Issue: #8074
Description of your changes:
Checklist: