-
Notifications
You must be signed in to change notification settings - Fork 522
OCPNODE-3753: CRIOCredentialProviderConfig for Namespace-Scoped Mirror Authentication #1861
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?
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test all |
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.
Great write-up, it nicely summarizes the whole effort!
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ements/api-review/criocredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ements/api-review/criocredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Show resolved
Hide resolved
...ements/api-review/criocredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
...ments/api-review/imagecredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
060f30d to
7d1b2f9
Compare
|
@saschagrunert PTAL |
...ements/api-review/criocredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Outdated
Show resolved
Hide resolved
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.
Overall LGTM 👍
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saschagrunert The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
...ements/api-review/criocredentialproviderconfig-for-namespace-scoped-mirror-authentication.md
Show resolved
Hide resolved
…ication Signed-off-by: Qi Wang <[email protected]>
7d1b2f9 to
14465a6
Compare
|
@QiWang19: This pull request references OCPNODE-3753 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@QiWang19: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
| name: system:serviceaccount:app-team-alpha:app-service-account | ||
| ``` | ||
|
|
||
| 3. Cluster Admin configures cluster-wide `CRIOCredentialProviderConfig` object specifying source registries that should trigger `crio-credential-provider` |
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.
| 3. Cluster Admin configures cluster-wide `CRIOCredentialProviderConfig` object specifying source registries that should trigger `crio-credential-provider` | |
| 4. Cluster Admin configures cluster-wide `CRIOCredentialProviderConfig` object specifying source registries that should trigger `crio-credential-provider` |
|
|
||
| 2. Machine Config Operator container runtime config controller | ||
|
|
||
| - Extend the container runtime config controller to manage the `CRIOCredentialProviderConfig` objects |
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.
| - Extend the container runtime config controller to manage the `CRIOCredentialProviderConfig` objects | |
| - Extends the container runtime config controller to manage the `CRIOCredentialProviderConfig` objects |
|
|
||
| - resolves mirrors from `/etc/containers/registries.conf` for source image repository(docker.io/nginx) | ||
|
|
||
| - Finds mirror pull secrets in Pod namespace (team-alpha-mirror-secret) by using the service account token from the request |
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.
| - Finds mirror pull secrets in Pod namespace (team-alpha-mirror-secret) by using the service account token from the request | |
| - Finds mirror pull secrets in Pod namespace (app-team-alpha-mirror-secret) by using the service account token from the request |
|
|
||
| 4. CRI-O image pull: | ||
|
|
||
| - Detects the file `/etc/crio/auth/<NAMESPACE>-<IMAGE_NAME_SHA256>.json` exists, uses the auth file for image pull authentication |
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.
In previous 'Component Changes & Interactions' part, it describes:
If the auth file generated by crio-credential-provider exists, moves the auth file from /etc/crio/auth/<NAMESPACE>-<IMAGE_NAME_SHA256>.json to a unique temporary location (/etc/crio/auth/in-use/<NAMESPACE>-<IMAGE_NAME_SHA256>-<UUID>.json) for each image pull
So it's better to add the part of moving auth file to a unique temporary directory
| apiVersion: credentialprovider.kubelet.k8s.io/v1 | ||
| ``` | ||
|
|
||
| ##### Step 2: Application Deployment |
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'm not sure if this enhancement have strict formatting requirements. It seems the font and color of titles at each level are not consistent. It's better to standardize.
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 think it's just a problem of github, not the content.
|
|
||
| - Generates a short-lived authentication file for each image pull at `/etc/crio/auth/<NAMESPACE>-<IMAGE_NAME_SHA256>.json`, which includes mirror credentials, source registry credentials, and any global pull secrets. | ||
|
|
||
| - Returns empty `CredentialProviderResponse` to kubelet |
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.
What was the reason why we return empty credential instead of returning the token in the response?
I think we discussed it somewhere, but I forgot where it was.
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.
The kubelet will ignore the credentials within the response if it does not match the original image (without tag or digest). Means the we cannot pass the credentials there.
Propose a new CRIOCredentialProviderConfig CRD that enables use namespace-scoped secrets for mirror registry authentication.