-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show initial preflight page for helm chart preflights (#4402)
* load preflights from helm chart templates as kotskinds * re-fetch app details after initial config is saved * read installation just before writing kotskinds
- Loading branch information
Craig O'Donnell
authored
Feb 2, 2024
1 parent
862f5a8
commit c124cbd
Showing
13 changed files
with
174 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+631 Bytes
pkg/tests/pull/cases/kotskinds/upstream/my-preflight-chart-0.1.0.tgz
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
pkg/tests/pull/cases/kotskinds/upstream/my-preflight-chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# this chart validates that preflights inside helm chart templates are processed correctly as kotskinds | ||
apiVersion: kots.io/v1beta2 | ||
kind: HelmChart | ||
metadata: | ||
name: my-preflight-chart | ||
annotations: | ||
kots.io/exclude: "true" | ||
spec: | ||
chart: | ||
name: my-preflight-chart | ||
chartVersion: 0.1.0 |
Binary file added
BIN
+631 Bytes
...sts/pull/cases/kotskinds/wantResults/helm/my-preflight-chart/my-preflight-chart-0.1.0.tgz
Binary file not shown.
1 change: 1 addition & 0 deletions
1
pkg/tests/pull/cases/kotskinds/wantResults/helm/my-preflight-chart/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
23 changes: 23 additions & 0 deletions
23
pkg/tests/pull/cases/kotskinds/wantResults/kotsKinds/helm-preflight.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: Preflight | ||
metadata: | ||
creationTimestamp: null | ||
name: airgap-smoke-test-preflight | ||
spec: | ||
analyzers: | ||
- clusterVersion: | ||
outcomes: | ||
- fail: | ||
message: The application requires at Kubernetes 1.13.0 or later, and recommends | ||
1.15.0. | ||
uri: https://www.kubernetes.io | ||
when: < 1.13.0 | ||
- warn: | ||
message: Your cluster meets the minimum version of Kubernetes, but we recommend | ||
you update to 1.15.0 or later. | ||
uri: https://kubernetes.io | ||
when: < 1.15.0 | ||
- pass: | ||
message: Your cluster meets the minimum version of Kubernetes recommended | ||
by the application. | ||
status: {} |
11 changes: 11 additions & 0 deletions
11
pkg/tests/pull/cases/kotskinds/wantResults/kotsKinds/my-preflight-chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# this chart validates that preflights inside helm chart templates are processed correctly as kotskinds | ||
apiVersion: kots.io/v1beta2 | ||
kind: HelmChart | ||
metadata: | ||
name: my-preflight-chart | ||
annotations: | ||
kots.io/exclude: "true" | ||
spec: | ||
chart: | ||
name: my-preflight-chart | ||
chartVersion: 0.1.0 |
29 changes: 29 additions & 0 deletions
29
...s/pull/cases/kotskinds/wantResults/rendered/this-cluster/helm/my-preflight-chart/all.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# Source: my-preflight-chart/templates/my-chart-preflight.yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
labels: | ||
troubleshoot.sh/kind: preflight | ||
name: "my-preflight-chart-preflight-config" | ||
stringData: | ||
preflight.yaml: | | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: Preflight | ||
metadata: | ||
name: airgap-smoke-test-preflight | ||
spec: | ||
collectors: [] | ||
analyzers: | ||
- clusterVersion: | ||
outcomes: | ||
- fail: | ||
when: "< 1.13.0" | ||
message: The application requires at Kubernetes 1.13.0 or later, and recommends 1.15.0. | ||
uri: https://www.kubernetes.io | ||
- warn: | ||
when: "< 1.15.0" | ||
message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.15.0 or later. | ||
uri: https://kubernetes.io | ||
- pass: | ||
message: Your cluster meets the minimum version of Kubernetes recommended by the application. |
Binary file added
BIN
+631 Bytes
pkg/tests/pull/cases/kotskinds/wantResults/upstream/my-preflight-chart-0.1.0.tgz
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
pkg/tests/pull/cases/kotskinds/wantResults/upstream/my-preflight-chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# this chart validates that preflights inside helm chart templates are processed correctly as kotskinds | ||
apiVersion: kots.io/v1beta2 | ||
kind: HelmChart | ||
metadata: | ||
name: my-preflight-chart | ||
annotations: | ||
kots.io/exclude: "true" | ||
spec: | ||
chart: | ||
name: my-preflight-chart | ||
chartVersion: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters