From 4429b1eeb2cca400f2a3114a3508eddb42ddf1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20de=20Paz=20Gal=C3=A1n?= Date: Wed, 6 Apr 2022 14:58:24 +0200 Subject: [PATCH] [bitnami/wavefront-prometheus-storage-adapter] Chart standarisation (#9646) * [bitnami/wavefront-prometheus-storage-adapter] Chart standarisation Signed-off-by: Francisco de Paz * Apply suggested changes Signed-off-by: Francisco de Paz * Fix deployment typo Signed-off-by: Francisco de Paz * Update containerPort used in args Signed-off-by: Francisco de Paz * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers * [bitnami/wavefront-prometheus-storage-adapter] Update components versions Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- .../Chart.lock | 6 +- .../Chart.yaml | 2 +- .../README.md | 179 ++++++++++-------- .../templates/NOTES.txt | 30 ++- .../templates/deployment.yaml | 36 +++- .../templates/service.yaml | 24 ++- .../values.yaml | 129 +++++++++---- 7 files changed, 273 insertions(+), 133 deletions(-) diff --git a/bitnami/wavefront-prometheus-storage-adapter/Chart.lock b/bitnami/wavefront-prometheus-storage-adapter/Chart.lock index 0901868a8e..afa889fdfb 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/Chart.lock +++ b/bitnami/wavefront-prometheus-storage-adapter/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: wavefront repository: https://charts.bitnami.com/bitnami - version: 3.3.2 + version: 3.3.3 - name: common repository: https://charts.bitnami.com/bitnami version: 1.13.0 -digest: sha256:b806f66a671a6509c9d51e568316c40b41b04c94008c5bd8380226e1d4976167 -generated: "2022-04-01T20:49:04.955038687Z" +digest: sha256:b5ceffd218f2d3df00b943d8af692b5128e26cb9de50ecd9e0d0de4ba1e76360 +generated: "2022-04-06T12:18:13.577194633Z" diff --git a/bitnami/wavefront-prometheus-storage-adapter/Chart.yaml b/bitnami/wavefront-prometheus-storage-adapter/Chart.yaml index 80d33b0db0..de91abe2ce 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/Chart.yaml +++ b/bitnami/wavefront-prometheus-storage-adapter/Chart.yaml @@ -29,4 +29,4 @@ maintainers: name: wavefront-prometheus-storage-adapter sources: - https://github.com/bitnami/bitnami-docker-wavefront-prometheus-storage-adapter -version: 1.0.29 +version: 1.1.0 diff --git a/bitnami/wavefront-prometheus-storage-adapter/README.md b/bitnami/wavefront-prometheus-storage-adapter/README.md index 7fdcc47f72..2603066651 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/README.md +++ b/bitnami/wavefront-prometheus-storage-adapter/README.md @@ -57,91 +57,116 @@ The command removes all the Kubernetes components associated with the chart and ### Global parameters -| Name | Description | Value | -| ------------------------- | -------------------------------------------------- | --------------- | -| `global.imageRegistry` | Global Docker image registry | `""` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | -| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | -| `kubeVersion` | Override Kubernetes version | `""` | -| `nameOverride` | String to partially override common.names.fullname | `""` | -| `fullnameOverride` | String to fully override common.names.fullname | `""` | -| `commonLabels` | Labels to add to all deployed objects | `{}` | -| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | -| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` | -| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | +| Name | Description | Value | +| ------------------------- | ----------------------------------------------- | ----- | +| `global.imageRegistry` | Global Docker image registry | `""` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | +| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | + + +### Common parameters + +| Name | Description | Value | +| ------------------------ | --------------------------------------------------------------------------------------- | --------------- | +| `kubeVersion` | Override Kubernetes version | `""` | +| `nameOverride` | String to partially override common.names.fullname | `""` | +| `fullnameOverride` | String to fully override common.names.fullname | `""` | +| `commonLabels` | Labels to add to all deployed objects | `{}` | +| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | +| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` | +| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | +| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` | +| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` | +| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` | ### Wavefront Prometheus Storage Adapter deployment parameters -| Name | Description | Value | -| --------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------- | -| `image.registry` | Adapter image registry | `docker.io` | -| `image.repository` | Adapter image repository | `bitnami/wavefront-prometheus-storage-adapter` | -| `image.tag` | Adapter image tag (immutabe tags are recommended) | `1.0.5-debian-10-r54` | -| `image.pullPolicy` | Adapter image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Adapter image pull secrets | `[]` | -| `image.debug` | Enable image debug mode | `false` | -| `livenessProbe.enabled` | Enable livenessProbe | `true` | -| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` | -| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` | -| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `readinessProbe.enabled` | Enable readinessProbe | `true` | -| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` | -| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | -| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` | -| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` | -| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `command` | Override default container command (useful when using custom images) | `[]` | -| `args` | Override default container args (useful when using custom images) | `[]` | -| `hostAliases` | Add deployment host aliases | `[]` | -| `resources.limits` | The resources limits for the Adapter container | `{}` | -| `resources.requests` | The requested resourcesc for the Adapter container | `{}` | -| `containerSecurityContext.enabled` | Enabled Adapter containers' Security Context | `true` | -| `containerSecurityContext.runAsUser` | Set Adapter container's Security Context runAsUser | `1001` | -| `containerSecurityContext.runAsNonRoot` | Set Adapter container's Security Context runAsNonRoot | `true` | -| `podSecurityContext.enabled` | Enabled Adapter pods' Security Context | `true` | -| `podSecurityContext.fsGroup` | Set Adapter pod's Security Context fsGroup | `1001` | -| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` | -| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` | -| `affinity` | Affinity for pod assignment | `{}` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | Tolerations for pod assignment | `[]` | -| `podLabels` | Extra labels for Adapter pods | `{}` | -| `podAnnotations` | Annotations for Adapter pods | `{}` | -| `priorityClassName` | Adapter pod priority | `""` | -| `lifecycleHooks` | Add lifecycle hooks to the Adapter deployment | `{}` | -| `customLivenessProbe` | Override default liveness probe | `{}` | -| `customReadinessProbe` | Override default readiness probe | `{}` | -| `updateStrategy.type` | Adapter deployment update strategy | `RollingUpdate` | -| `containerPort` | Adapter container port | `1234` | -| `extraEnvVars` | Add extra environment variables to the Adapter container | `[]` | -| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` | -| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `""` | -| `extraVolumes` | Optionally specify extra list of additional volumes for Adapter pods | `[]` | -| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Adapter container(s) | `[]` | -| `initContainers` | Add additional init containers to the Adapter pods | `[]` | -| `sidecars` | Add additional sidecar containers to the Adapter pod | `[]` | -| `externalProxy.host` | Host of a wavefront-proxy instance (required if wavefront.enabled = false) | `""` | -| `externalProxy.port` | Host of a wavefront-proxy instance (required if wavefront.enabled = false) | `2878` | -| `adapterPrefix` | Adapter `prefix` parameter | `""` | -| `adapterTags` | Adapter `tags` parameter | `""` | +| Name | Description | Value | +| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- | +| `image.registry` | Adapter image registry | `docker.io` | +| `image.repository` | Adapter image repository | `bitnami/wavefront-prometheus-storage-adapter` | +| `image.tag` | Adapter image tag (immutabe tags are recommended) | `1.0.5-debian-10-r132` | +| `image.pullPolicy` | Adapter image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Adapter image pull secrets | `[]` | +| `image.debug` | Enable image debug mode | `false` | +| `replicaCount` | Number of Adapter replicas to deploy | `1` | +| `startupProbe.enabled` | Enable startupProbe | `true` | +| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` | +| `startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | +| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `3` | +| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `livenessProbe.enabled` | Enable livenessProbe | `true` | +| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` | +| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | +| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | +| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` | +| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `readinessProbe.enabled` | Enable readinessProbe | `true` | +| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `15` | +| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | +| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` | +| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` | +| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `command` | Override default container command (useful when using custom images) | `[]` | +| `args` | Override default container args (useful when using custom images) | `[]` | +| `hostAliases` | Add deployment host aliases | `[]` | +| `resources.limits` | The resources limits for the Adapter container | `{}` | +| `resources.requests` | The requested resourcesc for the Adapter container | `{}` | +| `containerSecurityContext.enabled` | Enabled Adapter containers' Security Context | `true` | +| `containerSecurityContext.runAsUser` | Set Adapter container's Security Context runAsUser | `1001` | +| `containerSecurityContext.runAsNonRoot` | Set Adapter container's Security Context runAsNonRoot | `true` | +| `podSecurityContext.enabled` | Enabled Adapter pods' Security Context | `true` | +| `podSecurityContext.fsGroup` | Set Adapter pod's Security Context fsGroup | `1001` | +| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` | +| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` | +| `affinity` | Affinity for pod assignment | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Tolerations for pod assignment | `[]` | +| `podLabels` | Extra labels for Adapter pods | `{}` | +| `podAnnotations` | Annotations for Adapter pods | `{}` | +| `priorityClassName` | Adapter pod priority | `""` | +| `schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `{}` | +| `terminationGracePeriodSeconds` | Termination grace period in seconds | `""` | +| `lifecycleHooks` | Add lifecycle hooks to the Adapter deployment | `{}` | +| `customStartupProbe` | Override default startup probe | `{}` | +| `customLivenessProbe` | Override default liveness probe | `{}` | +| `customReadinessProbe` | Override default readiness probe | `{}` | +| `updateStrategy.type` | Adapter deployment update strategy | `RollingUpdate` | +| `containerPorts.http` | Adapter HTTP container port | `1234` | +| `extraEnvVars` | Add extra environment variables to the Adapter container | `[]` | +| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` | +| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `""` | +| `extraVolumes` | Optionally specify extra list of additional volumes for Adapter pods | `[]` | +| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Adapter container(s) | `[]` | +| `initContainers` | Add additional init containers to the Adapter pods | `[]` | +| `sidecars` | Add additional sidecar containers to the Adapter pod | `[]` | +| `externalProxy.host` | Host of a wavefront-proxy instance (required if wavefront.enabled = false) | `""` | +| `externalProxy.port` | Host of a wavefront-proxy instance (required if wavefront.enabled = false) | `2878` | +| `adapterPrefix` | Adapter `prefix` parameter | `""` | +| `adapterTags` | Adapter `tags` parameter | `""` | ### Traffic Exposure Parameters -| Name | Description | Value | -| ---------------------------------- | -------------------------------------------- | ----------- | -| `service.type` | Adapter service type | `ClusterIP` | -| `service.port` | Adapter service port | `1234` | -| `service.loadBalancerIP` | Adapter service LoadBalancer IP | `""` | -| `service.loadBalancerSourceRanges` | loadBalancerIP source ranges for the Service | `[]` | -| `service.nodePorts.http` | NodePort for the HTTP endpoint | `""` | -| `service.externalTrafficPolicy` | External traffic policy for the service | `Cluster` | +| Name | Description | Value | +| ---------------------------------- | ---------------------------------------------------------------- | ----------- | +| `service.type` | Adapter service type | `ClusterIP` | +| `service.ports.http` | Adapter service HTTP port | `1234` | +| `service.clusterIP` | Adapter service Cluster IP | `""` | +| `service.loadBalancerIP` | Adapter service LoadBalancer IP | `""` | +| `service.loadBalancerSourceRanges` | loadBalancerIP source ranges for the Service | `[]` | +| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | +| `service.annotations` | Additional custom annotations for Adapter service | `{}` | +| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` | +| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | +| `service.nodePorts.http` | NodePort for the HTTP endpoint | `""` | +| `service.externalTrafficPolicy` | External traffic policy for the service | `Cluster` | ### Wavefront sub-chart parameters diff --git a/bitnami/wavefront-prometheus-storage-adapter/templates/NOTES.txt b/bitnami/wavefront-prometheus-storage-adapter/templates/NOTES.txt index 5ac9b0ec60..123ce3b228 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/templates/NOTES.txt +++ b/bitnami/wavefront-prometheus-storage-adapter/templates/NOTES.txt @@ -4,6 +4,26 @@ APP VERSION: {{ .Chart.AppVersion }} ** Please be patient while the chart is being deployed ** +{{- if .Values.diagnosticMode.enabled }} +The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with: + + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }} + +Get the list of pods by executing: + + kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} + +Access the pod you want to debug by executing + + kubectl exec --namespace {{ .Release.Namespace }} -ti -- bash + +In order to replicate the container startup execute this command: + + /opt/bitnami/wavefront-prometheus-storage-adapter/bin/adapter + +{{- else }} + 1. Get the application URL by running these commands: {{- if contains "NodePort" .Values.service.type }} @@ -14,16 +34,18 @@ APP VERSION: {{ .Chart.AppVersion }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ template "common.names.fullname" . }} export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} + echo http://$SERVICE_IP:{{ coalesce .Values.service.ports.http .Values.service.port}} {{- else if contains "ClusterIP" .Values.service.type }} - echo "The renconciler is available at http://127.0.0.1:{{ .Values.service.port }}" - kubectl port-forward svc/{{ template "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }} & + echo "The renconciler is available at http://127.0.0.1:{{ coalesce .Values.service.ports.http .Values.service.port}}" + kubectl port-forward svc/{{ template "common.names.fullname" . }} {{ coalesce .Values.service.ports.http .Values.service.port}}:{{ coalesce .Values.service.ports.http .Values.service.port}} & {{- end }} 2. Make sure that your running Prometheus instance has the following configuration in the prometheus.yml file remote_write: - - url: "http://{{ template "common.names.fullname" . }}:{{ .Values.service.port }}/receive" + - url: "http://{{ template "common.names.fullname" . }}:{{ coalesce .Values.service.ports.http .Values.service.port}}/receive" + +{{- end }} {{- include "common.warnings.rollingTag" .Values.image }} {{- include "wfpsa.validateValues" . }} diff --git a/bitnami/wavefront-prometheus-storage-adapter/templates/deployment.yaml b/bitnami/wavefront-prometheus-storage-adapter/templates/deployment.yaml index 523fdac32a..3bcd209cb2 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/templates/deployment.yaml +++ b/bitnami/wavefront-prometheus-storage-adapter/templates/deployment.yaml @@ -18,6 +18,7 @@ spec: selector: matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} app.kubernetes.io/component: wavefront-prometheus-storage-adapter + replicas: {{ .Values.replicaCount }} template: metadata: {{- if .Values.podAnnotations }} @@ -50,6 +51,15 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName | quote }} {{- end }} + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName }} + {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} {{- if .Values.podSecurityContext.enabled }} securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} @@ -67,17 +77,21 @@ spec: {{- if .Values.containerSecurityContext.enabled }} securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} {{- end }} - {{- if .Values.command }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + {{- else if .Values.command }} command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} {{- else }} command: - adapter {{- end }} - {{- if .Values.args }} + {{- if .Values.diagnosticMode.enabled }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else if .Values.args }} args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }} {{- else }} args: - - -listen={{ .Values.containerPort }} + - -listen={{ coalesce .Values.containerPorts.http .Values.containerPort}} - -proxy={{ ternary (include "wfpsa.proxy.fullname" .) .Values.externalProxy.host .Values.wavefront.proxy.enabled }} - -proxy-port={{ ternary .Values.wavefront.proxy.port .Values.externalProxy.port .Values.wavefront.proxy.enabled }} {{- if .Values.adapterPrefix }} @@ -107,8 +121,21 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} {{- end }} ports: - - containerPort: {{ .Values.containerPort }} + - containerPort: {{ coalesce .Values.containerPorts.http .Values.containerPort}} name: http + {{- if not .Values.diagnosticMode.enabled }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + tcpSocket: + port: http + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} + successThreshold: {{ .Values.startupProbe.successThreshold }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + {{- else if .Values.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} + {{- end }} {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: @@ -135,6 +162,7 @@ spec: {{- else if .Values.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} {{- end }} + {{- end }} {{- if .Values.extraVolumeMounts }} volumeMounts: {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }} {{- end }} diff --git a/bitnami/wavefront-prometheus-storage-adapter/templates/service.yaml b/bitnami/wavefront-prometheus-storage-adapter/templates/service.yaml index 0aac78a513..27c50e34e7 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/templates/service.yaml +++ b/bitnami/wavefront-prometheus-storage-adapter/templates/service.yaml @@ -8,23 +8,38 @@ metadata: {{- end }} name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.service.annotations .Values.commonAnnotations }} + 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 }} {{- end }} spec: type: {{ .Values.service.type }} {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} {{- end }} + {{- if not (empty .Values.service.clusterIP) }} + clusterIP: {{ .Values.service.clusterIP | quote }} + {{- end }} {{ if eq .Values.service.type "LoadBalancer" }} loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }} {{ end }} {{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} {{- end }} + {{- if .Values.service.sessionAffinity }} + sessionAffinity: {{ .Values.service.sessionAffinity }} + {{- end }} + {{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }} + {{- end }} ports: - name: http - port: {{ .Values.service.port }} + port: {{ coalesce .Values.service.ports.http .Values.service.port}} targetPort: http protocol: TCP {{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http))) }} @@ -32,5 +47,8 @@ spec: {{- else if eq .Values.service.type "ClusterIP" }} nodePort: null {{- end }} + {{- if .Values.service.extraPorts }} + {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} + {{- end }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: wavefront-prometheus-storage-adapter diff --git a/bitnami/wavefront-prometheus-storage-adapter/values.yaml b/bitnami/wavefront-prometheus-storage-adapter/values.yaml index cc6fcb1ec2..a07665f0bd 100644 --- a/bitnami/wavefront-prometheus-storage-adapter/values.yaml +++ b/bitnami/wavefront-prometheus-storage-adapter/values.yaml @@ -15,40 +15,50 @@ global: ## - myRegistryKeySecretName storageClass: "" +## @section Common parameters +## ## Override Kubernetes version ## @param kubeVersion Override Kubernetes version ## kubeVersion: "" - ## String to partially override common.names.fullname template (will maintain the release name) ## @param nameOverride String to partially override common.names.fullname ## nameOverride: "" - ## String to fully override common.names.fullname template ## @param fullnameOverride String to fully override common.names.fullname ## fullnameOverride: "" - ## Add labels to all the deployed resources ## @param commonLabels Labels to add to all deployed objects ## commonLabels: {} - ## Add annotations to all the deployed resources ## @param commonAnnotations Annotations to add to all deployed objects ## commonAnnotations: {} - ## Kubernetes Cluster Domain ## @param clusterDomain Kubernetes cluster domain name ## clusterDomain: cluster.local - ## Extra objects to deploy (value evaluated as a template) ## @param extraDeploy Array of extra objects to deploy with the release ## extraDeploy: [] +## Enable diagnostic mode in the deployment +## +diagnosticMode: + ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) + ## + enabled: false + ## @param diagnosticMode.command Command to override all containers in the deployment + ## + command: + - sleep + ## @param diagnosticMode.args Args to override all containers in the deployment + ## + args: + - infinity ## @section Wavefront Prometheus Storage Adapter deployment parameters ## @@ -61,7 +71,7 @@ image: repository: bitnami/wavefront-prometheus-storage-adapter ## @param image.tag Adapter image tag (immutabe tags are recommended) ## - tag: 1.0.5-debian-10-r132 + tag: 1.0.5-debian-10-r137 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -81,8 +91,25 @@ image: ## @param image.debug Enable image debug mode ## debug: false - -## Configure extra options for liveness and readiness probes +## @param replicaCount Number of Adapter replicas to deploy +## NOTE: ReadWriteMany PVC(s) are required if replicaCount > 1 +## +replicaCount: 1 +## Configure extra options for startup, liveness, and readiness probes +## @param startupProbe.enabled Enable startupProbe +## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe +## @param startupProbe.periodSeconds Period seconds for startupProbe +## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe +## @param startupProbe.failureThreshold Failure threshold for startupProbe +## @param startupProbe.successThreshold Success threshold for startupProbe +## +startupProbe: + enabled: true + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param livenessProbe.enabled Enable livenessProbe ## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe @@ -112,7 +139,6 @@ readinessProbe: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 5 - ## Command and args for running the container (set to default if not set). Use array form ## @param command Override default container command (useful when using custom images) ## @@ -121,13 +147,11 @@ command: [] ## @param args Override default container args (useful when using custom images) ## args: [] - ## Deployment pod host aliases ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ ## @param hostAliases Add deployment host aliases ## hostAliases: [] - ## wavefront-prometheus-storage-adapter resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## @@ -146,7 +170,6 @@ resources: requests: {} # cpu: 200m # memory: 10Mi - ## wavefront-prometheus-storage-adapter containers' Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container ## @param containerSecurityContext.enabled Enabled Adapter containers' Security Context @@ -157,7 +180,6 @@ containerSecurityContext: enabled: true runAsUser: 1001 runAsNonRoot: true - ## wavefront-prometheus-storage-adapter pods' Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param podSecurityContext.enabled Enabled Adapter pods' Security Context @@ -166,21 +188,18 @@ containerSecurityContext: podSecurityContext: enabled: true fsGroup: 1001 - ## Pod affinity preset ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## Allowed values: soft, hard ## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` ## podAffinityPreset: "" - ## Pod anti-affinity preset ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` ## Allowed values: soft, hard ## podAntiAffinityPreset: soft - ## Node affinity preset ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity ## Allowed values: soft, hard @@ -205,59 +224,64 @@ nodeAffinityPreset: ## - e2e-az2 ## values: [] - ## Affinity for pod assignment. Evaluated as a template. ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## @param affinity Affinity for pod assignment ## affinity: {} - ## Node labels for pod assignment. Evaluated as a template. ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## @param nodeSelector Node labels for pod assignment ## nodeSelector: {} - ## Tolerations for pod assignment. Evaluated as a template. ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## @param tolerations Tolerations for pod assignment ## tolerations: [] - ## Pod extra labels ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ ## ## @param podLabels Extra labels for Adapter pods ## podLabels: {} - ## Annotations for server pods. ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## @param podAnnotations Annotations for Adapter pods ## podAnnotations: {} - ## wavefront-prometheus-storage-adapter pods' priority. ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ ## @param priorityClassName Adapter pod priority ## priorityClassName: "" - +## @param schedulerName Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +schedulerName: "" +## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template +## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods +## +topologySpreadConstraints: {} +## @param terminationGracePeriodSeconds Termination grace period in seconds +## +terminationGracePeriodSeconds: "" ## lifecycleHooks for the wavefront-prometheus-storage-adapter container to automate configuration before or after startup. ## @param lifecycleHooks Add lifecycle hooks to the Adapter deployment ## lifecycleHooks: {} - +## Custom Startup probes wavefront-prometheus-storage-adapter +## @param customStartupProbe Override default startup probe +## +customStartupProbe: {} ## Custom Liveness probes for wavefront-prometheus-storage-adapter ## @param customLivenessProbe Override default liveness probe ## customLivenessProbe: {} - ## Custom Rediness probes wavefront-prometheus-storage-adapter ## @param customReadinessProbe Override default readiness probe ## customReadinessProbe: {} - ## Update strategy - only really applicable for deployments with RWO PVs attached ## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the ## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will @@ -266,11 +290,16 @@ customReadinessProbe: {} ## updateStrategy: type: RollingUpdate - ## Adapter Container port -## @param containerPort Adapter container port +## containerPort DEPRECATED: use containerPorts.grpc instead. ## -containerPort: 1234 +## containerPort: 1234 +## +## Container ports +## @param containerPorts.http Adapter HTTP container port +## +containerPorts: + http: 1234 ## Additional environment variables to set ## Example: ## extraEnvVars: @@ -279,27 +308,22 @@ containerPort: 1234 ## @param extraEnvVars Add extra environment variables to the Adapter container ## extraEnvVars: [] - ## ConfigMap with extra environment variables ## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars ## extraEnvVarsCM: "" - ## Secret with extra environment variables ## @param extraEnvVarsSecret Name of existing Secret containing extra env vars ## extraEnvVarsSecret: "" - ## Extra volumes to add to the deployment ## @param extraVolumes Optionally specify extra list of additional volumes for Adapter pods ## extraVolumes: [] - ## Extra volume mounts to add to the container ## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for Adapter container(s) ## extraVolumeMounts: [] - ## Add init containers to the wavefront-prometheus-storage-adapter pods. ## Example: ## initContainers: @@ -312,7 +336,6 @@ extraVolumeMounts: [] ## @param initContainers Add additional init containers to the Adapter pods ## initContainers: [] - ## Add sidecars to the wavefront-prometheus-storage-adapter pods. ## Example: ## sidecars: @@ -326,7 +349,6 @@ initContainers: [] ## @param sidecars Add additional sidecar containers to the Adapter pod ## sidecars: [] - ## Use an external wavefront-proxy host ## externalProxy: @@ -336,12 +358,10 @@ externalProxy: ## @param externalProxy.port Host of a wavefront-proxy instance (required if wavefront.enabled = false) ## port: 2878 - ## Adapter prefix parameter ## @param adapterPrefix Adapter `prefix` parameter ## adapterPrefix: "" - ## Adapter tags parameter ## @param adapterTags Adapter `tags` parameter ## @@ -355,9 +375,20 @@ service: ## type: ClusterIP ## HTTP Port - ## @param service.port Adapter service port + ## service.port DEPRECATED: use service.ports.http instead. ## - port: 1234 + ## port: 1234 + ## + ## HTTP Port + ## @param service.ports.http Adapter service HTTP port + ## + ports: + http: 1234 + ## @param service.clusterIP Adapter service Cluster IP + ## e.g.: + ## clusterIP: None + ## + clusterIP: "" ## loadBalancerIP for the Service (optional, cloud specific) ## ref: https://kubernetes.io/docs/user-guide/services/#type-loadbalancer ## @param service.loadBalancerIP Adapter service LoadBalancer IP @@ -371,6 +402,22 @@ service: ## - 10.10.10.0/24 ## loadBalancerSourceRanges: [] + ## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value) + ## + extraPorts: [] + ## @param service.annotations Additional custom annotations for Adapter service + ## + annotations: {} + ## @param service.sessionAffinity Control where client requests go, to the same pod or round-robin + ## Values: ClientIP or None + ## ref: https://kubernetes.io/docs/user-guide/services/ + ## + sessionAffinity: "None" + ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + sessionAffinityConfig: {} ## ## nodePorts: ## http: