-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate more kuttl tests to chainsaw (#826)
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
- Loading branch information
1 parent
bd883fe
commit 173186e
Showing
235 changed files
with
1,093 additions
and
706 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
26 changes: 26 additions & 0 deletions
26
kubecost/enable-kubecost-continuous-rightsizing/.chainsaw-test/chainsaw-test.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,26 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: enable-kubecost-continuous-rightsizing | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: ../enable-kubecost-continuous-rightsizing.yaml | ||
- assert: | ||
file: policy-ready.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../.kyverno-test/resource.yaml | ||
finally: | ||
- sleep: | ||
duration: 5s | ||
- name: step-03 | ||
try: | ||
- assert: | ||
file: ../.kyverno-test/patchedResource1.yaml | ||
- error: | ||
file: not-patched-deploy.yaml |
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions
6
kubecost/enable-kubecost-continuous-rightsizing/01-policy.yaml
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
kubecost/enable-kubecost-continuous-rightsizing/02-resources.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
kubecost/enable-kubecost-continuous-rightsizing/03-mutated.yaml
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ kind: ClusterPolicy | |
metadata: | ||
name: require-kubecost-labels | ||
status: | ||
ready: true | ||
ready: true |
37 changes: 37 additions & 0 deletions
37
kubecost/require-kubecost-labels/.chainsaw-test/chainsaw-test.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,37 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: require-kubecost-labels | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../require-kubecost-labels.yaml | kubectl create -f - | ||
- assert: | ||
file: chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: pod-good.yaml | ||
- apply: | ||
file: podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: pod-bad.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: require-kubecost-labels |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...g-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-step-01-apply-1.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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: kubeops-cluster-ns |
4 changes: 4 additions & 0 deletions
4
...g-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-step-01-apply-2.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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: kubed |
7 changes: 7 additions & 0 deletions
7
...g-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-step-01-apply-3.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,7 @@ | ||
apiVersion: v1 | ||
data: | ||
kubeconfig: Y2x1c3RlcnM6DQotIGNsdXN0ZXI6DQogICAgY2VydGlmaWNhdGUtYXV0aG9yaXR5LWRhdGE6IFltRnlDZz09DQogICAgc2VydmVyOiBodHRwczovLzEyNy4wLjAuMToxMjM0NQ0KICBuYW1lOiBjbHVzdGVyDQpjb250ZXh0czoNCi0gY29udGV4dDoNCiAgICBjbHVzdGVyOiBjbHVzdGVyDQogICAgdXNlcjogdXNlcg0KICBuYW1lOiBjbHVzdGVyDQpjdXJyZW50LWNvbnRleHQ6IGNsdXN0ZXINCnByZWZlcmVuY2VzOiB7fQ0KdXNlcnM6DQotIG5hbWU6IHVzZXINCiAgdXNlcjoNCiAgICBjbGllbnQtY2VydGlmaWNhdGUtZGF0YTogWW1GeUNnPT0= | ||
kind: Secret | ||
metadata: | ||
name: kubed | ||
namespace: kubed |
7 changes: 7 additions & 0 deletions
7
...g-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-step-01-apply-4.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,7 @@ | ||
apiVersion: v1 | ||
data: | ||
value: Y2x1c3RlcnM6DQotIGNsdXN0ZXI6DQogICAgY2VydGlmaWNhdGUtYXV0aG9yaXR5LWRhdGE6IFptOXYNCiAgICBzZXJ2ZXI6IGh0dHBzOi8vMTI3LjAuMC4xOjY5NjkNCiAgbmFtZTogY2x1c3Rlcg0KY29udGV4dHM6DQotIGNvbnRleHQ6DQogICAgY2x1c3RlcjogY2x1c3Rlcg0KICAgIHVzZXI6IHVzZXINCiAgbmFtZTogY2x1c3Rlcg0KY3VycmVudC1jb250ZXh0OiBjbHVzdGVyDQpwcmVmZXJlbmNlczoge30NCnVzZXJzOg0KLSBuYW1lOiB1c2VyDQogIHVzZXI6DQogICAgY2xpZW50LWNlcnRpZmljYXRlLWRhdGE6IFptOXY= | ||
kind: Secret | ||
metadata: | ||
name: rancher-cluster-kubeconfig | ||
namespace: kubeops-cluster-ns |
15 changes: 15 additions & 0 deletions
15
...g-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-step-01-apply-5.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,15 @@ | ||
apiVersion: provisioning.cattle.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: rancher-cluster | ||
namespace: kubeops-cluster-ns | ||
spec: | ||
rkeConfig: | ||
machinePools: | ||
- controlPlaneRole: true | ||
machineConfigRef: | ||
apiVersion: elemental.cattle.io/v1beta1 | ||
kind: MachineInventorySelectorTemplate | ||
name: configref01 | ||
name: machine01 | ||
quantity: 1 |
4 changes: 2 additions & 2 deletions
4
...neration-from-rancher-capi/03-secret.yaml → ...ainsaw-test/chainsaw-step-03-apply-1.yaml
100644 → 100755
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v1 | ||
data: | ||
value: Y2x1c3RlcnM6DQotIGNsdXN0ZXI6DQogICAgY2VydGlmaWNhdGUtYXV0aG9yaXR5LWRhdGE6IFptOXYNCiAgICBzZXJ2ZXI6IGh0dHBzOi8vMTI3LjAuMC4xOjU0MzIxDQogIG5hbWU6IGNsdXN0ZXINCmNvbnRleHRzOg0KLSBjb250ZXh0Og0KICAgIGNsdXN0ZXI6IGNsdXN0ZXINCiAgICB1c2VyOiB1c2VyDQogIG5hbWU6IGNsdXN0ZXINCmN1cnJlbnQtY29udGV4dDogY2x1c3Rlcg0KcHJlZmVyZW5jZXM6IHt9DQp1c2VyczoNCi0gbmFtZTogdXNlcg0KICB1c2VyOg0KICAgIGNsaWVudC1jZXJ0aWZpY2F0ZS1kYXRhOiBabTl2 | ||
kind: Secret | ||
metadata: | ||
name: sample-cluster-kubeconfig | ||
namespace: kubeops-cluster-ns | ||
data: | ||
value: Y2x1c3RlcnM6DQotIGNsdXN0ZXI6DQogICAgY2VydGlmaWNhdGUtYXV0aG9yaXR5LWRhdGE6IFptOXYNCiAgICBzZXJ2ZXI6IGh0dHBzOi8vMTI3LjAuMC4xOjU0MzIxDQogIG5hbWU6IGNsdXN0ZXINCmNvbnRleHRzOg0KLSBjb250ZXh0Og0KICAgIGNsdXN0ZXI6IGNsdXN0ZXINCiAgICB1c2VyOiB1c2VyDQogIG5hbWU6IGNsdXN0ZXINCmN1cnJlbnQtY29udGV4dDogY2x1c3Rlcg0KcHJlZmVyZW5jZXM6IHt9DQp1c2VyczoNCi0gbmFtZTogdXNlcg0KICB1c2VyOg0KICAgIGNsaWVudC1jZXJ0aWZpY2F0ZS1kYXRhOiBabTl2 |
41 changes: 41 additions & 0 deletions
41
kubeops/config-syncer-secret-generation-from-rancher-capi/.chainsaw-test/chainsaw-test.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,41 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: config-syncer-secret-generation-from-rancher-capi | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- assert: | ||
file: chainsaw-step-00-assert-1.yaml | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: chainsaw-step-01-apply-1.yaml | ||
- apply: | ||
file: chainsaw-step-01-apply-2.yaml | ||
- apply: | ||
file: chainsaw-step-01-apply-3.yaml | ||
- apply: | ||
file: chainsaw-step-01-apply-4.yaml | ||
- apply: | ||
file: chainsaw-step-01-apply-5.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../config-syncer-secret-generation-from-rancher-capi.yaml | ||
- assert: | ||
file: policy-ready.yaml | ||
- assert: | ||
file: secret-generated01.yaml | ||
- name: step-03 | ||
try: | ||
- apply: | ||
file: chainsaw-step-03-apply-1.yaml | ||
- name: step-04 | ||
try: | ||
- apply: | ||
file: cluster.yaml | ||
- assert: | ||
file: secret-generated02.yaml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 0 additions & 41 deletions
41
kubeops/config-syncer-secret-generation-from-rancher-capi/01-setup.yaml
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
kubeops/config-syncer-secret-generation-from-rancher-capi/02-policy.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
kubeops/config-syncer-secret-generation-from-rancher-capi/04-manifests.yaml
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: add-services | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- assert: | ||
file: chainsaw-step-00-assert-1.yaml | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: chainsaw-step-01-apply-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../add-services.yaml | ||
- assert: | ||
file: policy-ready.yaml | ||
- name: step-03 | ||
try: | ||
- apply: | ||
file: vmi.yaml | ||
- name: step-04 | ||
try: | ||
- assert: | ||
file: generated-svc.yaml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.