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

Move to path.Join for repo + image_name: #607

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Apr 14, 2022

Description

With this a tink-worker can be started without a registry defined and templates in Tink server can specify any registry.

Why is this needed

Currently, if a container registry is not specified then the container image will start with a /. This will cause tink worker to fail to pull/run the container. With this change, if a container registry is not specified the / will not be added and the contain image will be pulled from the container runtime's default registry. For containerd and docker (which is what Hook runs) the default registry is docker.io.

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #607 (59e831a) into main (4769080) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 59e831a differs from pull request most recent head 442fabd. Consider uploading reports for the commit 442fabd to get more accurate results

@@           Coverage Diff           @@
##             main     #607   +/-   ##
=======================================
  Coverage   45.86%   45.86%           
=======================================
  Files          56       56           
  Lines        3268     3268           
=======================================
  Hits         1499     1499           
  Misses       1686     1686           
  Partials       83       83           
Impacted Files Coverage Δ
cmd/tink-worker/worker/registry.go 80.76% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4769080...442fabd. Read the comment docs.

Copy link
Contributor

@micahhausler micahhausler left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobweinstock
Copy link
Member Author

Hey @mmlb. When you have a few moments, would you mind checking this out?

@mmlb
Copy link
Contributor

mmlb commented Apr 18, 2022

LGTM, sorry for not reviewing but I really didn't want to have something jump in front of #584 and dropping reviews and thus prolonging it even more.

Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

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

lgtm but needs a rebase

With this a tink-worker can be started without
a registry defined and templates in Tink server
can specify any registry.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@jacobweinstock jacobweinstock force-pushed the update-worker-registry branch from 21a4978 to 442fabd Compare April 18, 2022 21:34
@mmlb mmlb added the ready-to-merge Signal to Mergify to merge the PR. label Apr 18, 2022
@mmlb mmlb removed request for nshalman and displague April 18, 2022 21:51
@mergify mergify bot merged commit 685a7f6 into tinkerbell:main Apr 18, 2022
@jacobweinstock jacobweinstock deleted the update-worker-registry branch April 18, 2022 21:56
mergify bot added a commit to tinkerbell/smee that referenced this pull request Apr 18, 2022
)

## Description


Allow registry, registry username, and password to be empty strings. These values are passed as kernel command line args for OSIE's boot up and then used by Tink worker when it pulls and runs containers. With [this](tinkerbell/tink#607) change to Tink worker, allowing the empty string here provides Tink worker the ability to specify any fully qualified container image in a template. e.g. `docker.io/alpine`, `quay.io/tinkerbell-actions/cexec`, `public.ecr.aws/l0g8r8j6/tinkerbell/pbnj`, etc

This change is backward compatible and shouldn't negatively affect using the Cacher backend.

## Why is this needed



Fixes: #

## How Has This Been Tested?





## How are existing users impacted? What migration steps/scripts do we need?





## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
@displague displague added this to the 0.7.0 milestone Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants