From 08045ab0125ef5a808c497e70dec99324af87940 Mon Sep 17 00:00:00 2001 From: Jason Tackaberry Date: Wed, 3 Jan 2024 18:35:46 -0500 Subject: [PATCH 1/2] Include readonly node count and endpoints in notes --- charts/rqlite/templates/NOTES.txt | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/charts/rqlite/templates/NOTES.txt b/charts/rqlite/templates/NOTES.txt index bd79ac5..7e52c9b 100644 --- a/charts/rqlite/templates/NOTES.txt +++ b/charts/rqlite/templates/NOTES.txt @@ -1,5 +1,6 @@ {{/* vi: ft=helm.mustache */}} {{- $name := tpl (include "rqlite.fullname" .) $ -}} +{{- $readonly := dig "readonly" "replicaCount" 0 .Values.AsMap -}} {{/* Construct URL for in-cluster access */}} {{- $scheme := .Values.config.tls.client.enabled | ternary "https" "http" }} {{- $svcurl := printf "%s://%s.%s.svc.cluster.local" $scheme $name .Release.Namespace }} @@ -17,8 +18,13 @@ probably an edge case. Deployment summary: Version: {{ .Values.image.tag | default .Chart.AppVersion }} - Nodes: {{ .Values.replicaCount }} + Nodes: {{ .Values.replicaCount }}{{ empty $readonly | ternary "" " (voters)" }} +{{- with $readonly }} + {{ $readonly }} (read-only) +{{- end }} Auth: {{ (empty .Values.config.users) | ternary "disabled (!)" "enabled" }} + Internode TLS: {{ .Values.config.tls.node.enabled | ternary "yes" "no" }} + Client TLS: {{ .Values.config.tls.client.enabled | ternary "yes" "no" }} Endpoints: {{ $svcurl }} (in-cluster) {{- /* If ingress is enabled, show the URLs for any defined hosts. If hosts weren't defined (user @@ -33,8 +39,15 @@ heuristic in case the user has defined a regexp-based path for URL rewriting. {{- $url | nindent 17 }} (ingress) {{- end -}} {{- end }} - Internode TLS: {{ .Values.config.tls.node.enabled | ternary "yes" "no" }} - Client TLS: {{ .Values.config.tls.client.enabled | ternary "yes" "no" }} +{{- if not (empty $readonly) -}} + {{- printf "%s://%s-readonly.%s.svc.cluster.local" $scheme $name .Release.Namespace | nindent 17 }} (in-cluster read-only) + {{- if dig "readonly" "ingress" "enabled" false .Values.AsMap }} + {{- range dig "readonly" "ingress" "hosts" list .Values.AsMap -}} + {{- $url := printf "https://%s%s" . (splitList "(" $.Values.readonly.ingress.path | first) -}} + {{- $url | nindent 17 }} (ingress read-only) + {{- end -}} + {{- end -}} +{{- end }} On another pod inside the cluster, you can issue a test query using curl: From a03a1fb88a07e3e0f68af819a97793ede3489010 Mon Sep 17 00:00:00 2001 From: Jason Tackaberry Date: Wed, 3 Jan 2024 18:36:33 -0500 Subject: [PATCH 2/2] Bump chart version to 1.0.1 --- charts/rqlite/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rqlite/Chart.yaml b/charts/rqlite/Chart.yaml index 250a24f..c9cce78 100644 --- a/charts/rqlite/Chart.yaml +++ b/charts/rqlite/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: rqlite -version: 1.0.0 +version: 1.0.1 appVersion: 8.14.1 description: The lightweight, distributed relational database built on SQLite type: application