Skip to content

Commit

Permalink
Affinity, Toleration and NodeSelector can be set (#3)
Browse files Browse the repository at this point in the history
* Affinity, Toleration and NodeSelector can be set
  • Loading branch information
kbcasagrande authored Jul 15, 2022
1 parent fa75358 commit 75f5d68
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 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: 0.0.1
version: 0.0.2
appVersion: 2.100.0.1
dependencies:
- condition: postgresql.enabled
Expand Down
5 changes: 4 additions & 1 deletion charts/pact-broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
12 changes: 12 additions & 0 deletions charts/pact-broker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions charts/pact-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 75f5d68

Please sign in to comment.