Skip to content

Commit

Permalink
test: added Kuttl tests to check conversion webhooks (#581)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl authored Jan 12, 2023
1 parent 88e7ac4 commit 046a280
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 12 deletions.
58 changes: 52 additions & 6 deletions test/integration/api-conversion/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,60 @@
apiVersion: lifecycle.keptn.sh/v1alpha2
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnApp
metadata:
name: "some-klt-app1"
name: "some-klt-app2"
spec:
version: "1.2.3"
revision: 1
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnApp
kind: KeptnAppVersion
metadata:
name: "some-klt-app2"
name: "some-klt-app-version-2"
spec:
version: "1.2.3"
appName: podtato-head
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
traceId:
traceparent: my-trace-parent
version: 0.1.0
workloads:
- name: podtato-head-left-arm
version: 0.2.7
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnWorkloadInstance
metadata:
annotations:
traceparent: my-trace-parent
name: some-keptn-workload-instance-2
spec:
app: podtato-head
resourceReference:
kind: ReplicaSet
name: my-replica-set
uid: 957f825e-4025-4ea8-ad22-9292877ff7eb
traceId:
traceparent: my-trace-parent
version: 0.2.7
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
workloadName: some-keptn-workload-instance-2
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnEvaluationProvider
metadata:
name: some-evaluation-provider-2
spec:
targetServer: http://my-server-url
secretName: my-secret-name
64 changes: 58 additions & 6 deletions test/integration/api-conversion/00-install.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,66 @@
apiVersion: lifecycle.keptn.sh/v1alpha1
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnApp
metadata:
name: "some-klt-app1"
name: "some-klt-app2"
spec:
version: "1.2.3"
revision: 123
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnApp
kind: KeptnAppVersion
metadata:
name: "some-klt-app2"
name: "some-klt-app-version-2"
spec:
version: "1.2.3"
revision: 123
appName: podtato-head
revision: 1
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
traceId:
traceparent: my-trace-parent
version: 0.1.0
workloads:
- name: podtato-head-left-arm
version: 0.2.7
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnWorkloadInstance
metadata:
annotations:
traceparent: my-trace-parent
name: some-keptn-workload-instance-2
spec:
app: podtato-head
resourceReference:
kind: ReplicaSet
name: my-replica-set
uid: 957f825e-4025-4ea8-ad22-9292877ff7eb
traceId:
traceparent: my-trace-parent
version: 0.2.7
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
workloadName: some-keptn-workload-instance-2
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnEvaluationProvider
metadata:
name: some-evaluation-provider-2
spec:
targetServer: http://my-server-url
secretKeyRef:
name: "my-secret-name"
key: "apiToken"


64 changes: 64 additions & 0 deletions test/integration/api-conversion/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnApp
metadata:
name: "some-klt-app1"
spec:
version: "1.2.3"
revision: 1
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnAppVersion
metadata:
name: "some-klt-app-version-1"
spec:
appName: podtato-head
revision: 1
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
traceId:
traceparent: my-trace-parent
version: 0.1.0
workloads:
- name: podtato-head-left-arm
version: 0.2.7
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnWorkloadInstance
metadata:
annotations:
traceparent: my-trace-parent
name: some-keptn-workload-instance-1
spec:
app: podtato-head
resourceReference:
kind: ReplicaSet
name: my-replica-set
uid: 957f825e-4025-4ea8-ad22-9292877ff7eb
traceId:
traceparent: my-trace-parent
version: 0.2.7
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
workloadName: some-keptn-workload-instance-1
---
apiVersion: lifecycle.keptn.sh/v1alpha2
kind: KeptnEvaluationProvider
metadata:
name: some-evaluation-provider-1
spec:
targetServer: http://my-server-url
secretKeyRef:
name: "my-secret-name"
key: "apiToken"
62 changes: 62 additions & 0 deletions test/integration/api-conversion/01-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnApp
metadata:
name: "some-klt-app1"
spec:
version: "1.2.3"
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnAppVersion
metadata:
name: "some-klt-app-version-1"
spec:
appName: podtato-head
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
traceId:
traceparent: my-trace-parent
version: 0.1.0
workloads:
- name: podtato-head-left-arm
version: 0.2.7
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnWorkloadInstance
metadata:
annotations:
traceparent: my-trace-parent
name: some-keptn-workload-instance-1
spec:
app: podtato-head
resourceReference:
kind: ReplicaSet
name: my-replica-set
uid: 957f825e-4025-4ea8-ad22-9292877ff7eb
traceId:
traceparent: my-trace-parent
version: 0.2.7
preDeploymentTasks:
- pre-deployment-task
preDeploymentEvaluations:
- pre-deployment-evaluation
postDeploymentTasks:
- post-deployment-task
postDeploymentEvaluations:
- post-deployment-evaluation
workloadName: some-keptn-workload-instance-1
---
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnEvaluationProvider
metadata:
name: some-evaluation-provider-1
spec:
targetServer: http://my-server-url
secretName: my-secret-name


0 comments on commit 046a280

Please sign in to comment.