Skip to content
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

Fetch containerd auth config from the credentials file #1745

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

kron4eg
Copy link
Member

@kron4eg kron4eg commented Jan 19, 2022

What this PR does / why we need it:
Instead of storing registry authentication info directly in the kubeone config, it's now possible to have this info fetched from the credentials file.

The API reference ContainerRuntimeContainerd and it's used together with apiVersion and kind fields for type metadata.

Limitation: ONLY ContainerdRegistry.Auth will be extracted from credentials file.

Example:

registriesAuth: |
  apiVersion: kubeone.k8c.io/v1beta2
  kind: ContainerRuntimeContainerd
  registries:
    auth:
      docker.io:
        username: "u5er"
        password: "myc00lp455w0rd"
        auth: "base64(user:password)"
        identityToken: ""  

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1740

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fetch containerd auth config from the credentials file

@kron4eg kron4eg requested a review from xmudrii January 19, 2022 15:57
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Jan 19, 2022
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 19, 2022
Signed-off-by: Artiom Diomin <kron82@gmail.com>
@kubermatic-bot kubermatic-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 19, 2022
@kron4eg kron4eg marked this pull request as ready for review January 19, 2022 16:29
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 19, 2022
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question, otherwise LGTM.

pkg/apis/kubeone/config/config.go Show resolved Hide resolved
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2022
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 94c75369acf972abba6bfd374d599c67ab73c2fb

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg, xmudrii

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot merged commit ced1694 into kubermatic:master Jan 21, 2022
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.4 milestone Jan 21, 2022
@kron4eg kron4eg deleted the registriesAuth branch January 21, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support sourcing registry credentials from the environment
3 participants