Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add example files for day 2 operations docs PR #2365

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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