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 + + 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/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'