Tidy up the examples repo + add a Helm hooks examples (#40)
This commit is contained in:
1 parent
5c2d89b897
commit
94ad32f4ea
8 files changed
+126
-16
No files matched your search
@@ -0,0 +1,82 @@
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
generateName: upgrade-sql-schema
|
||||
annotations:
|
||||
helm.sh/hook: pre-install
|
||||
helm.sh/hook-weight: "-2"
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: upgrade-sql-schema
|
||||
image: alpine:latest
|
||||
command: ["sleep", "5"]
|
||||
restartPolicy: Never
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: maint-page-up
|
||||
annotations:
|
||||
helm.sh/hook: pre-install
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "-1"
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: page-up
|
||||
image: alpine:latest
|
||||
command: ["sleep", "2"]
|
||||
restartPolicy: Never
|
||||
backoffLimit: 0
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: ReplicaSet
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
tier: frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: nginx:latest
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
annotations:
|
||||
helm.sh/hook-weight: "2"
|
||||
spec:
|
||||
selector:
|
||||
tier: frontend
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: maint-page-down
|
||||
annotations:
|
||||
helm.sh/hook: post-install
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: page-down
|
||||
image: alpine:latest
|
||||
command: ["sleep", "2"]
|
||||
restartPolicy: Never
|
||||
Reference in new issue
Block a user