forked from keptn/lifecycle-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lifecycle-operator): introduce option to enable lifecycle orches…
…tration only for specific namespaces (keptn#2244) Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com> Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Co-authored-by: Meg McRoberts <meg.mcroberts@dynatrace.com>
- Loading branch information
1 parent
c2cc89a
commit 12caf03
Showing
23 changed files
with
277 additions
and
32 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
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
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
9 changes: 9 additions & 0 deletions
9
test/allowed-namespaces/simple-deployment-allowed/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,9 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: test | ||
name: test | ||
namespace: allowed-ns-test | ||
status: | ||
readyReplicas: 2 |
43 changes: 43 additions & 0 deletions
43
test/allowed-namespaces/simple-deployment-allowed/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,43 @@ | ||
--- | ||
apiVersion: lifecycle.keptn.sh/v1alpha3 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: pre-deployment-hello | ||
namespace: allowed-ns-test | ||
spec: | ||
function: | ||
inline: | ||
code: | | ||
console.log("Pre-Deployment Task has been executed"); | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: test | ||
name: test | ||
namespace: allowed-ns-test | ||
annotations: | ||
keptn.sh/workload: waiter | ||
keptn.sh/version: "0.4" | ||
keptn.sh/pre-deployment-tasks: pre-deployment-hello | ||
keptn.sh/post-deployment-tasks: pre-deployment-hello | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: test | ||
strategy: {} | ||
template: | ||
metadata: | ||
labels: | ||
app: test | ||
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 10'] |
5 changes: 5 additions & 0 deletions
5
test/allowed-namespaces/simple-deployment-allowed/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,5 @@ | ||
apiVersion: kuttl.dev/v1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl create ns allowed-ns-test | ||
- script: kubectl annotate ns allowed-ns-test keptn.sh/lifecycle-toolkit='enabled' |
Oops, something went wrong.