Skip to content

Commit

Permalink
docs: add example files for day 2 operations docs PR (#2365)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
  • Loading branch information
bacherfl committed Oct 30, 2023
1 parent a9da96a commit 7cdcada
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnApp
metadata:
name: podtato-head
namespace: podtato-kubectl
spec:
version: "0.1.0"
preDeploymentTasks:
- wait-for-prometheus
postDeploymentTasks:
- post-deployment-loadtests
workloads:
- name: podtato-head-frontend
version: 0.2.0 # Updated version. Needs to be set to the value of the 'app.kubernetes.io/version' label of the updated deployment
- name: podtato-head-hat
version: 1.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnApp
metadata:
name: podtato-head
namespace: podtato-kubectl
spec:
version: "0.1.0"
preDeploymentTasks:
- wait-for-prometheus
postDeploymentTasks:
- post-deployment-loadtests
workloads:
- name: podtato-head-frontend
version: 0.1.0
- name: podtato-head-hat
version: 1.1.1
- name: podtato-head-left-leg # The newly added workload
version: 0.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: v1
kind: Namespace
metadata:
name: podtato-kubectl
annotations:
keptn.sh/lifecycle-toolkit: "enabled"

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-frontend
namespace: podtato-kubectl
spec:
template:
metadata:
labels:
app.kubernetes.io/name: podtato-head-frontend
app.kubernetes.io/part-of: podtato-head
app.kubernetes.io/version: 0.1.0
keptn.sh/pre-deployment-evaluations: my-evaluation
keptn.sh/pre-deployment-tasks: my-task
spec:
containers:
- name: podtato-head-frontend
image: podtato-head-frontend:a
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-hat
namespace: podtato-kubectl
spec:
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: podtato-head-hat
app.kubernetes.io/part-of: podtato-head
app.kubernetes.io/version: 0.1.1
spec:
containers:
- name: podtato-head-hat
image: podtato-head-hat:a
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-frontend
namespace: podtato-kubectl
spec:
template:
metadata:
labels:
app.kubernetes.io/name: podtato-head-frontend
app.kubernetes.io/part-of: podtato-head
app.kubernetes.io/version: 0.2.0 # The version label is now updated as well
keptn.sh/pre-deployment-evaluations: my-evaluation
keptn.sh/pre-deployment-tasks: my-task
spec:
containers:
- name: podtato-head-frontend
image: podtato-head-frontend:b # The image tag has been updated from 'a' to 'b'
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-frontend
namespace: podtato-kubectl
spec:
template:
metadata:
labels:
app.kubernetes.io/name: podtato-head-frontend
app.kubernetes.io/part-of: podtato-head
app.kubernetes.io/version: 0.1.0 # The version label stays the same and therefore no related KeptnWorkload will be affected
keptn.sh/pre-deployment-evaluations: my-evaluation
keptn.sh/pre-deployment-tasks: my-task
spec:
containers:
- name: podtato-head-frontend
image: podtato-head-frontend:b # Only the image tag has been updated from 'a' to 'b'
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-left-leg
namespace: podtato-kubectl
spec:
template:
metadata:
labels:
app.kubernetes.io/name: podtato-head-left-leg
app.kubernetes.io/part-of: podtato-head
app.kubernetes.io/version: 0.1.0
spec:
containers:
- name: podtato-head-frontend
image: podtato-head-left-leg:a

0 comments on commit 7cdcada

Please sign in to comment.