From 5614a26f0f7187056c09784008ee67a84d23eb79 Mon Sep 17 00:00:00 2001 From: Donislav Belev Date: Wed, 17 Jun 2020 09:51:42 +0300 Subject: [PATCH] Add EKS configs --- ...ontent-collection-mapper_eks_delivery.yaml | 12 ++++ .../templates/deployment.yaml | 68 ++++++++++--------- .../values.yaml | 1 + 3 files changed, 49 insertions(+), 32 deletions(-) create mode 100644 helm/upp-next-video-content-collection-mapper/app-configs/upp-next-video-content-collection-mapper_eks_delivery.yaml diff --git a/helm/upp-next-video-content-collection-mapper/app-configs/upp-next-video-content-collection-mapper_eks_delivery.yaml b/helm/upp-next-video-content-collection-mapper/app-configs/upp-next-video-content-collection-mapper_eks_delivery.yaml new file mode 100644 index 0000000..f6b60e8 --- /dev/null +++ b/helm/upp-next-video-content-collection-mapper/app-configs/upp-next-video-content-collection-mapper_eks_delivery.yaml @@ -0,0 +1,12 @@ +# Values used for the deployed application. +replicaCount: 2 +service: + name: upp-next-video-content-collection-mapper +eksCluster: true +env: + APP_NAME: "Next Video Content Collection Mapper" + APP_SYSTEM_CODE: upp-next-video-cc-mapper + APP_PORT: 8080 + Q_GROUP: NextVideoContentCollectionMapper + Q_READ_TOPIC: NativeCmsPublicationEvents + Q_WRITE_TOPIC: CmsPublicationEvents diff --git a/helm/upp-next-video-content-collection-mapper/templates/deployment.yaml b/helm/upp-next-video-content-collection-mapper/templates/deployment.yaml index 57a3400..7916693 100644 --- a/helm/upp-next-video-content-collection-mapper/templates/deployment.yaml +++ b/helm/upp-next-video-content-collection-mapper/templates/deployment.yaml @@ -1,22 +1,26 @@ +{{- if .Values.eksCluster }} +apiVersion: apps/v1 +{{- else }} apiVersion: extensions/v1beta1 +{{- end }} kind: Deployment metadata: - name: {{ .Values.service.name }} + name: {{ .Values.service.name }} labels: chart: "{{ .Chart.Name | trunc 63 }}" - chartVersion: "{{ .Chart.Version | trunc 63 }}" - visualize: "true" - app: {{ .Values.service.name }} + chartVersion: "{{ .Chart.Version | trunc 63 }}" + visualize: "true" + app: {{ .Values.service.name }} spec: - replicas: {{ .Values.replicaCount }} - selector: + replicas: {{ .Values.replicaCount }} + selector: matchLabels: app: {{ .Values.service.name }} template: metadata: labels: app: {{ .Values.service.name }} - visualize: "true" + visualize: "true" spec: affinity: podAntiAffinity: @@ -29,41 +33,41 @@ spec: - {{ .Values.service.name }} topologyKey: "kubernetes.io/hostname" containers: - - name: {{ .Values.service.name }} + - name: {{ .Values.service.name }} image: "{{ .Values.image.repository }}:{{ .Chart.Version }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: APP_NAME + env: + - name: APP_NAME value: "{{ .Values.env.APP_NAME }}" - - name: APP_SYSTEM_CODE + - name: APP_SYSTEM_CODE value: "{{ .Values.env.APP_SYSTEM_CODE }}" - - name: SERVICE_NAME + - name: SERVICE_NAME value: "{{ .Values.service.name }}" - - name: APP_PORT + - name: APP_PORT value: "{{ .Values.env.APP_PORT }}" - - name: Q_GROUP + - name: Q_GROUP value: "{{ .Values.env.Q_GROUP }}" - - name: Q_READ_TOPIC + - name: Q_READ_TOPIC value: "{{ .Values.env.Q_READ_TOPIC }}" - - name: Q_WRITE_TOPIC + - name: Q_WRITE_TOPIC value: "{{ .Values.env.Q_WRITE_TOPIC }}" - - name: Q_ADDR - valueFrom: - configMapKeyRef: - name: global-config - key: kafka.proxy.url.with.protocol - ports: - - containerPort: 8080 - livenessProbe: - tcpSocket: - port: 8080 + - name: Q_ADDR + valueFrom: + configMapKeyRef: + name: global-config + key: kafka.proxy.url.with.protocol + ports: + - containerPort: 8080 + livenessProbe: + tcpSocket: + port: 8080 initialDelaySeconds: 5 - readinessProbe: - httpGet: - path: "/__gtg" - port: 8080 + readinessProbe: + httpGet: + path: "/__gtg" + port: 8080 initialDelaySeconds: 10 - periodSeconds: 30 - resources: + periodSeconds: 30 + resources: {{ toYaml .Values.resources | indent 12 }} diff --git a/helm/upp-next-video-content-collection-mapper/values.yaml b/helm/upp-next-video-content-collection-mapper/values.yaml index 87b0417..1b44378 100644 --- a/helm/upp-next-video-content-collection-mapper/values.yaml +++ b/helm/upp-next-video-content-collection-mapper/values.yaml @@ -5,6 +5,7 @@ service: name: "" # The name of the service, should be defined in the specific app-configs folder. hasHealthcheck: "true" isResilient: "false" +eksCluster: false replicaCount: 2 image: repository: coco/upp-next-video-content-collection-mapper