From e36c4e7c825b3994820fff756baf8fc39f9f3d2f Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 30 Oct 2023 13:59:51 +0100 Subject: [PATCH 1/2] docs: add example files for day 2 operations docs PR Signed-off-by: Florian Bacher --- .../assets/app-updated-version.yaml | 16 +++++++ .../assets/app-with-new-workload.yaml | 18 ++++++++ .../assets/deployment-initial.yaml | 44 +++++++++++++++++++ .../deployment-new-image-and-version.yaml | 18 ++++++++ .../assets/deployment-new-image.yaml | 18 ++++++++ .../assets/new-deployment.yaml | 16 +++++++ 6 files changed, 130 insertions(+) create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/app-updated-version.yaml create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/app-with-new-workload.yaml create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image-and-version.yaml create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image.yaml create mode 100644 docs/content/en/docs/implementing/day-2-operations/assets/new-deployment.yaml diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/app-updated-version.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/app-updated-version.yaml new file mode 100644 index 0000000000..0a0b04f758 --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/app-updated-version.yaml @@ -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 diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/app-with-new-workload.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/app-with-new-workload.yaml new file mode 100644 index 0000000000..694e379b7c --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/app-with-new-workload.yaml @@ -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 diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml new file mode 100644 index 0000000000..69b0bb2b5a --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml @@ -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 \ No newline at end of file diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image-and-version.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image-and-version.yaml new file mode 100644 index 0000000000..70b48d3a5d --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image-and-version.yaml @@ -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' diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image.yaml new file mode 100644 index 0000000000..64bbb7541f --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-new-image.yaml @@ -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' diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/new-deployment.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/new-deployment.yaml new file mode 100644 index 0000000000..51d0abb165 --- /dev/null +++ b/docs/content/en/docs/implementing/day-2-operations/assets/new-deployment.yaml @@ -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 From 9c09f0a4c2fa127a09630222ee6f738a922426d5 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 30 Oct 2023 14:04:09 +0100 Subject: [PATCH 2/2] fix yaml lint Signed-off-by: Florian Bacher --- .../day-2-operations/assets/deployment-initial.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml index 69b0bb2b5a..14afc57b4b 100644 --- a/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml +++ b/docs/content/en/docs/implementing/day-2-operations/assets/deployment-initial.yaml @@ -41,4 +41,4 @@ spec: spec: containers: - name: podtato-head-hat - image: podtato-head-hat:a \ No newline at end of file + image: podtato-head-hat:a