From 357e1fc30a9867dbc1f74d9fa352dcf6ab18246a Mon Sep 17 00:00:00 2001 From: Benjamin Hindman Date: Thu, 26 Feb 2026 12:47:40 -0600 Subject: [PATCH 1/2] feat(strfry): make chart generic and configurable - Switch to upstream dockurr/strfry image - Parameterize NIP-11 relay info and write policy plugin via values.yaml - Add optional Vector sidecar with configurable console and Honeycomb sinks - Create Honeycomb secret from values when apiKey is set Co-Authored-By: Claude Sonnet 4.6 --- charts/strfry/templates/configmap.yml | 10 +++---- charts/strfry/templates/deployment.yaml | 15 +++++++++- charts/strfry/templates/secrets.yaml | 9 ++++++ charts/strfry/templates/vector-configmap.yml | 8 +++++- charts/strfry/values.yaml | 30 ++++++++++++++------ 5 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 charts/strfry/templates/secrets.yaml diff --git a/charts/strfry/templates/configmap.yml b/charts/strfry/templates/configmap.yml index 875d0fc3a..78cd055cb 100644 --- a/charts/strfry/templates/configmap.yml +++ b/charts/strfry/templates/configmap.yml @@ -60,16 +60,16 @@ data: info { # NIP-11: Name of this server. Short/descriptive (< 30 characters) - name = "Flash Relay" + name = {{ .Values.strfry.nip11.name | quote }} # NIP-11: Detailed information about relay, free-form - description = "For enhancing the payment experience for Flash users with other Lightning users.This relay is meant to serve the Flash application and it's users. Unrelated notes may not be persisted or relayed." + description = {{ .Values.strfry.nip11.description | quote }} # NIP-11: Administrative nostr pubkey, for contact purposes - pubkey = "" + pubkey = {{ .Values.strfry.nip11.pubkey | quote }} # NIP-11: Alternative administrative contact (email, website, etc) - contact = "" + contact = {{ .Values.strfry.nip11.contact | quote }} } # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required) @@ -92,7 +92,7 @@ data: writePolicy { # If non-empty, path to an executable script that implements the writePolicy plugin logic - plugin = "/app/whitelist.js" + plugin = {{ .Values.strfry.writePolicy.plugin | quote }} } compression { diff --git a/charts/strfry/templates/deployment.yaml b/charts/strfry/templates/deployment.yaml index dd801a8a6..af8da6077 100644 --- a/charts/strfry/templates/deployment.yaml +++ b/charts/strfry/templates/deployment.yaml @@ -25,24 +25,35 @@ spec: - name: strfry-conf mountPath: /etc/strfry.conf subPath: strfry.conf + {{- if .Values.vector.enabled }} - name: strfry-logs mountPath: /app/logs + {{- end }} + {{- if .Values.vector.enabled }} - name: vector image: timberio/vector:0.34.X-debian env: - name: VECTOR_CONFIG value: /etc/vector/vector.toml + {{- if .Values.vector.sinks.honeycomb.apiKey }} + - name: HONEYCOMB_API_KEY + valueFrom: + secretKeyRef: + name: {{ include "strfry.fullname" . }}-honeycomb + key: apiKey + {{- end }} resources: limits: memory: 100Mi cpu: 100m volumeMounts: - name: strfry-logs - mountPath: /app/logs # changed from /logs to /app/logs + mountPath: /app/logs - name: vector-config mountPath: /etc/vector readOnly: true + {{- end }} volumes: - name: strfry-db @@ -51,8 +62,10 @@ spec: - name: strfry-conf configMap: name: {{ include "strfry.fullname" . }}-configmap + {{- if .Values.vector.enabled }} - name: strfry-logs emptyDir: {} - name: vector-config configMap: name: vector-config + {{- end }} diff --git a/charts/strfry/templates/secrets.yaml b/charts/strfry/templates/secrets.yaml new file mode 100644 index 000000000..6dce25b5d --- /dev/null +++ b/charts/strfry/templates/secrets.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.vector.enabled .Values.vector.sinks.honeycomb.apiKey }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "strfry.fullname" . }}-honeycomb +type: Opaque +data: + apiKey: {{ .Values.vector.sinks.honeycomb.apiKey | b64enc | quote }} +{{- end }} diff --git a/charts/strfry/templates/vector-configmap.yml b/charts/strfry/templates/vector-configmap.yml index b81ec3b83..2a3e61313 100644 --- a/charts/strfry/templates/vector-configmap.yml +++ b/charts/strfry/templates/vector-configmap.yml @@ -1,3 +1,4 @@ +{{- if .Values.vector.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -39,11 +40,14 @@ data: . = encode_json(event) ''' + {{- if .Values.vector.sinks.console.enabled }} [sinks.console] type = "console" inputs = ["format_event"] encoding.codec = "text" + {{- end }} + {{- if .Values.vector.sinks.honeycomb.apiKey }} [sinks.honeycomb_raw] type = "http" inputs = ["format_event"] @@ -56,6 +60,8 @@ data: batch.timeout_secs = 1 [sinks.honeycomb_raw.request] - headers.X-Honeycomb-Team = "{{ .Values.honeycomb.apiKey }}" + headers.X-Honeycomb-Team = "${HONEYCOMB_API_KEY}" headers.Content-Type = "application/json" timeout_secs = 30 + {{- end }} +{{- end }} diff --git a/charts/strfry/values.yaml b/charts/strfry/values.yaml index 0af43a98b..dcb7559eb 100644 --- a/charts/strfry/values.yaml +++ b/charts/strfry/values.yaml @@ -1,15 +1,11 @@ -# Default values for strfry-chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - image: - repository: lnflash/strfry-custom - tag: latest - digest: e433d1ac4cc23a4e9a40ef97bcb2d5477b42bea99694d0ef5f08b2f6f4facfcd + repository: dockurr/strfry + tag: 1.0.4 + digest: df140472554e5a0b5bbe08ec417805d283098621833e44827d8018c98b74243d pullPolicy: IfNotPresent +replicaCount: 1 + persistence: enabled: true size: 1Gi @@ -21,6 +17,22 @@ fullnameOverride: "" strfry: name: "strfry" fullname: "strfry-chart" + nip11: + name: "" + description: "" + pubkey: "" + contact: "" + writePolicy: + plugin: "" # path to write policy plugin script; empty disables + +# vector: sidecar log shipper for strfry. Disabled by default. +vector: + enabled: false + sinks: + console: + enabled: true # emit filtered errors to stdout + honeycomb: + apiKey: "" # set to enable Honeycomb shipping serviceAccount: # Specifies whether a service account should be created From 2f66d90a25ebb8cc366c1e1f4ae9b824f766fa61 Mon Sep 17 00:00:00 2001 From: Benjamin Hindman Date: Fri, 27 Feb 2026 11:25:59 -0600 Subject: [PATCH 2/2] strfry 1.0.0 --- charts/strfry/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/strfry/Chart.yaml b/charts/strfry/Chart.yaml index 68285b0ef..c065f99f1 100644 --- a/charts/strfry/Chart.yaml +++ b/charts/strfry/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.3 +version: 1.0.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to