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
AGENT-161: install-config validations for agent installer #6193
AGENT-161: install-config validations for agent installer #6193
Conversation
4affdd0
to
3bfc277
Compare
3bfc277
to
406b811
Compare
406b811
to
3e9df2a
Compare
3e9df2a
to
3252f05
Compare
/lgtm |
/test unit |
1 similar comment
/test unit |
/approve Worked for me when I tested it locally. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lranjbar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pawanpinjarkar: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
To be able to validate the install-config.yaml as per agent installer requirements,
the install-config is first loaded early in the agent installer OptionalInstallConfig.
Then, the following validations are performed if the loaded file is valid YAML.
e.g.
invalid install-config configuration: Platform: Unsupported value: "aws": supported values: "baremetal", "vsphere", "none"
e.g.
invalid install-config configuration: Platform.Baremetal.ApiVip: Required value: ApiVip must be set for baremetal platform
invalid install-config configuration: Platform.VSphere.IngressVip: Required value: IngressVip must be set for vsphere platform
the total number of worker replicas should be 0
e.g.
invalid install-config configuration: [ControlPlane.Replicas: Required value: control plane replicas must be 1 for none platform. Found 3, Compute.Replicas: Required value: total number of worker replicas must be 0 for none platform. Found 2]
Once these agent installer specific validations are passed, we rely on the usual generic validations offered by installer repo for
pkg/asset/installconfig/installconfig.go