Skip to content

Commit

Permalink
feat: ability to set svc annotations
Browse files Browse the repository at this point in the history
Signed-off-by: shanehull <[email protected]>
  • Loading branch information
shanehull committed Sep 5, 2024
1 parent ba30c36 commit 461e4bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
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: 1.0.1
version: 1.1.0
appVersion: 2.107.1
dependencies:
- condition: postgresql.enabled
Expand Down
5 changes: 3 additions & 2 deletions charts/pact-broker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pact-broker

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

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

Expand Down Expand Up @@ -66,7 +66,7 @@ helm upgrade -i <release_name> oci://ghcr.io/pact-foundation/pact-broker-chart/p
| broker.config.autoMigrateDb | Whether or not to run the database schema migrations on start up. It is recommended to set this to true. | bool | `true` |
| broker.config.autoMigrateDbData | Whether or not to run the database data migrations on start up. It is recommended to set this to true. | bool | `true` |
| broker.config.badgeProviderMode | The method by which the badges are generated. Allowed values: redirect, proxy | string | `"redirect"` |
| broker.config.baseUrl | Base URL can be configured for architectures that use gateways or proxies that allow the same Pact Broker instance to be addressed with a different base URL. The application may run correctly without this attribute, however, it is strongly recommended to set it when deploying the Pact Broker to production as it prevents cache poisoning security vulnerabilities. If you find that the URLs generated by the API are using an IP instead of a hostname, you can set this environment variable to force the desired base URL. Must include the port if it's a non-standard one. eg. https://my-broker:9292. Is not currently used for links in the UI. | string | `nil` |
| broker.config.baseUrl | Base URL can be configured for architectures that use gateways or proxies that allow the same Pact Broker instance to be addressed with a different base URL. The application may run correctly without this attribute, however, it is strongly recommended to set it when deploying the Pact Broker to production as it prevents cache poisoning security vulnerabilities. If you find that the URLs generated by the API are using an IP instead of a hostname, you can set this environment variable to force the desired base URL. Must include the port if it's a non-standard one. eg. https://my-broker:9292. Is not currently used for links in the UI. | string | `nil` |
| broker.config.basicAuth.allowPublicRead | Set to true if you want public read access, but still require credentials for writing. | bool | `false` |
| broker.config.basicAuth.enablePublicBadgeAccess | Set this to true to allow status badges to be embedded in README files without requiring a hardcoded password. | bool | `false` |
| broker.config.basicAuth.enabled | Set to true if you basic authentication to be enabled | bool | `false` |
Expand Down Expand Up @@ -178,6 +178,7 @@ helm upgrade -i <release_name> oci://ghcr.io/pact-foundation/pact-broker-chart/p
| postgresql.auth.secretKeys.userPasswordKey | The key in which Postgres well look for, for the user password, in the existing Secret | string | `"user-password"` |
| postgresql.auth.username | Name for a custom user to create | string | `"bn_broker"` |
| postgresql.enabled | Switch to enable or disable the PostgreSQL helm chart | bool | `true` |
| service.annotations | service.annotations Additional annotations for the Service resource | object | `{}` |
| service.clusterIP | Pact Broker service clusterIP | string | `""` |
| service.loadBalancerIP | Pact Broker Service [loadBalancerIP](https://kubernetes.io/docs/user-guide/services/#type-loadbalancer) | string | `""` |
| service.nodePorts.http | http nodePort | string | `""` |
Expand Down
7 changes: 7 additions & 0 deletions charts/pact-broker/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ metadata:
helm.sh/chart: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pact-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ service:
#
type: "ClusterIP"

# -- service.annotations Additional annotations for the Service resource
annotations: {}

# Service port configuration
ports:

Expand Down

0 comments on commit 461e4bc

Please sign in to comment.