Skip to content

[KOTS]: add recommended preflights #8857

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

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions install/kots/manifests/kots-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,16 @@ spec:
message: There must be at least one node with the label "gitpod.io/workload_workspace_headless" and value "true"
- pass:
message: Node with label exists
- customResourceDefinition:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved this up so the memory/CPU checks are in the same section - seemed more logical that way

checkName: Cert-manager is installed
customResourceDefinitionName: certificates.cert-manager.io
outcomes:
- fail:
message: Custom resource definition `certificates.cert-manager.io` was not found in the cluster. Please [install `cert-manager`](https://cert-manager.io/docs/installation/) to proceed.
- pass:
message: Cert-manager is installed and available.
- nodeResources:
checkName: Total CPU Cores in the cluster is 2 or greater
checkName: Total CPU Cores in the cluster
outcomes:
- fail:
when: "sum(cpuCapacity) < 2"
Expand All @@ -94,12 +102,22 @@ spec:
when: "sum(cpuCapacity) < 4"
message: The cluster must contain at least 4 cores
- pass:
message: There are at least 2 cores in the cluster
- customResourceDefinition:
checkName: Cert-manager is installed
customResourceDefinitionName: certificates.cert-manager.io
message: There are at least 4 cores in the cluster
- nodeResources:
checkName: Total memory in the cluster
outcomes:
- fail:
message: Custom resource definition `certificates.cert-manager.io` was not found in the cluster. Please [install `cert-manager`](https://cert-manager.io/docs/installation/) to proceed.
when: "sum(memoryCapacity) < 8G"
message: The cluster must have least 8GB of memory
- warn:
when: "sum(memoryCapacity) < 16G"
message: The cluster must have least 16GB of memory
- pass:
message: Cert-manager is installed and available.
message: There is at least 16GB of memory in the cluster
- storageClass:
checkName: Check for default storage class
outcomes:
- fail:
message: No default storage class found
- pass:
message: Default storage class found