Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support imagePullSecrets on the service account as well as the deployment #28

2 changes: 1 addition & 1 deletion charts/pact-broker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pact-broker
description: The Pact Broker is an application for sharing for Pact contracts and verification results.
type: application
version: 0.5.2
version: 0.6.0
appVersion: 2.105.0.1
dependencies:
- condition: postgresql.enabled
Expand Down
3 changes: 2 additions & 1 deletion charts/pact-broker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pact-broker

![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.105.0.1](https://img.shields.io/badge/AppVersion-2.105.0.1-informational?style=flat-square)
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.105.0.1](https://img.shields.io/badge/AppVersion-2.105.0.1-informational?style=flat-square)

The Pact Broker is an application for sharing for Pact contracts and verification results.

Expand Down Expand Up @@ -185,6 +185,7 @@ helm upgrade -i <release_name> oci://ghcr.io/pact-foundation/pact-broker-chart/p
| serviceAccount.annotations | Additional custom annotations for the ServiceAccount. | object | `{}` |
| serviceAccount.automountServiceAccountToken | Auto-mount the service account token in the pod | bool | `true` |
| serviceAccount.create | Enable the creation of a ServiceAccount for Pact Broker pods | bool | `true` |
| serviceAccount.imagePullSecrets | Name of image pull secrets that should be attached to the service account | list | `[]` |
| serviceAccount.labels | Additional custom labels to the service ServiceAccount. | object | `{}` |
| serviceAccount.name | Name of the created ServiceAccount If not set and `serviceAccount.create` is true, a name is generated | string | `"broker-sa"` |

Expand Down
20 changes: 14 additions & 6 deletions charts/pact-broker/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
{{- if .Values.serviceAccount.create }}
{{- with .Values.serviceAccount }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
name: {{ .name }}
ChrisJBurns marked this conversation as resolved.
Show resolved Hide resolved
namespace: {{ $.Release.Namespace }}
labels:
app.kubernetes.io/component: pact-broker
{{- with .Values.serviceAccount.labels }}
{{- with .labels }}
{{ toYaml . | trim | indent 8 }}
{{- end }}
{{- if .Values.serviceAccount.annotations }}
{{- if .annotations }}
annotations:
{{- with .Values.serviceAccount.annotations }}
{{- with .annotations }}
{{ toYaml . | trim | indent 8 }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
automountServiceAccountToken: {{ .automountServiceAccountToken }}
{{- if .imagePullSecrets }}
imagePullSecrets:
{{- range .imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/pact-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -498,3 +498,6 @@ serviceAccount:

# -- Auto-mount the service account token in the pod
automountServiceAccountToken: true

# -- Name of image pull secrets that should be attached to the service account
imagePullSecrets: []