Issue Add elector to cp-api-srv deployment
@@ -17,6 +17,25 @@ spec:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
+ - name: cp-api-srv-leader-elector
+ image: cp-leader-elector
+ imagePullPolicy: "Always"
+ securityContext:
+ privileged: true
+ command: [ "/elector/init" ]
+ ports:
+ - containerPort: 4040
+ env:
+ - name: SERVICE_NAME
+ value: "cp-api-srv"
+ - name: HA_ELECTION_PERIOD_SEC
+ value: "10"
+ - name: HA_VOTE_EXPIRATION_PERIOD_SEC
+ value: "15"
+ envFrom:
+ - configMapRef:
+ name: cp-config-global
+
- name: cp-api-srv
image: lifescience/cloud-pipeline:api-srv-$CP_VERSION
imagePullPolicy: "Always"
