Skip to content

Commit

Permalink
Add EKS configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbelev authored and bboykov committed Jul 21, 2020
1 parent 64378ed commit 3bc947e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Values used for the deployed application.
replicaCount: 2
service:
name: upp-next-video-mapper
eksCluster: true
env:
APP_NAME: next-video-mapper
Q_GROUP: nextVideoMapper
Q_READ_TOPIC: NativeCmsPublicationEvents
Q_WRITE_TOPIC: CmsPublicationEvents
62 changes: 33 additions & 29 deletions helm/upp-next-video-mapper/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -28,36 +32,36 @@ spec:
values:
- {{ .Values.service.name }}
topologyKey: "kubernetes.io/hostname"
containers:
- name: {{ .Values.service.name }}
containers:
- name: {{ .Values.service.name }}
image: "{{ .Values.image.repository }}:{{ .Chart.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: APP_NAME
env:
- name: APP_NAME
value: "{{ .Values.service.name }}"
- 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
- name: Q_ADDR
valueFrom:
configMapKeyRef:
name: global-config
key: kafka.proxy.url.with.protocol
ports:
- containerPort: 8080
livenessProbe:
tcpSocket:
port: 8080
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 }}

1 change: 1 addition & 0 deletions helm/upp-next-video-mapper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-mapper
Expand Down

0 comments on commit 3bc947e

Please sign in to comment.