Skip to content

Commit

Permalink
chore: 🔥 Remove cassandra_exporter
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Salmeron Garcia <[email protected]>
  • Loading branch information
javsalgar committed May 15, 2024
1 parent 94b4ab5 commit 04b11b0
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 296 deletions.
2 changes: 0 additions & 2 deletions bitnami/scylladb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ annotations:
images: |
- name: scylladb
image: docker.io/bitnami/scylladb:4.1.4-debian-12-r12
- name: scylladb-exporter
image: docker.io/bitnami/scylladb-exporter:2.3.8-debian-12-r21
- name: os-shell
image: docker.io/bitnami/os-shell:12-debian-12-r20
apiVersion: v2
Expand Down
74 changes: 22 additions & 52 deletions bitnami/scylladb/README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bitnami/scylladb/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ To connect to your database from outside the cluster execute the following comma
{{- end }}

{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.rollingTag" .Values.metrics.image }}
{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
{{- include "scylladb.validateValues" . }}
{{- include "common.warnings.resources" (dict "sections" (list "metrics" "" "tls" "jmxProxy" "volumePermissions") "context" $) }}
Expand Down
16 changes: 1 addition & 15 deletions bitnami/scylladb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ Return the proper Scylladb image name
{{ include "common.images.image" (dict "imageRoot" .Values.sysctl.image "global" .Values.global) }}
{{- end -}}

{{/*
Return the proper metrics image name
*/}}
{{- define "scylladb.metrics.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.metrics.image "global" .Values.global) }}
{{- end -}}

{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
Expand All @@ -37,7 +30,7 @@ Return the proper image name (for the init container volume-permissions image)
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "scylladb.imagePullSecrets" -}}
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) }}
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -298,10 +291,3 @@ WARNING: JVM New Heap Size not set in value jvm.newHeapSize. When not set, the c
MAX(Memory Limit (if set) / 64, 256M)
{{- end }}
{{- end -}}

{{/*
Get the metrics config map name.
*/}}
{{- define "scylladb.metricsConfConfigMap" -}}
{{- printf "%s-metrics-conf" (include "common.names.fullname" . ) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
19 changes: 0 additions & 19 deletions bitnami/scylladb/templates/metrics-configmap.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions bitnami/scylladb/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.metrics.enabled }}
- port: {{ .Values.metrics.containerPorts.http }}
- port: {{ .Values.metrics.containerPorts.jmx }}
{{- range .Values.metrics.extraContainerPorts }}
- port: {{ . }}
{{- end }}
- port: {{ .Values.containerPorts.metrics }}
{{- end }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
Expand Down
103 changes: 9 additions & 94 deletions bitnami/scylladb/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ spec:
value: {{ .Values.containerPorts.api | quote }}
- name: SCYLLADB_CQL_SHARD_PORT_NUMBER
value: {{ .Values.containerPorts.cqlShard | quote }}
- name: SCYLLADB_PROMETHEUS_PORT_NUMBER
value: {{ ternary .Values.containerPorts.metrics "0" .Values.metrics.enabled | quote }}
{{- if .Values.persistence.commitLogMountPath }}
- name: SCYLLADB_COMMITLOG_DIR
value: {{ .Values.persistence.commitLogMountPath | quote }}
Expand Down Expand Up @@ -414,6 +416,13 @@ spec:
{{- else if .Values.hostPorts.api }}
hostPort: {{ .Values.hostPorts.api }}
{{- end }}
- name: metrics
containerPort: {{ .Values.containerPorts.metrics }}
{{- if .Values.hostNetwork }}
hostPort: {{ .Values.containerPorts.metrics }}
{{- else if .Values.hostPorts.metrics }}
hostPort: {{ .Values.hostPorts.metrics }}
{{- end }}
{{- if .Values.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -588,104 +597,10 @@ spec:
{{- include "common.tplvalues.render" (dict "value" .Values.jmxProxy.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ include "scylladb.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.metrics.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.metrics.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.args "context" $) | nindent 12 }}
{{- end }}
ports:
- name: metrics
containerPort: {{ .Values.metrics.containerPorts.http }}
{{- if .Values.hostNetwork }}
hostPort: {{ .Values.metrics.containerPorts.http }}
{{- else if .Values.metrics.hostPorts.http }}
hostPort: {{ .Values.metrics.hostPorts.http }}
{{- end }}
protocol: TCP
- name: jmx
containerPort: {{ .Values.metrics.containerPorts.jmx }}
{{- if .Values.hostNetwork }}
hostPort: {{ .Values.metrics.containerPorts.jmx }}
{{- else if .Values.metrics.hostPorts.jmx }}
hostPort: {{ .Values.metrics.hostPorts.jmx }}
{{- end }}
{{- if .Values.metrics.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.metrics.resources }}
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
{{- else if ne .Values.metrics.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.metrics.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.metrics.livenessProbe.enabled }}
livenessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }}
{{- end }}
{{- if .Values.metrics.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.metrics.livenessProbe.enabled }}
readinessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }}
{{- end }}
{{- if .Values.metrics.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.metrics.startupProbe.enabled }}
startupProbe:
tcpSocket:
port: metrics
initialDelaySeconds: {{ .Values.metrics.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.metrics.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.metrics.startupProbe.timeoutSeconds }}
failureThreshold: {{ .Values.metrics.startupProbe.failureThreshold }}
successThreshold: {{ .Values.metrics.startupProbe.successThreshold }}
{{- end }}
{{- if .Values.metrics.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- end }}
volumeMounts:
- name: metrics-conf
mountPath: /opt/bitnami/cassandra-exporter/config.yml
subPath: config.yml
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if .Values.metrics.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: metrics-conf
configMap:
name: {{ include "scylladb.metricsConfConfigMap" . }}
{{- if (include "scylladb.tlsEncryption" . ) }}
- name: certs
secret:
Expand Down
113 changes: 5 additions & 108 deletions bitnami/scylladb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ hostNetwork: false
## @param containerPorts.cql CQL Port on the Host and Container
## @param containerPorts.cqlShard CQL Port (Shard) on the Host and Container
## @param containerPorts.api REST API port on the Host and Container
## @param containerPorts.metrics Metrics port on the Host and Container
##
containerPorts:
intra: 7000
Expand All @@ -467,6 +468,7 @@ containerPorts:
cql: 9042
cqlShard: 19042
api: 10000
metrics: 9180
## @param extraContainerPorts Optionally specify extra list of additional ports for the container
## e.g:
## extraContainerPorts:
Expand All @@ -482,6 +484,7 @@ extraContainerPorts: []
## @param hostPorts.cql CQL Port on the Host
## @param hostPorts.cqlShard CQL (Sharded) Port on the Host
## @param hostPorts.api REST API Port on the Host
## @param hostPorts.metrics Metrics Port on the Host
##
hostPorts:
intra: ""
Expand All @@ -490,6 +493,7 @@ hostPorts:
cql: ""
cqlShard: ""
api: ""
metrics: ""

## @section JMX Proxy Deployment Parameters
##
Expand Down Expand Up @@ -911,119 +915,12 @@ metrics:
## @param metrics.enabled Start a side-car prometheus exporter
##
enabled: false
## Bitnami Scylladb Exporter image
## ref: https://hub.docker.com/r/bitnami/scylladb-exporter/tags/
## @param metrics.image.registry [default: REGISTRY_NAME] Scylladb exporter image registry
## @param metrics.image.repository [default: REPOSITORY_NAME/scylladb-exporter] Scylladb exporter image name
## @skip metrics.image.tag Scylladb exporter image tag
## @param metrics.image.digest Scylladb exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param metrics.image.pullPolicy image pull policy
## @param metrics.image.pullSecrets Specify docker-registry secret names as an array
##
image:
registry: docker.io
repository: bitnami/cassandra-exporter
tag: 2.3.8-debian-12-r21
digest: ""
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
## e.g:
## pullSecrets:
## - myRegistryKeySecretName
##
pullSecrets: []
## @param metrics.command Command for running the container (set to default if not set). Use array form
##
command: []
## @param metrics.args Args for running the container (set to default if not set). Use array form
##
args: []
## Scylladb Prometheus exporter resource requests and limits
## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
## We usually recommend not to specify default resources and to leave this as a conscious
## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube. If you do want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).
## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
##
resourcesPreset: "nano"
## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
## Example:
## resources:
## requests:
## cpu: 2
## memory: 512Mi
## limits:
## cpu: 3
## memory: 1024Mi
##
resources: {}
## @param metrics.livenessProbe.enabled Enable liveness probe
## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
##
livenessProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 45
failureThreshold: 3
successThreshold: 1
## @param metrics.readinessProbe.enabled Enable readiness probe
## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
##
readinessProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 45
failureThreshold: 3
successThreshold: 1
## @param metrics.startupProbe.enabled Enable startup probe
## @param metrics.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
## @param metrics.startupProbe.periodSeconds Period seconds for startupProbe
## @param metrics.startupProbe.timeoutSeconds Timeout seconds for startupProbe
## @param metrics.startupProbe.failureThreshold Failure threshold for startupProbe
## @param metrics.startupProbe.successThreshold Success threshold for startupProbe
##
startupProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 45
failureThreshold: 3
successThreshold: 1
## @param metrics.customLivenessProbe Custom livenessProbe that overrides the default one
##
customLivenessProbe: {}
## @param metrics.customReadinessProbe Custom readinessProbe that overrides the default one
##
customReadinessProbe: {}
## @param metrics.customStartupProbe [object] Override default startup probe
##
customStartupProbe: {}
## @param metrics.extraVolumeMounts Optionally specify extra list of additional volumeMounts for scylladb-exporter container
##
extraVolumeMounts: []
## @param metrics.podAnnotations [object] Metrics exporter pod Annotation and Labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
## @param metrics.lifecycleHooks [object] Override default container hooks
##
lifecycleHooks: {}
prometheus.io/port: "{{ .Values.containerPorts.metrics }}"
## Prometheus Operator ServiceMonitor configuration
##
serviceMonitor:
Expand Down

0 comments on commit 04b11b0

Please sign in to comment.