diff --git a/charts/pact-broker/Chart.yaml b/charts/pact-broker/Chart.yaml index 5ad7627..3f0a0f4 100644 --- a/charts/pact-broker/Chart.yaml +++ b/charts/pact-broker/Chart.yaml @@ -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.0.1 +version: 0.0.2 appVersion: 2.100.0.1 dependencies: - condition: postgresql.enabled diff --git a/charts/pact-broker/README.md b/charts/pact-broker/README.md index 018d383..a82b612 100644 --- a/charts/pact-broker/README.md +++ b/charts/pact-broker/README.md @@ -26,7 +26,8 @@ helm install pact-broker pact-broker/pact-broker | Key | Type | Default | Description | |-----|------|---------|-------------| -| broker | object | `{"annotations":{},"config":{"basicAuth":{"allowPublicRead":false,"enablePublicBadgeAccess":false,"publicHeartbeat":true,"readUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"},"writeUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"}},"disable_ssl":false},"containerPorts":{"http":9292,"https":8443},"containerSecurityContext":{"enabled":true,"runAsNonRoot":true,"runAsUser":1001},"labels":{},"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":300,"periodSeconds":1,"successThreshold":1,"timeoutSeconds":5},"podSecurityContext":{"enabled":true,"fsGroup":1001},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1},"replicaCount":1,"resources":{"limits":{"cpu":"2500m","memory":"1024Mi"},"requests":{"cpu":"100m","memory":"512Mi"}}}` | Broker configuration | +| broker | object | `{"affinity":{},"annotations":{},"config":{"basicAuth":{"allowPublicRead":false,"enablePublicBadgeAccess":false,"publicHeartbeat":true,"readUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"},"writeUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"}},"disable_ssl":false},"containerPorts":{"http":9292,"https":8443},"containerSecurityContext":{"enabled":true,"runAsNonRoot":true,"runAsUser":1001},"labels":{},"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":300,"periodSeconds":1,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"podSecurityContext":{"enabled":true,"fsGroup":1001},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1},"replicaCount":1,"resources":{"limits":{"cpu":"2500m","memory":"1024Mi"},"requests":{"cpu":"100m","memory":"512Mi"}},"tolerations":[]}` | Broker configuration | +| broker.affinity | object | `{}` | Pact Broker [Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) | | broker.annotations | object | `{}` | Additional annotations that can be added to the Broker deployment | | broker.config | object | `{"basicAuth":{"allowPublicRead":false,"enablePublicBadgeAccess":false,"publicHeartbeat":true,"readUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"},"writeUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"}},"disable_ssl":false}` | Pact Broker Config | | broker.config.basicAuth | object | `{"allowPublicRead":false,"enablePublicBadgeAccess":false,"publicHeartbeat":true,"readUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"},"writeUser":{"existingSecret":"","existingSecretPasswordKey":"","existingSecretUsernameKey":"","password":"admin","username":"admin"}}` | Pact Broker Basic Authentication | @@ -61,6 +62,7 @@ helm install pact-broker pact-broker/pact-broker | broker.livenessProbe.periodSeconds | int | `1` | Period seconds for livenessProbe | | broker.livenessProbe.successThreshold | int | `1` | Success threshold for livenessProbe | | broker.livenessProbe.timeoutSeconds | int | `5` | Timeout seconds for livenessProbe | +| broker.nodeSelector | object | `{}` | Pact Broker [Node Selector](https://kubernetes.io/docs/user-guide/node-selection/) | | broker.podSecurityContext | object | `{"enabled":true,"fsGroup":1001}` | Pact Broker pods' [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) | | broker.podSecurityContext.enabled | bool | `true` | Enable Pact Broker pods' Security Context | | broker.podSecurityContext.fsGroup | int | `1001` | Set Pact Broker pod's Security Context fsGroup | @@ -75,6 +77,7 @@ helm install pact-broker pact-broker/pact-broker | broker.resources | object | `{"limits":{"cpu":"2500m","memory":"1024Mi"},"requests":{"cpu":"100m","memory":"512Mi"}}` | Pact Broker [resource requests and limits](https://kubernetes.io/docs/user-guide/compute-resources/) | | broker.resources.limits | object | `{"cpu":"2500m","memory":"1024Mi"}` | The resources limits for the Pact Broker containers | | broker.resources.requests | object | `{"cpu":"100m","memory":"512Mi"}` | The requested resources for the Pact Broker containers | +| broker.tolerations | list | `[]` | Pact Broker [Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | | externalDatabase | object | `{"config":{"adapter":"","auth":{"existingSecret":"","existingSecretPasswordKey":"user-password","password":"","username":""},"databaseName":"","host":"","port":""},"enabled":false}` | External database configuration | | externalDatabase.config.adapter | string | `""` | Database engine to use. Only allowed values are `postgres` or `sqlite`. More info [here](https://docs.pact.io/pact_broker/docker_images/pactfoundation#getting-started) | | externalDatabase.config.auth | object | `{"existingSecret":"","existingSecretPasswordKey":"user-password","password":"","username":""}` | External database auth details that the Pact Broker will use to connect | diff --git a/charts/pact-broker/templates/deployment.yaml b/charts/pact-broker/templates/deployment.yaml index 031650e..5066b78 100644 --- a/charts/pact-broker/templates/deployment.yaml +++ b/charts/pact-broker/templates/deployment.yaml @@ -114,6 +114,18 @@ spec: value: {{ .Values.broker.config.basicAuth.enablePublicBadgeAccess | quote }} resources: {{- toYaml .Values.broker.resources | nindent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: + {{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: + {{ toYaml .Values.tolerations | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: + {{ toYaml .Values.affinity | indent 8 }} + {{- end }} {{- if .Values.broker.livenessProbe.enabled }} livenessProbe: {{- omit .Values.broker.livenessProbe "enabled" | toYaml | nindent 12 }} httpGet: diff --git a/charts/pact-broker/values.yaml b/charts/pact-broker/values.yaml index a4c25b7..c8fa095 100644 --- a/charts/pact-broker/values.yaml +++ b/charts/pact-broker/values.yaml @@ -126,6 +126,15 @@ broker: # -- Set this to true to allow status badges to be embedded in README files without requiring a hardcoded password. enablePublicBadgeAccess: false + # -- Pact Broker [Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) + affinity: {} + + # -- Pact Broker [Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) + tolerations: [] + + # -- Pact Broker [Node Selector](https://kubernetes.io/docs/user-guide/node-selection/) + nodeSelector: {} + # -- Pact Broker [resource requests and limits](https://kubernetes.io/docs/user-guide/compute-resources/) resources: