Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/strfry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions charts/strfry/templates/configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
15 changes: 14 additions & 1 deletion charts/strfry/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
9 changes: 9 additions & 0 deletions charts/strfry/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 7 additions & 1 deletion charts/strfry/templates/vector-configmap.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.vector.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -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"]
Expand All @@ -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 }}
30 changes: 21 additions & 9 deletions charts/strfry/values.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Loading