-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Florian Bacher <[email protected]>
- Loading branch information
Showing
6 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
test/integration/workload-instance-failing-pre-task/00-assert.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: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnAppVersion | ||
metadata: | ||
name: podtato-head-1.3 | ||
status: | ||
currentPhase: AppDeploy | ||
postDeploymentEvaluationStatus: Pending | ||
postDeploymentStatus: Pending | ||
preDeploymentEvaluationStatus: Succeeded | ||
preDeploymentStatus: Succeeded | ||
status: Progressing | ||
workloadOverallStatus: Progressing | ||
--- | ||
apiVersion: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnWorkloadInstance | ||
metadata: | ||
name: podtato-head-podtato-head-entry-0.1.0 | ||
status: | ||
currentPhase: WorkloadPreDeployTasks | ||
deploymentStatus: Pending | ||
preDeploymentEvaluationStatus: Pending | ||
preDeploymentStatus: Progressing | ||
status: Progressing |
76 changes: 76 additions & 0 deletions
76
test/integration/workload-instance-failing-pre-task/00-install.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,76 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnApp | ||
metadata: | ||
name: podtato-head | ||
spec: | ||
version: "1.3" | ||
workloads: | ||
- name: podtato-head-entry | ||
version: 0.1.0 | ||
postDeploymentTasks: | ||
- post-deployment-hello | ||
--- | ||
apiVersion: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: check-entry-service | ||
spec: | ||
function: | ||
httpRef: | ||
url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/functions-runtime/samples/ts/http.ts | ||
parameters: | ||
map: | ||
url: http://podtato-head-entry:9000 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-entry | ||
labels: | ||
app: podtato-head | ||
spec: | ||
selector: | ||
matchLabels: | ||
component: podtato-head-entry | ||
template: | ||
metadata: | ||
labels: | ||
component: podtato-head-entry | ||
annotations: | ||
keptn.sh/app: podtato-head | ||
keptn.sh/workload: podtato-head-entry | ||
keptn.sh/version: 0.1.0 | ||
keptn.sh/pre-deployment-tasks: check-entry-service # this will check itself for being available and thus will fail | ||
spec: | ||
terminationGracePeriodSeconds: 5 | ||
initContainers: | ||
- name: init-myservice | ||
image: busybox:1.28 | ||
command: ['sh', '-c', 'sleep 30'] | ||
containers: | ||
- name: server | ||
image: ghcr.io/podtato-head/entry:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9000 | ||
env: | ||
- name: PODTATO_PORT | ||
value: "9000" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: podtato-head-entry | ||
labels: | ||
app: podtato-head | ||
spec: | ||
selector: | ||
component: podtato-head-entry | ||
ports: | ||
- name: http | ||
port: 9000 | ||
protocol: TCP | ||
targetPort: 9000 | ||
type: LoadBalancer | ||
# change to NodePort if no LoadBalancer controller is available | ||
# type: NodePort |
4 changes: 4 additions & 0 deletions
4
test/integration/workload-instance-failing-pre-task/00-teststep.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: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl annotate ns $NAMESPACE keptn.sh/lifecycle-toolkit='enabled' |
23 changes: 23 additions & 0 deletions
23
test/integration/workload-instance-missing-evaluation/00-assert.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: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnAppVersion | ||
metadata: | ||
name: podtato-head-1.3 | ||
status: | ||
currentPhase: AppDeploy | ||
postDeploymentEvaluationStatus: Pending | ||
postDeploymentStatus: Pending | ||
preDeploymentEvaluationStatus: Succeeded | ||
preDeploymentStatus: Succeeded | ||
status: Progressing | ||
workloadOverallStatus: Progressing | ||
--- | ||
apiVersion: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnWorkloadInstance | ||
metadata: | ||
name: podtato-head-podtato-head-entry-0.1.0 | ||
status: | ||
currentPhase: WorkloadPreDeployEvaluations | ||
deploymentStatus: Pending | ||
preDeploymentEvaluationStatus: Pending | ||
preDeploymentStatus: Succeeded | ||
status: Progressing |
64 changes: 64 additions & 0 deletions
64
test/integration/workload-instance-missing-evaluation/00-install.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,64 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha1 | ||
kind: KeptnApp | ||
metadata: | ||
name: podtato-head | ||
spec: | ||
version: "1.3" | ||
workloads: | ||
- name: podtato-head-entry | ||
version: 0.1.0 | ||
postDeploymentTasks: | ||
- post-deployment-hello | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-entry | ||
labels: | ||
app: podtato-head | ||
spec: | ||
selector: | ||
matchLabels: | ||
component: podtato-head-entry | ||
template: | ||
metadata: | ||
labels: | ||
component: podtato-head-entry | ||
annotations: | ||
keptn.sh/app: podtato-head | ||
keptn.sh/workload: podtato-head-entry | ||
keptn.sh/version: 0.1.0 | ||
keptn.sh/pre-deployment-evaluations: missing-evaluation | ||
spec: | ||
terminationGracePeriodSeconds: 5 | ||
initContainers: | ||
- name: init-myservice | ||
image: busybox:1.28 | ||
command: ['sh', '-c', 'sleep 30'] | ||
containers: | ||
- name: server | ||
image: ghcr.io/podtato-head/entry:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9000 | ||
env: | ||
- name: PODTATO_PORT | ||
value: "9000" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: podtato-head-entry | ||
labels: | ||
app: podtato-head | ||
spec: | ||
selector: | ||
component: podtato-head-entry | ||
ports: | ||
- name: http | ||
port: 9000 | ||
protocol: TCP | ||
targetPort: 9000 | ||
type: LoadBalancer | ||
# change to NodePort if no LoadBalancer controller is available | ||
# type: NodePort |
4 changes: 4 additions & 0 deletions
4
test/integration/workload-instance-missing-evaluation/00-teststep.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: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl annotate ns $NAMESPACE keptn.sh/lifecycle-toolkit='enabled' |