From 65274981b9b86ac65f8c1bc50c5bb6c9dcea0dc8 Mon Sep 17 00:00:00 2001 From: Brent Langston Date: Mon, 1 Oct 2018 08:37:27 -0500 Subject: [PATCH 1/3] initial helm chart --- helm/Chart.yaml | 5 +++++ helm/templates/deployment.yaml | 34 ++++++++++++++++++++++++++++++++++ helm/templates/ingress.yaml | 8 ++++++++ helm/templates/service.yaml | 12 ++++++++++++ helm/values.yaml | 2 ++ 5 files changed, 61 insertions(+) create mode 100644 helm/Chart.yaml create mode 100644 helm/templates/deployment.yaml create mode 100644 helm/templates/ingress.yaml create mode 100644 helm/templates/service.yaml create mode 100644 helm/values.yaml diff --git a/helm/Chart.yaml b/helm/Chart.yaml new file mode 100644 index 0000000..38f86c3 --- /dev/null +++ b/helm/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: Frontend Container Demo +name: ecsdemo-frontend +version: 0.1.0 diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml new file mode 100644 index 0000000..d608030 --- /dev/null +++ b/helm/templates/deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ecsdemo-frontend + labels: + app: ecsdemo-frontend + namespace: default +spec: + replicas: {{ .Values.replica }} + selector: + matchLabels: + app: ecsdemo-frontend + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: ecsdemo-frontend + spec: + containers: + - image: brentley/ecsdemo-frontend:{{ .Values.version }} + imagePullPolicy: Always + name: ecsdemo-frontend + ports: + - containerPort: 3000 + protocol: TCP + env: + - name: CRYSTAL_URL + value: "http://ecsdemo-crystal.default.svc.cluster.local/crystal" + - name: NODEJS_URL + value: "http://ecsdemo-nodejs.default.svc.cluster.local/" diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml new file mode 100644 index 0000000..e485bd0 --- /dev/null +++ b/helm/templates/ingress.yaml @@ -0,0 +1,8 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: ecsdemo-frontend +spec: + backend: + serviceName: ecsdemo-frontend + servicePort: 80 diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml new file mode 100644 index 0000000..2b1d4f4 --- /dev/null +++ b/helm/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: ecsdemo-frontend +spec: + selector: + app: ecsdemo-frontend + type: LoadBalancer + ports: + - protocol: TCP + port: 80 + targetPort: 3000 diff --git a/helm/values.yaml b/helm/values.yaml new file mode 100644 index 0000000..d43e461 --- /dev/null +++ b/helm/values.yaml @@ -0,0 +1,2 @@ +replica: 3 +version: 'latest' From 96cf8929d12976b01737956029cbc0f733c4276b Mon Sep 17 00:00:00 2001 From: Brent Langston Date: Mon, 1 Oct 2018 11:26:41 -0500 Subject: [PATCH 2/3] removing ingress since we just use service --- helm/templates/ingress.yaml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 helm/templates/ingress.yaml diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml deleted file mode 100644 index e485bd0..0000000 --- a/helm/templates/ingress.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: ecsdemo-frontend -spec: - backend: - serviceName: ecsdemo-frontend - servicePort: 80 From 45ee0816eabb2d14bb73d83d5b6dbb239f98c995 Mon Sep 17 00:00:00 2001 From: Brent Langston Date: Tue, 2 Oct 2018 13:20:08 -0500 Subject: [PATCH 3/3] noop --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eba9ef6..dd54c7c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,5 @@ # Amazon Containers Workshop This is part of an Amazon Containers workshop at https://ecsworkshop.com or https://eksworkshop.com + +