[bitnami/spring-cloud-dataflow] Add more configuration options for prometheus proxy (#5827)

- Affinity / antiAffinity / node selector / toleration / priortyClassname / podAnnotations

Co-authored-by: Ibone González Mauraza <gibone@vmware.com>
This commit is contained in:
Yiang Guo
2021-03-18 10:13:51 -04:00
committed by GitHub
parent b6b2d8f3a1
commit 49a3d17ba1
4 changed files with 120 additions and 29 deletions

View File

@@ -39,4 +39,4 @@ sources:
- https://github.com/bitnami/bitnami-docker-spring-cloud-dataflow
- https://github.com/bitnami/bitnami-docker-spring-cloud-skipper
- https://dataflow.spring.io/
version: 2.9.1
version: 2.10.0

View File

@@ -242,33 +242,43 @@ The following tables lists the configurable parameters of the Spring Cloud Data
### Metrics parameters
| Parameter | Description | Default |
|----------------------------------------|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `metrics.metrics` | Enable the export of Prometheus metrics | `false` |
| `metrics.image.registry` | Prometheus Rsocket Proxy image registry | `docker.io` |
| `metrics.image.repository` | Prometheus Rsocket Proxy image name | `bitnami/prometheus-rsocket-proxy` |
| `metrics.image.tag` | Prometheus Rsocket Proxy image tag | `{TAG_NAME}` |
| `metrics.image.pullPolicy` | Prometheus Rsocket Proxy image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `metrics.replicaCount` | Number of Prometheus Rsocket Proxy replicas to deploy | `1` |
| `metrics.resources.limits` | The resources limits for the Prometheus Rsocket Proxy container | `{}` |
| `metrics.resources.requests` | The requested resources for the Prometheus Rsocket Proxy container | `{}` |
| `metrics.kafka.service.httpPort` | Prometheus Rsocket Proxy HTTP port | `8080` |
| `metrics.kafka.service.rsocketPort` | Prometheus Rsocket Proxy Rsocket port | `8080` |
| `metrics.kafka.service.annotations` | Annotations for Prometheus Rsocket Proxy service | `Check values.yaml file` |
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `metrics.serviceMonitor.namespace` | Namespace in which ServiceMonitor is created if different from release | `nil` |
| `metrics.serviceMonitor.extraLabels` | Labels to add to ServiceMonitor | `{}` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
| `metrics.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `metrics.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `metrics.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `nil` |
| `metrics.autoscaling.enabled` | Enable autoscaling for Prometheus Rsocket Proxy | `false` |
| `metrics.autoscaling.minReplicas` | Minimum number of Prometheus Rsocket Proxy replicas | `nil` |
| `metrics.autoscaling.maxReplicas` | Maximum number of Prometheus Rsocket Proxy replicas | `nil` |
| `metrics.autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
| `metrics.autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
| Parameter | Description | Default |
|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `metrics.metrics` | Enable the export of Prometheus metrics | `false` |
| `metrics.image.registry` | Prometheus Rsocket Proxy image registry | `docker.io` |
| `metrics.image.repository` | Prometheus Rsocket Proxy image name | `bitnami/prometheus-rsocket-proxy` |
| `metrics.image.tag` | Prometheus Rsocket Proxy image tag | `{TAG_NAME}` |
| `metrics.image.pullPolicy` | Prometheus Rsocket Proxy image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `metrics.replicaCount` | Number of Prometheus Rsocket Proxy replicas to deploy | `1` |
| `metrics.podAffinityPreset` | Prometheus Rsocket Proxy pod affinity preset. Ignored if `metrics.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `metrics.podAntiAffinityPreset` | Prometheus Rsocket Proxy pod anti-affinity preset. Ignored if `metrics.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `metrics.nodeAffinityPreset.type` | Prometheus Rsocket Proxy node affinity preset type. Ignored if `metrics.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `metrics.nodeAffinityPreset.key` | Prometheus Rsocket Proxy node label key to match Ignored if `metrics.affinity` is set. | `""` |
| `metrics.nodeAffinityPreset.values` | Prometheus Rsocket Proxy node label values to match. Ignored if `metrics.affinity` is set. | `[]` |
| `metrics.affinity` | Prometheus Rsocket Proxy affinity for pod assignment | `{}` (evaluated as a template) |
| `metrics.nodeSelector` | Prometheus Rsocket Proxy node labels for pod assignment | `{}` (evaluated as a template) |
| `metrics.tolerations` | Prometheus Rsocket Proxy tolerations for pod assignment | `[]` (evaluated as a template) |
| `metrics.priorityClassName` | Controller priorityClassName | `nil` |
| `metrics.resources.limits` | The resources limits for the Prometheus Rsocket Proxy container | `{}` |
| `metrics.resources.requests` | The requested resources for the Prometheus Rsocket Proxy container | `{}` |
| `metrics.podAnnotations` | Annotations for Prometheus Rsocket Proxy pods | `{}` |
| `metrics.kafka.service.httpPort` | Prometheus Rsocket Proxy HTTP port | `8080` |
| `metrics.kafka.service.rsocketPort` | Prometheus Rsocket Proxy Rsocket port | `8080` |
| `metrics.kafka.service.annotations` | Annotations for Prometheus Rsocket Proxy service | `Check values.yaml file` |
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `metrics.serviceMonitor.namespace` | Namespace in which ServiceMonitor is created if different from release | `nil` |
| `metrics.serviceMonitor.extraLabels` | Labels to add to ServiceMonitor | `{}` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
| `metrics.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `metrics.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `metrics.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `nil` |
| `metrics.autoscaling.enabled` | Enable autoscaling for Prometheus Rsocket Proxy | `false` |
| `metrics.autoscaling.minReplicas` | Minimum number of Prometheus Rsocket Proxy replicas | `nil` |
| `metrics.autoscaling.maxReplicas` | Maximum number of Prometheus Rsocket Proxy replicas | `nil` |
| `metrics.autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
| `metrics.autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
### Init Container parameters

View File

@@ -21,9 +21,30 @@ spec:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: prometheus-proxy
annotations:
{{- if .Values.metrics.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "scdf.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ include "scdf.serviceAccountName" . }}
{{- if .Values.metrics.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAffinityPreset "component" "prometheus-proxy" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAntiAffinityPreset "component" "prometheus-proxy" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.metrics.nodeAffinityPreset.type "key" .Values.metrics.nodeAffinityPreset.key "values" .Values.metrics.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.metrics.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.metrics.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.metrics.priorityClassName }}
priorityClassName: {{ .Values.metrics.priorityClassName | quote }}
{{- end }}
containers:
- name: prometheus-proxy
image: {{ include "scdf.metrics.image" . }}

View File

@@ -839,10 +839,70 @@ metrics:
limits: {}
requests: {}
## Number of Dataflow Prometheus Rsocket Proxy replicas to deploy.
## Number of Prometheus Rsocket Proxy replicas to deploy.
##
replicaCount: 1
## Prometheus Rsocket Proxy pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""
## Prometheus Rsocket Proxy pod anti-affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft
## Prometheus Rsocket Proxy node affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
##
type: ""
## Node label key to match
## E.g.
## key: "kubernetes.io/e2e-az-name"
##
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
##
values: []
## Affinity for Prometheus Rsocket Proxy pods assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## Note: metrics.podAffinityPreset, metrics.podAntiAffinityPreset, and metrics.nodeAffinityPreset will be ignored when it's set
##
affinity: {}
## Node labels for Prometheus Rsocket Proxy pods assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations for Prometheus Rsocket Proxy pods assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Annotations for Prometheus Rsocket Proxy pods.
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Prometheus Rsocket Proxy pods' priority.
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
##
# priorityClassName: ""
service:
## Prometheus Rsocket Proxy HTTP port
##