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

Validate containerd-registry setting #571

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Validate containerd-registry setting #571

merged 1 commit into from
Oct 27, 2023

Conversation

connorkuehl
Copy link

Problem:

harvester-installer allows nonsense values for containerd-registry in configuration.

Solution:

Deserialize the value to at least confirm the shape of the input string as a valid registries JSON object.

Related Issue: harvester/harvester#3295

Test plan:

Signed-off-by: Connor Kuehl <connor.kuehl@suse.com>
Copy link
Member

@FrankYang0529 FrankYang0529 left a comment

Choose a reason for hiding this comment

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

LGTM, test with following steps and validation can work. Thank you.

  1. Use vagrant-pxe-harvester.
  2. Add following to config-create.yaml.j2.
systemSettings:
  containerd-registry: '{"error json format"}'
  1. Run ./setup_harvester.sh
  2. The panel shows "could not parse containerd-registry as JSON".

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bk201 bk201 merged commit cc7e7dc into harvester:master Oct 27, 2023
6 checks passed
@bk201
Copy link
Member

bk201 commented Oct 27, 2023

@Mergifyio backport v1.2

@mergify
Copy link

mergify bot commented Oct 27, 2023

backport v1.2

✅ Backports have been created

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.

3 participants