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

AGENT-161: install-config validations for agent installer #6193

Merged

Conversation

pawanpinjarkar
Copy link
Contributor

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.

  • Only Baremetal, VSphere, and None platforms are supported
    e.g. invalid install-config configuration: Platform: Unsupported value: "aws": supported values: "baremetal", "vsphere", "none"
  • API and Ingress VIPs must be set when using Baremetal and VSphere platform
    e.g.
  1. invalid install-config configuration: Platform.Baremetal.ApiVip: Required value: ApiVip must be set for baremetal platform
  2. invalid install-config configuration: Platform.VSphere.IngressVip: Required value: IngressVip must be set for vsphere platform
  • If using none platform, the number of control plane replicas should be 1 and
    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

@openshift-ci openshift-ci bot requested review from jstuever and rwsu August 2, 2022 15:49
@pawanpinjarkar
Copy link
Contributor Author

/cc @lranjbar @bfournie

pkg/asset/agent/installconfig.go Show resolved Hide resolved
pkg/asset/agent/installconfig.go Show resolved Hide resolved
pkg/asset/agent/installconfig_test.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Show resolved Hide resolved
pkg/asset/agent/installconfig.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Outdated Show resolved Hide resolved
pkg/asset/agent/installconfig.go Show resolved Hide resolved
@bfournie
Copy link
Contributor

bfournie commented Aug 3, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 3, 2022
@pawanpinjarkar
Copy link
Contributor Author

/test unit

1 similar comment
@pawanpinjarkar
Copy link
Contributor Author

/test unit

@lranjbar
Copy link
Contributor

lranjbar commented Aug 3, 2022

/approve

Worked for me when I tested it locally.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 3, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 3, 2022

@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.

@openshift-ci openshift-ci bot merged commit 1d62523 into openshift:agent-installer Aug 3, 2022
@pawanpinjarkar pawanpinjarkar deleted the config-validations branch August 4, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants