Skip to content

Commit

Permalink
feat: first podtatohead sample deployment manifests (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>
  • Loading branch information
thschue committed Sep 28, 2022
1 parent 6049eec commit 3e92d27
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 0 deletions.
301 changes: 301 additions & 0 deletions examples/podtatohead-deployment/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: podtato-kubectl
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-entry
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-entry
template:
metadata:
labels:
component: podtato-head-entry
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-entry
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/entry:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-entry
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-entry
ports:
- name: http
port: 9000
protocol: TCP
targetPort: 9000
type: LoadBalancer
# change to NodePort if no LoadBalancer controller is available
# type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-hat
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-hat
template:
metadata:
labels:
component: podtato-head-hat
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-hat
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/hat:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-hat
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-hat
ports:
- name: http
port: 9001
protocol: TCP
targetPort: 9000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-left-leg
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-left-leg
template:
metadata:
labels:
component: podtato-head-left-leg
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-left-leg
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/left-leg:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-left-leg
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-left-leg
ports:
- name: http
port: 9002
protocol: TCP
targetPort: 9000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-left-arm
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-left-arm
template:
metadata:
labels:
component: podtato-head-left-arm
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-left-arm
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/left-arm:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-left-arm
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-left-arm
ports:
- name: http
port: 9003
protocol: TCP
targetPort: 9000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-right-leg
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-right-leg
template:
metadata:
labels:
component: podtato-head-right-leg
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-right-leg
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/right-leg:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-right-leg
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-right-leg
ports:
- name: http
port: 9004
protocol: TCP
targetPort: 9000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-right-arm
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-right-arm
template:
metadata:
labels:
component: podtato-head-right-arm
annotations:
keptn.sh/app: podtato-head
keptn.sh/workload: podtato-head-right-arm
keptn.sh/version: 0.1.0
keptn.sh/pre-deployment-tasks: pre-deployment-hello
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: ghcr.io/podtato-head/right-arm:latest
imagePullPolicy: Always
ports:
- containerPort: 9000
env:
- name: PODTATO_PORT
value: "9000"
---
apiVersion: v1
kind: Service
metadata:
name: podtato-head-right-arm
namespace: podtato-kubectl
labels:
app: podtato-head
spec:
selector:
component: podtato-head-right-arm
ports:
- name: http
port: 9005
protocol: TCP
targetPort: 9000
type: ClusterIP
9 changes: 9 additions & 0 deletions examples/podtatohead-deployment/pre-deployment-tasks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: lifecycle.keptn.sh/v1alpha1
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-hello
spec:
function:
inline:
code: |
console.log("Pre-Deployment Task has been executed");

0 comments on commit 3e92d27

Please sign in to comment.