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

Add ignition API types #117

Merged
merged 6 commits into from
Mar 28, 2023
Merged

Conversation

alexander-demicev
Copy link
Member

What this PR does / why we need it:

This PR adds an Ignition type to the bootstrap API and a validation/defaulting webhook.

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 #

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

Copy link
Contributor

@belgaied2 belgaied2 left a comment

Choose a reason for hiding this comment

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

Looks good to me, except a reference to Kubeadm.

return nil
}

return apierrors.NewInvalid(GroupVersion.WithKind("KubeadmConfig").GroupKind(), name, allErrs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Reference to Kubeadm

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

richardcase
richardcase previously approved these changes Mar 27, 2023
Copy link
Contributor

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

Looks ok to me. I small comment

// generated cloud-init script.
// NOTE: All fields of the UserData that are managed by the RKE2Config controller will be ignored, this include "write_files", "runcmd", "ntp".
// Format specifies the output format of the bootstrap data. Defaults to cloud-config.
// +optional
Copy link
Contributor

Choose a reason for hiding this comment

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

As we are defaulting the value to cloud init should we also add the default here?

Copy link
Member Author

@alexander-demicev alexander-demicev Mar 27, 2023

Choose a reason for hiding this comment

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

I thought we agreed on defaulting values only in a webhook and not using open API schema for this, do I remember it wrong? I can add a default tag here if needed.

Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
Copy link
Contributor

@belgaied2 belgaied2 left a comment

Choose a reason for hiding this comment

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

Looks fine to me

@alexander-demicev alexander-demicev merged commit 1cb395b into rancher:main Mar 28, 2023
@alexander-demicev alexander-demicev deleted the ignitionapi branch March 28, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants