Skip to content

Commit

Permalink
Small improvements to manifest templates (#198)
Browse files Browse the repository at this point in the history
Issue #, if available:

Description of changes:
* Add name to containerPort (aws-controllers-k8s/s3-controller#48)
* Add namespace to ServiceAccount (aws-controllers-k8s/s3-controller#47)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
twz123 authored Sep 21, 2021
1 parent c5e12cf commit 167669c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion templates/config/controller/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ spec:
image: controller:latest
name: controller
ports:
- containerPort: 8080
- name: http
containerPort: 8080
resources:
limits:
cpu: 100m
Expand Down
4 changes: 2 additions & 2 deletions templates/config/controller/service.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
ports:
- name: metricsport
port: 8080
targetPort: 8080
targetPort: http
protocol: TCP
type: NodePort
type: NodePort
3 changes: 2 additions & 1 deletion templates/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ spec:
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
name: controller
ports:
- containerPort: {{ .Values.deployment.containerPort }}
- name: http
containerPort: {{ .Values.deployment.containerPort }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
env:
Expand Down
4 changes: 2 additions & 2 deletions templates/helm/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ spec:
ports:
- name: metricsport
port: 8080
targetPort: 8080
targetPort: http
protocol: TCP
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion templates/helm/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ metadata:
k8s-app: {{ include "app.name" . }}
helm.sh/chart: {{ include "chart.name-version" . }}
name: {{ include "service-account.name" . }}
namespace: {{ .Release.Namespace }}
annotations:
{{- range $key, $value := .Values.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 167669c

Please sign in to comment.