-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(operator): ensure that generated resource names contain no unallo…
…wed character (#1661) Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
- Loading branch information
Showing
8 changed files
with
132 additions
and
4 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
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
8 changes: 8 additions & 0 deletions
8
test/integration/simple-deployment-sanitize-version-number/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,8 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: test | ||
name: test | ||
status: | ||
readyReplicas: 1 |
40 changes: 40 additions & 0 deletions
40
test/integration/simple-deployment-sanitize-version-number/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,40 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: pre-deployment-hello | ||
spec: | ||
function: | ||
inline: | ||
code: | | ||
console.log("Pre-Deployment Task has been executed"); | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: test | ||
name: test | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: test | ||
strategy: {} | ||
template: | ||
metadata: | ||
labels: | ||
app: test | ||
annotations: | ||
keptn.sh/workload: waiter | ||
keptn.sh/version: "0.4.0_1" | ||
keptn.sh/pre-deployment-tasks: pre-deployment-hello | ||
keptn.sh/post-deployment-tasks: pre-deployment-hello | ||
spec: | ||
containers: | ||
- image: busybox | ||
name: busybox | ||
command: ['sh', '-c', 'echo The app is running! && sleep infinity'] | ||
initContainers: | ||
- name: init-myservice | ||
image: busybox:1.36.1 | ||
command: ['sh', '-c', 'sleep 30'] |
4 changes: 4 additions & 0 deletions
4
test/integration/simple-deployment-sanitize-version-number/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/v1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl annotate ns $NAMESPACE keptn.sh/lifecycle-toolkit='enabled' |
38 changes: 38 additions & 0 deletions
38
test/integration/simple-deployment-sanitize-version-number/01-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,38 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnWorkload | ||
metadata: | ||
name: waiter-waiter | ||
|
||
--- | ||
|
||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnWorkloadInstance | ||
metadata: | ||
name: waiter-waiter-0.4.0-1 | ||
status: | ||
currentPhase: Completed | ||
deploymentStatus: Succeeded | ||
postDeploymentEvaluationStatus: Succeeded | ||
postDeploymentStatus: Succeeded | ||
postDeploymentTaskStatus: | ||
- status: Succeeded | ||
definitionName: pre-deployment-hello | ||
preDeploymentEvaluationStatus: Succeeded | ||
preDeploymentStatus: Succeeded | ||
preDeploymentTaskStatus: | ||
- status: Succeeded | ||
definitionName: pre-deployment-hello | ||
|
||
--- | ||
|
||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnApp | ||
metadata: | ||
name: waiter | ||
|
||
--- | ||
|
||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnAppVersion | ||
metadata: | ||
name: waiter-62c130d876-6b86b273 |