Skip to content

Commit ebfc81f

Browse files
authored
Breaking Change: Moves Broker Image settings (#197)
* moves image settings into broker object Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com> * updates docs Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com> * bumps chart Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com> * migration guide Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com> --------- Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
1 parent 033bb27 commit ebfc81f

7 files changed

Lines changed: 73 additions & 30 deletions

File tree

charts/pact-broker/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: pact-broker
33
description: The Pact Broker is an application for sharing for Pact contracts and verification results.
44
type: application
5-
version: 4.0.0
5+
version: 5.0.0
66
appVersion: 2.112.0
77
dependencies:
88
- name: common

charts/pact-broker/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pact-broker
22

3-
![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.112.0](https://img.shields.io/badge/AppVersion-2.112.0-informational?style=flat-square)
3+
![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.112.0](https://img.shields.io/badge/AppVersion-2.112.0-informational?style=flat-square)
44

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

@@ -122,6 +122,9 @@ helm upgrade -i <release_name> oci://ghcr.io/pact-foundation/pact-broker-chart/p
122122
| broker.containerSecurityContext.runAsNonRoot | Set Pact Broker container's Security Context runAsNonRoot | bool | `true` |
123123
| broker.containerSecurityContext.runAsUser | Set Pact Broker container's Security Context runAsUser | int | `1001` |
124124
| broker.extraContainers | Additional containers to add to the Pact Broker pods | list | `[]` |
125+
| broker.image | Pact Broker image url | string | `"docker.io/pactfoundation/pact-broker:2.124.0-pactbroker2.112.0"` |
126+
| broker.imagePullPolicy | Specify a imagePullPolicy Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' more info [here](https://kubernetes.io/docs/user-guide/images/#pre-pulling-images) | string | `"IfNotPresent"` |
127+
| broker.imagePullSecrets | Array of imagePullSecrets to allow pulling the Pact Broker image from private registries. PS: Secret's must exist in the namespace to which you deploy the Pact Broker. more info [here](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) Example: pullSecrets: - mySecretName | list | `[]` |
125128
| broker.labels | Additional labels that can be added to the Broker deployment | object | `{}` |
126129
| broker.livenessProbe.enabled | Enable livenessProbe on Pact Broker containers | bool | `true` |
127130
| broker.livenessProbe.failureThreshold | Failure threshold for livenessProbe | int | `3` |
@@ -156,11 +159,6 @@ helm upgrade -i <release_name> oci://ghcr.io/pact-foundation/pact-broker-chart/p
156159
| database.databaseName | External database name | string | `""` |
157160
| database.host | Database host | string | `""` |
158161
| database.port | Database port number | string | `""` |
159-
| image.pullPolicy | Specify a imagePullPolicy Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' more info [here](https://kubernetes.io/docs/user-guide/images/#pre-pulling-images) | string | `"IfNotPresent"` |
160-
| image.pullSecrets | Array of imagePullSecrets to allow pulling the Pact Broker image from private registries. PS: Secret's must exist in the namespace to which you deploy the Pact Broker. more info [here](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) Example: pullSecrets: - mySecretName | list | `[]` |
161-
| image.registry | Pact Broker image registry | string | `"docker.io"` |
162-
| image.repository | Pact Broker image repository | string | `"pactfoundation/pact-broker"` |
163-
| image.tag | Pact Broker image tag (immutable tags are recommended) | string | `"2.124.0-pactbroker2.112.0"` |
164162
| ingress.annotations | ingress.annotations Additional annotations for the Ingress resource | object | `{}` |
165163
| ingress.className | ingress.className Name of the IngressClass cluster resource which defines which controller will implement the resource (e.g nginx) | string | `""` |
166164
| ingress.enabled | ingress.enabled Enable the creation of the ingress resource | bool | `true` |

charts/pact-broker/templates/_helpers.tpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ This allows us to not have image: .Values.xxxx.ssss/.Values.xxx.xxx:.Values.ssss
2929
in every single template.
3030
*/}}
3131
{{- define "broker.image" -}}
32-
{{- $registryName := .Values.image.registry -}}
33-
{{- $imageName := .Values.image.repository -}}
34-
{{- $tag := .Values.image.tag -}}
35-
{{- printf "%s/%s:%s" $registryName $imageName $tag -}}
32+
{{- .Values.broker.image -}}
3633
{{- end -}}
3734

3835
{{/*

charts/pact-broker/templates/cronjob.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
containers:
2020
- name: {{ template "chart.fullname" . }}-dbclean
2121
image: {{ template "broker.image" . }}
22-
imagePullPolicy: {{ .Values.image.pullPolicy }}
22+
imagePullPolicy: {{ .Values.broker.imagePullPolicy }}
2323
command:
2424
- clean
2525
env:

charts/pact-broker/templates/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ spec:
4242
spec:
4343
serviceAccountName: {{ include "broker.serviceAccountName" . }}
4444
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
45-
{{- if .Values.image.pullSecrets }}
45+
{{- if .Values.broker.imagePullSecrets }}
4646
imagePullSecrets:
47-
{{- range .Values.image.pullSecrets }}
47+
{{- range .Values.broker.imagePullSecrets }}
4848
- name: {{ . }}
4949
{{- end }}
5050
{{- end }}
@@ -54,7 +54,7 @@ spec:
5454
containers:
5555
- name: {{ template "chart.fullname" . }}
5656
image: {{ template "broker.image" . }}
57-
imagePullPolicy: {{ .Values.image.pullPolicy }}
57+
imagePullPolicy: {{ .Values.broker.imagePullPolicy }}
5858
{{- if .Values.broker.containerSecurityContext.enabled }}
5959
securityContext: {{- omit .Values.broker.containerSecurityContext "enabled" | toYaml | nindent 12 }}
6060
{{- end }}

charts/pact-broker/values.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
# Pact Broker image information
2-
image:
3-
4-
# -- Pact Broker image registry
5-
registry: docker.io
6-
7-
# -- Pact Broker image repository
8-
repository: pactfoundation/pact-broker
1+
# Broker configuration
2+
broker:
93

10-
# -- Pact Broker image tag (immutable tags are recommended)
11-
tag: 2.124.0-pactbroker2.112.0
4+
# -- Pact Broker image url
5+
image: docker.io/pactfoundation/pact-broker:2.124.0-pactbroker2.112.0
126

137
# -- Specify a imagePullPolicy
148
# Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
159
# more info [here](https://kubernetes.io/docs/user-guide/images/#pre-pulling-images)
1610
#
17-
pullPolicy: IfNotPresent
11+
imagePullPolicy: IfNotPresent
1812

1913
# -- Array of imagePullSecrets to allow pulling the Pact Broker image from private registries.
2014
# PS: Secret's must exist in the namespace to which you deploy the Pact Broker.
@@ -24,10 +18,7 @@ image:
2418
# pullSecrets:
2519
# - mySecretName
2620
#
27-
pullSecrets: []
28-
29-
# Broker configuration
30-
broker:
21+
imagePullSecrets: []
3122

3223
# -- Additional labels that can be added to the Broker deployment
3324
labels: {}

docs/MIGRATION_GUIDE_v5.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Migration Guide: Image Settings Changes in v5.0.0
2+
3+
## Overview
4+
5+
Version 5.0.0 of the Pact Broker Helm Chart reorganizes the image configuration settings. The image-related values have been moved from the top-level `image` object into the `broker` object for better logical organization of chart values.
6+
7+
This is a **breaking change** that requires updating your values files when upgrading from v4.x to v5.0.0.
8+
9+
## What Changed
10+
11+
### Previous Structure (v4.x and earlier)
12+
13+
```yaml
14+
# Top-level image configuration
15+
image:
16+
registry: docker.io
17+
repository: pactfoundation/pact-broker
18+
tag: 2.124.0-pactbroker2.112.0
19+
pullPolicy: IfNotPresent
20+
pullSecrets: []
21+
22+
# Separate broker configuration
23+
broker:
24+
labels: {}
25+
annotations: {}
26+
# ... other broker settings
27+
```
28+
29+
### New Structure (v5.0.0)
30+
31+
```yaml
32+
# All image settings now under broker
33+
broker:
34+
# Single image URL combining registry, repository, and tag
35+
image: docker.io/pactfoundation/pact-broker:2.124.0-pactbroker2.112.0
36+
37+
# Renamed from pullPolicy to imagePullPolicy
38+
imagePullPolicy: IfNotPresent
39+
40+
# Renamed from pullSecrets to imagePullSecrets
41+
imagePullSecrets: []
42+
43+
# Other broker settings remain the same
44+
labels: {}
45+
annotations: {}
46+
# ... other broker settings
47+
```
48+
49+
## Key Changes
50+
51+
1. **Image URL Format**: The separate `registry`, `repository`, and `tag` fields have been consolidated into a single `image` field containing the full image URL.
52+
53+
2. **Field Renaming**:
54+
- `pullPolicy``imagePullPolicy`
55+
- `pullSecrets``imagePullSecrets`
56+
57+
3. **Location**: All image-related settings are now nested under the `broker` object instead of being at the top level.

0 commit comments

Comments
 (0)