Modified zk framework version to create svc with the correct format
@@ -15,19 +15,12 @@ spec:
defaults.config:
ZOOKEEPER_MEM: "1Gi"
ZOOKEEPER_CPUS: "0.25"
- plans:
- deploy:
- strategy: serial
- phases:
- - name: zookeeper
- strategy: parallel
- steps:
- - name: everything
- mustache: |
+ templates:
+ services.yaml: |
apiVersion: v1
kind: Service
metadata:
- name: {{NAME}}-hs
+ name: hs
namespace: {{NAMESPACE}}
labels:
app: zookeeper
@@ -46,7 +39,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
- name: {{NAME}}-cs
+ name: cs
namespace: {{NAMESPACE}}
labels:
app: zookeeper
@@ -58,7 +51,7 @@ spec:
selector:
app: zookeeper
zookeeper: {{NAME}}
- ---
+ pdb.yaml: |
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
@@ -73,7 +66,7 @@ spec:
app: zookeeper
zookeeper: {{NAME}}
maxUnavailable: 1
- ---
+ statefulset.yaml: |
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -84,7 +77,7 @@ spec:
matchLabels:
app: zookeeper
zookeeper: {{NAME}}
- serviceName: zk-hs
+ serviceName: hs
replicas: 3
updateStrategy:
type: RollingUpdate
@@ -161,26 +154,37 @@ spec:
resources:
requests:
storage: 2Gi
- - name: validation
+ validation.yaml: |
+ #make a job that runs successfully when up and running
+ tasks:
+ infra:
+ resources:
+ - services.yaml
+ - pdb.yaml
+ app:
+ resources:
+ - statefulset.yaml
+ validation:
+ resources:
+ - validation.yaml
+ plans:
+ deploy:
+ strategy: serial
+ phases:
+ - name: zookeeper
strategy: parallel
steps:
- - name: something
- mustache: |
- apiVersion: v1
- kind: Service
- metadata:
- name: something-service
- namespace: {{NAMESPACE}}
- labels:
- app: zookeeper
- zookeeper: {{NAME}}
- spec:
- ports:
- - port: 2888
- name: server
- - port: 3888
- name: leader-election
- clusterIP: None
- selector:
- app: zookeeper
- zookeeper: {{NAME}}
+ - name: everything
+ tasks:
+ - infra
+ - app
+ validation:
+ strategy: serial
+ phases:
+ - name: connection
+ strategy: parallel
+ steps:
+ - name: connection
+ tasks:
+ - validation
+
