Skip to content

Commit

Permalink
Merge branch 'master' into aslafy-z-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z committed Jul 6, 2023
2 parents 262e896 + a7c73a4 commit 748c86c
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

All notable changes to this project will be documented here.

### v2.1.16
### v2.1.17
- feat: allow overriding revisionHistoryLimit [PR-257](https://github.com/stakater/application/pull/257)

> Caution: This PR changes the default value for `revisionHistoryLimit` from 10 to 2.
### v2.1.16
- fix: optional service account [PR-213](https://github.com/stakater/application/pull/213)

### v2.1.15
- fix: allow setting arbitrary resource constraints [PR-255](https://github.com/stakater/application/pull/255)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Periodic probe of container liveness. Container will be restarted if the probe f
| service.annotations | Annotations for service | `{}` |
| service.ports | Ports for applications service | - port: 8080<br>&nbsp;&nbsp;name: http<br>&nbsp;&nbsp;protocol: TCP<br>&nbsp;&nbsp;targetPort: 8080 |
| service.type | Type of service | `ClusterIP` |
| service.clusterIP | Fixed IP for a ClusterIP service. Set to `None` for an headless service. | `null` |



Expand Down
2 changes: 1 addition & 1 deletion application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application

# Helm chart Version

version: 2.1.15
version: 2.1.16


keywords:
Expand Down
6 changes: 4 additions & 2 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.rbac.serviceAccount.enabled }}
{{- if .Values.rbac.serviceAccount.name }}
serviceAccountName: {{ .Values.rbac.serviceAccount.name }}
{{- else }}
serviceAccountName: {{ template "application.name" . }}
{{- else }}
serviceAccountName: {{ template "application.name" $ }}
{{- end }}
{{- end }}
{{- end }}
26 changes: 26 additions & 0 deletions application/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,29 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: example-image:example-tag@sha256:example-digest

- it: yields empty service account name when disabled
set:
rbac.serviceAccount.enabled: false
asserts:
- notExists:
path: spec.template.spec.serviceAccountName

- it: uses service account name override when present
set:
rbac.serviceAccount.enabled: true
rbac.serviceAccount.name: example-sa
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: example-sa

- it: uses a generated service account name when not given
set:
applicationName: example-app
rbac.serviceAccount.enabled: true
rbac.serviceAccount.name: ""
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: example-app
2 changes: 1 addition & 1 deletion application/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ rbac:
# Service Account to use by pods
serviceAccount:
enabled: true
name: ""
name: "application"

# Additional Labels on service account
additionalLabels:
Expand Down

0 comments on commit 748c86c

Please sign in to comment.