Changed deployment to statefulset in both PMC and ECS.
"Even Deployments with one replica using ReadWriteOnce volume are not recommended. This is because the default Deployment strategy creates a second Pod before bringing down the first Pod
on a recreate. The Deployment may fail in deadlock as the second Pod can't start because the ReadWriteOnce volume is already in use, and the first Pod won't be removed because the seco
nd Pod has not yet started. Instead, use a StatefulSet with ReadWriteOnce volumes."
Change-Id: If3afb358e9a111bf2be0d5ceb9c5a70c314a9222
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-478
# limitations under the License. #
################################################################################
# limitations under the License. #
################################################################################
apiVersion: apps/v1
metadata:
name: {{ include "common.name.enrichmentservice" . }}
apiVersion: apps/v1
metadata:
name: {{ include "common.name.enrichmentservice" . }}
annotations:
deployment.kubernetes.io/revision: '1'
spec:
annotations:
deployment.kubernetes.io/revision: '1'
spec:
+ serviceName: {{ include "common.name.enrichmentservice" . }}
replicas: 1
selector:
matchLabels:
replicas: 1
selector:
matchLabels:
- name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
mountPath: /opt/app/enrichment-coordinator-service/config
- name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
- name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
mountPath: /opt/app/enrichment-coordinator-service/config
- name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
- mountPath: /var/enrichment-coordinator-service/database
+ mountPath: /var/enrichment-coordinator-service
volumes:
- name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
configMap:
name: {{ include "common.name.enrichmentservice" . }}-configmap
- name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
persistentVolumeClaim:
volumes:
- name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
configMap:
name: {{ include "common.name.enrichmentservice" . }}-configmap
- name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
persistentVolumeClaim:
- claimName: {{ include "common.name.enrichmentservice" . }}-pvc
\ No newline at end of file
+ claimName: {{ include "common.name.enrichmentservice" . }}-pvc
# limitations under the License. #
################################################################################
# limitations under the License. #
################################################################################
apiVersion: apps/v1
metadata:
name: {{ include "common.name.policymanagementservice" . }}
apiVersion: apps/v1
metadata:
name: {{ include "common.name.policymanagementservice" . }}
annotations:
deployment.kubernetes.io/revision: '1'
spec:
annotations:
deployment.kubernetes.io/revision: '1'
spec:
+ serviceName: {{ include "common.name.policymanagementservice" . }}
replicas: 1
selector:
matchLabels:
replicas: 1
selector:
matchLabels:
periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }}
volumeMounts:
- name: {{ include "common.name.policymanagementservice" . }}-vardata
periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }}
volumeMounts:
- name: {{ include "common.name.policymanagementservice" . }}-vardata
- mountPath: "/var/policy-management-service/database"
+ mountPath: "/var/policy-management-service"
- name: {{ include "common.name.policymanagementservice" . }}-policy-config
mountPath: /opt/app/policy-agent/config
- name: {{ include "common.name.policymanagementservice" . }}-policy-data
- name: {{ include "common.name.policymanagementservice" . }}-policy-config
mountPath: /opt/app/policy-agent/config
- name: {{ include "common.name.policymanagementservice" . }}-policy-data
- mountPath: /opt/app/policy-agent/data
+ mountPath: /opt/app/policy-agent/data
volumes:
- name: {{ include "common.name.policymanagementservice" . }}-policy-config
configMap:
volumes:
- name: {{ include "common.name.policymanagementservice" . }}-policy-config
configMap: