diff --git a/helm/k8s-pub-path-routing-varnish/app-configs/k8s-pub-path-routing-varnish_eks_publish.yaml b/helm/k8s-pub-path-routing-varnish/app-configs/k8s-pub-path-routing-varnish_eks_publish.yaml new file mode 100644 index 0000000..87ea0a9 --- /dev/null +++ b/helm/k8s-pub-path-routing-varnish/app-configs/k8s-pub-path-routing-varnish_eks_publish.yaml @@ -0,0 +1,7 @@ +# Values used for the deployed application. +replicaCount: 2 +service: + name: path-routing-varnish + +eksCluster: true + diff --git a/helm/k8s-pub-path-routing-varnish/templates/deployment.yaml b/helm/k8s-pub-path-routing-varnish/templates/deployment.yaml index 52717c0..c188183 100644 --- a/helm/k8s-pub-path-routing-varnish/templates/deployment.yaml +++ b/helm/k8s-pub-path-routing-varnish/templates/deployment.yaml @@ -1,23 +1,28 @@ +{{- 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: +{{- if not .Values.eksCluster }} affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -28,13 +33,14 @@ spec: values: - {{ .Values.service.name }} topologyKey: "kubernetes.io/hostname" - containers: - - name: {{ .Values.service.name }} +{{- end }} + containers: + - name: {{ .Values.service.name }} image: "{{ .Values.image.repository }}:{{ .Chart.Version }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: + ports: - containerPort: 80 - livenessProbe: - tcpSocket: + livenessProbe: + tcpSocket: port: 80 initialDelaySeconds: 5 diff --git a/helm/k8s-pub-path-routing-varnish/values.yaml b/helm/k8s-pub-path-routing-varnish/values.yaml index 5fd7d33..471e2ff 100644 --- a/helm/k8s-pub-path-routing-varnish/values.yaml +++ b/helm/k8s-pub-path-routing-varnish/values.yaml @@ -4,6 +4,9 @@ service: name: "" # The name of the service, should be defined in the specific app-configs folder. replicaCount: 2 + +eksCluster: false + image: repository: coco/k8s-pub-path-routing-varnish pullPolicy: IfNotPresent