Skip to content

Commit 35c0c4f

Browse files
reixdRainer 'rei' Schuth
andauthored
[proxysql] init job disable ssl (#146)
Co-authored-by: Rainer 'rei' Schuth <rainer.schuth@digital-results-international.com>
1 parent 6e4fef2 commit 35c0c4f

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

charts/proxysql/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: 3.0.8
44
description: ProxySQL Helm chart for Kubernetes
55
name: proxysql
6-
version: 1.2.0
6+
version: 1.2.1
77
home: https://www.proxysql.com/
88
sources:
99
- https://github.com/dysnix/charts

charts/proxysql/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# proxysql
22

3-
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![AppVersion: 3.0.8](https://img.shields.io/badge/AppVersion-3.0.8-informational?style=flat-square)
3+
![Version: 1.2.1](https://img.shields.io/badge/Version-1.2.1-informational?style=flat-square) ![AppVersion: 3.0.8](https://img.shields.io/badge/AppVersion-3.0.8-informational?style=flat-square)
44

55
ProxySQL Helm chart for Kubernetes
66

@@ -103,7 +103,7 @@ ProxySQL Helm chart for Kubernetes
103103
| mysql_query_rules | string | `nil` | Configure mysql_query_rules. |
104104
| use_default_proxysql_servers | bool | `true` | Configure use_default_proxysql_servers. |
105105
| additional_proxysql_servers | string | `nil` | Configure additional_proxysql_servers. |
106-
| proxysql_cluster | object | `{"core":{"enabled":true,"exit_on_error":false,"podDisruptionBudget":{},"priorityClassName":"","replicas":3,"service":{"name":""},"statefullset":{"affinity":{},"minReadySeconds":0,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"updateStrategy":{"type":"RollingUpdate"}}},"enabled":false,"healthcheck":{"diff_check_limit":10,"kill_if_healthcheck_failed":true,"livenessCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh liveness"],"psql_host":"127.0.0.1","psql_host_port":null,"psql_pass":null,"psql_user":null,"readinessCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh readiness"],"startupCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh started"],"verbose":false},"job":{"affinity":{},"backoffLimit":3,"enabled":true,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"ttlSecondsAfterFinished":86400},"satellite":{"daemonset":{"affinity":{},"minReadySeconds":0,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"updateStrategy":{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}},"deployment":{"minReadySeconds":0,"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0},"type":"RollingUpdate"}},"enabled":true,"exit_on_error":false,"kind":"DaemonSet","podDisruptionBudget":{},"priorityClassName":"","replicas":3,"service":{"name":""}},"secret":{"cluster_password":"proxysql","cluster_username":"proxysql-cluster"}}` | Set proxysql_cluster. |
106+
| proxysql_cluster | object | `{"core":{"enabled":true,"exit_on_error":false,"podDisruptionBudget":{},"priorityClassName":"","replicas":3,"service":{"name":""},"statefullset":{"affinity":{},"minReadySeconds":0,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"updateStrategy":{"type":"RollingUpdate"}}},"enabled":false,"healthcheck":{"diff_check_limit":10,"kill_if_healthcheck_failed":true,"livenessCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh liveness"],"psql_host":"127.0.0.1","psql_host_port":null,"psql_pass":null,"psql_user":null,"readinessCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh readiness"],"startupCommand":["/bin/sh","-c","/usr/local/bin/proxysql_cluster_healthcheck.sh started"],"verbose":false},"job":{"affinity":{},"backoffLimit":3,"enabled":true,"mysqlClientFlags":"--ssl=0","nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"ttlSecondsAfterFinished":86400},"satellite":{"daemonset":{"affinity":{},"minReadySeconds":0,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"updateStrategy":{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}},"deployment":{"minReadySeconds":0,"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0},"type":"RollingUpdate"}},"enabled":true,"exit_on_error":false,"kind":"DaemonSet","podDisruptionBudget":{},"priorityClassName":"","replicas":3,"service":{"name":""}},"secret":{"cluster_password":"proxysql","cluster_username":"proxysql-cluster"}}` | Set proxysql_cluster. |
107107
| proxysql_cluster.enabled | bool | `false` | Enable this feature. |
108108
| proxysql_cluster.secret | object | `{"cluster_password":"proxysql","cluster_username":"proxysql-cluster"}` | Component secret configuration map. |
109109
| proxysql_cluster.secret.cluster_username | string | `"proxysql-cluster"` | Set proxysql_cluster.secret.cluster_username. |
@@ -150,10 +150,11 @@ ProxySQL Helm chart for Kubernetes
150150
| proxysql_cluster.satellite.deployment.strategy.rollingUpdate.maxSurge | int | `1` | Allow one extra pod during upgrades. |
151151
| proxysql_cluster.satellite.service | object | `{"name":""}` | Service configuration. |
152152
| proxysql_cluster.satellite.service.name | string | `""` | Set proxysql_cluster.satellite.service.name. |
153-
| proxysql_cluster.job | object | `{"affinity":{},"backoffLimit":3,"enabled":true,"nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"ttlSecondsAfterFinished":86400}` | Set proxysql_cluster.job. |
153+
| proxysql_cluster.job | object | `{"affinity":{},"backoffLimit":3,"enabled":true,"mysqlClientFlags":"--ssl=0","nodeSelector":{},"podAnnotations":{},"resources":{},"tolerations":[],"ttlSecondsAfterFinished":86400}` | Set proxysql_cluster.job. |
154154
| proxysql_cluster.job.enabled | bool | `true` | Enable this feature. |
155155
| proxysql_cluster.job.backoffLimit | int | `3` | Set proxysql_cluster.job.backoffLimit. |
156156
| proxysql_cluster.job.ttlSecondsAfterFinished | int | `86400` | Set proxysql_cluster.job.ttlSecondsAfterFinished. |
157+
| proxysql_cluster.job.mysqlClientFlags | string | `"--ssl=0"` | Extra mysql client flags used by init-cluster job. Default disables TLS for internal admin connection to avoid certificate trust errors. |
157158
| proxysql_cluster.job.nodeSelector | object | `{}` | Node selector for pod scheduling. |
158159
| proxysql_cluster.job.tolerations | list | `[]` | Tolerations for pod scheduling. |
159160
| proxysql_cluster.job.affinity | object | `{}` | Affinity rules for pod scheduling. |

charts/proxysql/templates/jobs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{- if and .Values.proxysql_cluster.enabled .Values.proxysql_cluster.job.enabled .Values.proxysql_cluster.core.enabled }}
33
{{- $coreServiceName := printf "%s-core.%s.svc" (include "proxysql.fullname" .) .Release.Namespace }}
44
{{- $coreServiceAdminPort := (.Values.proxysql_cluster.healthcheck.psql_host_port | default .Values.service.adminPort) }}
5+
{{- $mysqlClientFlags := .Values.proxysql_cluster.job.mysqlClientFlags }}
56
apiVersion: batch/v1
67
kind: Job
78
metadata:
@@ -78,7 +79,7 @@ spec:
7879
- >
7980
mysql --user=${PSQL_USER} --password=${PSQL_PASSWORD}
8081
--host={{ $coreServiceName }} --port={{ $coreServiceAdminPort }}
81-
--wait -vv < /data/update-cluster-checksums.sql
82+
{{- if $mysqlClientFlags }} {{ $mysqlClientFlags }}{{- end }} --wait -vv < /data/update-cluster-checksums.sql
8283
resources:
8384
{{- toYaml (default .Values.resources .Values.proxysql_cluster.job.resources) | nindent 12 }}
8485
env:

charts/proxysql/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ proxysql_cluster:
528528
# -- Set proxysql_cluster.job.ttlSecondsAfterFinished.
529529
ttlSecondsAfterFinished: 86400
530530

531+
# -- Extra mysql client flags used by init-cluster job.
532+
# Default disables TLS for internal admin connection to avoid certificate trust errors.
533+
mysqlClientFlags: "--ssl=0"
534+
531535
# -- Node selector for pod scheduling.
532536
nodeSelector: {}
533537
# -- Tolerations for pod scheduling.

0 commit comments

Comments
 (0)