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

[upgrade-k8s] images paths overwrite by const while using private registries #8275

Closed
mstrohl opened this issue Feb 6, 2024 · 3 comments · Fixed by #8283
Closed

[upgrade-k8s] images paths overwrite by const while using private registries #8275

mstrohl opened this issue Feb 6, 2024 · 3 comments · Fixed by #8283

Comments

@mstrohl
Copy link
Contributor

mstrohl commented Feb 6, 2024

Bug Report

Unable to kee private registry image path on upgrade-k8s command

Description

The command line "talosctl upgrade-k8s --to xxxx" replaced images repository to the default public registry instead of changing tag only

Logs

Environment

  • Talos version: [talosctl version --nodes <problematic nodes>]
    1.6.3
  • Kubernetes version: [kubectl version --short]
    1.28.2 to 1.29.0
  • Platform:
    VM on OpenStack
@smira
Copy link
Member

smira commented Feb 7, 2024

Yes, this is not supported as of right now, but you have two ways to get around it:

  • update k8s manually according to the documentation
  • use registry mirrors so that the image references are "canonical", but the actual registry used if your private one

@mstrohl
Copy link
Contributor Author

mstrohl commented Feb 7, 2024

Hello @smira! Thank you to answer.
Registry mirrors have been setup but it seems to doesn't work like that:

    registries:
        mirrors:
            docker.io:
                endpoints:
                    - https://private-registry.example.com/harbor_folder/
                overridePath: true 
            gcr.io:
                endpoints:
                    - https://private-registry.example.com/harbor_folder/
                overridePath: true 
            ghcr.io:
                endpoints:
                    - https://private-registry.example.com/harbor_folder/
                overridePath: true 
            registry.k8s.io:
                endpoints:
                    - https://private-registry.example.com/harbor_folder/
                overridePath: true 
        config:
            private-registry.example.com:
                auth:
                    username: xxxxxx 
                    password: yyyyyyy 
                    auth: zzzzzz 

That is why we have forked and tested a change ton the code. The PR will come in a couple of minutes.

@smira
Copy link
Member

smira commented Feb 7, 2024

We have even docs for Harbor, I'm pretty sure it works: https://www.talos.dev/v1.6/talos-guides/configuration/pull-through-cache/#using-harbor-as-a-caching-registry

mstrohl pushed a commit to mstrohl/talos that referenced this issue Feb 7, 2024
    Reuse custom registry if not public one

    Fixes: siderolabs#8275

    Co-authored-by:  @g3offrey
    Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 7, 2024
feat: private registry for k8s upgrade.

Reuse custom registry if not public one

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 7, 2024
Reuse custom registry

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 7, 2024
Reuse custom registry.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 8, 2024
Reuse custom registry.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 8, 2024
Reuse custom registry.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 8, 2024
add upgrade flag
manage proxy image

Fixes: siderolabs#8275
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 8, 2024
New flag.
Proxy image management.

Fixes: siderolabs#8275

Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 13, 2024
New flag.
Proxy image management.

Fixes: siderolabs#8275

Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
mstrohl added a commit to mstrohl/talos that referenced this issue Feb 13, 2024
Reuse custom registry.
New flag
Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
smira pushed a commit to mstrohl/talos that referenced this issue Feb 15, 2024
Allows to use custom registry/images.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
smira pushed a commit to smira/talos that referenced this issue Feb 21, 2024
Allows to use custom registry/images.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 3fe82ec)
dsseng pushed a commit to dsseng/talos that referenced this issue Mar 7, 2024
Allows to use custom registry/images.

Fixes: siderolabs#8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants