Skip to content

Conversation

@guettli
Copy link
Contributor

@guettli guettli commented Mar 20, 2024

csctl accepts "--node-image-registry" now and passes it to the plugin.

Example:

❯ make build; ./csctl create tests/cluster-stacks/docker/ferrol -m hash   --node-image-registry oci://ghcr.io/foo/bar/node-images/staging/
go build -ldflags "-X github.com/SovereignCloudStack/csctl/pkg/cmd.Version=v0.0.2-10-gbf1f8f0-dirty -X github.com/SovereignCloudStack/csctl/pkg/cmd.Commit=bf1f8f0a292e7dcf1a41c0c9b4dccd37ec5c4a09" -o csctl main.go
go build -o csctl-docker csctldocker/csctldocker_main.go
Creating output in releases/docker-ferrol-1-27-v0-sha-bf1f8f0
Calling Provider Plugin: /home/guettli/syself/csctl/csctl-docker
clusterStackPath: tests/cluster-stacks/docker/ferrol
releaseDir: releases/docker-ferrol-1-27-v0-sha-bf1f8f0
nodeImageRegistry: oci://ghcr.io/foo/bar/node-images/staging/     <=== output of plugin
..... pretending to read config: dummyValue
..... pretending to do heavy work (creating node images) ...
Created releases/docker-ferrol-1-27-v0-sha-bf1f8f0

What this PR does / why we need it:

For building node images the plugin needs to know the oci-registry.

The patch makes csctl accept the --node-image-registry flag. It gets passed to the plugin, too.

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 #100

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squash commits
  • include documentation
  • add unit tests

…ugin.

Signed-off-by: Thomas Guettler <thomas.guettler@syself.com>
@guettli guettli force-pushed the tg/csctl-add-node-image-registry branch from 07615fa to 15875c2 Compare March 20, 2024 11:10
@guettli guettli requested a review from janiskemper March 20, 2024 11:10
Copy link
Contributor

@michal-gubricky michal-gubricky left a comment

Choose a reason for hiding this comment

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

I tested it with the docker example plugin and it works. I also plan to use this feature in openstack plugin to give the creator of the cluster-stacks option to provide path to registry.yaml where will be stored credentials to the S3 bucket to be able to push built image to S3.

@guettli guettli merged commit ff295ba into main Apr 11, 2024
@guettli guettli deleted the tg/csctl-add-node-image-registry branch April 11, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flag to specify node image registry

3 participants