-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>
- Loading branch information
Thomas Schuetz
committed
Mar 15, 2023
1 parent
8f75d9a
commit ba856c7
Showing
7 changed files
with
174 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# renovate: datasource=github-tags depName=keptn/lifecycle-toolkit | ||
KEPTN_VERSION ?= v0.6.0 | ||
|
||
.PHONY: install | ||
install: | ||
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/$(KEPTN_VERSION)/manifest.yaml | ||
|
||
.PHONY: uninstall | ||
uninstall: | ||
kubectl delete -f https://github.com/keptn/lifecycle-toolkit/releases/download/$(KEPTN_VERSION)/manifest.yaml | ||
|
||
.PHONY: deploy-sample | ||
deploy-sample: | ||
kustomize build ./app | kubectl apply -f - | ||
|
||
.PHONY: test | ||
test: install deploy-sample | ||
kubectl kuttl test --start-kind=false ./kuttl --config=./kuttl/kuttl-test.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,16 @@ | ||
# Deliver with Keptn | ||
![Keptn](https://img.shields.io/badge/Keptn-v0.6.0-blue) | ||
![PodTatoHead](https://img.shields.io/badge/PodTatoHead-v0.3.0-orange) | ||
|
||
## Pre-requisites | ||
* Kubernetes cluster >= 1.24 installed | ||
|
||
## Deliver | ||
Keptn hooks in the delivery process by injecting a scheduler and observes the deployment process. Furthermore, pre- & post-deployment tests can be executed and evaluations can be performed to ensure the quality of the service. This can be done on a Workload (Deployment, StatefulSet, DaemonSet, etc.) or on an Application Level (e.g., the whole podtato-head application). | ||
|
||
## Install Keptn | ||
Keptn itself is installed using a Kubernetes manifest or a Helm chart. In this example, we will use the manifest to install Keptn. This can be installed using the following command: | ||
|
||
```console | ||
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.6.0/manifest.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,20 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha2 | ||
kind: KeptnApp | ||
metadata: | ||
name: podtato-head | ||
namespace: podtato-kubectl | ||
spec: | ||
version: "0.1.0" | ||
workloads: | ||
- name: podtato-head-left-arm | ||
version: 0.3.0 | ||
- name: podtato-head-left-leg | ||
version: 0.3.0 | ||
- name: podtato-head-frontend | ||
version: 0.3.0 | ||
- name: podtato-head-right-arm | ||
version: 0.3.0 | ||
- name: podtato-head-right-leg | ||
version: 0.3.0 | ||
- name: podtato-head-hat | ||
version: 0.3.0 |
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,7 @@ | ||
resources: | ||
- https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.0/manifest.yaml | ||
- app.yaml | ||
|
||
patchesStrategicMerge: | ||
- manifest.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,90 @@ | ||
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.3.0 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-hat | ||
namespace: podtato-kubectl | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: podtato-head-hat | ||
app.kubernetes.io/part-of: podtato-head | ||
app.kubernetes.io/version: 0.3.0 | ||
|
||
--- | ||
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.3.0 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-right-leg | ||
namespace: podtato-kubectl | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: podtato-head-right-leg | ||
app.kubernetes.io/part-of: podtato-head | ||
app.kubernetes.io/version: 0.3.0 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-left-arm | ||
namespace: podtato-kubectl | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: podtato-head-left-arm | ||
app.kubernetes.io/part-of: podtato-head | ||
app.kubernetes.io/version: 0.3.0 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: podtato-head-right-arm | ||
namespace: podtato-kubectl | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: podtato-head-right-arm | ||
app.kubernetes.io/part-of: podtato-head | ||
app.kubernetes.io/version: 0.3.0 |
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,7 @@ | ||
apiVersion: kuttl.dev/v1 | ||
kind: TestSuite | ||
testDirs: | ||
- ./test | ||
timeout: 400 | ||
skipDelete: true | ||
namespace: podtato-kubectl |
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,13 @@ | ||
apiVersion: lifecycle.keptn.sh/v1alpha2 | ||
kind: KeptnAppVersion | ||
metadata: | ||
name: podtato-head-0.1.0-1 | ||
namespace: podtato-kubectl | ||
status: | ||
currentPhase: Completed | ||
postDeploymentEvaluationStatus: Succeeded | ||
postDeploymentStatus: Succeeded | ||
preDeploymentEvaluationStatus: Succeeded | ||
preDeploymentStatus: Succeeded | ||
status: Succeeded | ||
workloadOverallStatus: Succeeded |