Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ride-the-lightning] New #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions charts/ride-the-lightning/templates/configmap-rtl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.rtl.enable -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "lnd.fullname" . }}-rtl
labels:
app: {{ template "lnd.name" . }}-rtl
chart: {{ template "lnd.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ toYaml .Values.rtl.config | indent 2 }}
{{- end }}
70 changes: 70 additions & 0 deletions charts/ride-the-lightning/templates/rtl_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{{- if .Values.rtl.enable -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "lnd.fullname" . }}-rtl
labels:
app: {{ template "lnd.name" . }}-rtl
chart: {{ template "lnd.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: {{ template "lnd.name" . }}-rtl
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
labels:
app: {{ template "lnd.name" . }}-rtl
release: {{ .Release.Name }}
spec:
terminationGracePeriodSeconds: 60
initContainers:
- name: copy-config
image: busybox
command: ['sh', '-c', 'cp /config/* /RTL/']
volumeMounts:
- name: config
mountPath: /config
- name: rtl
mountPath: /RTL
- name: copy-macaroons
image: busybox
command: ['sh', '-c', 'for m in /nodes/*.macaroon; do mkdir -p "/credentials${m%.*}" && cp "$m" "/credentials/${m%.*}/admin.macaroon"; done']
volumeMounts:
- name: nodes
mountPath: /nodes
- name: credentials
mountPath: /credentials
containers:
- name: rtl
image: {{ .Values.rtl.image.repository }}:{{ .Values.rtl.image.tag }}
ports:
- name: http
containerPort: {{ .Values.rtl.port }}
volumeMounts:
- name: rtl
mountPath: /RTL/RTL-Config.json
subPath: RTL-Config.json
- name: credentials
mountPath: /credentials
resources:
requests:
cpu: "10m"
volumes:
- name: rtl
emptyDir: {}
- name: credentials
emptyDir: {}
- name: config
configMap:
name: {{ template "lnd.fullname" . }}-rtl
- name: nodes
secret:
secretName: {{ .Values.rtl.nodeMacaroonSecret}}
{{- end }}
38 changes: 38 additions & 0 deletions charts/ride-the-lightning/templates/rtl_ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if .Values.ingress.rtl.enable -}}
{{- $fullName := include "lnd.fullname" . -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-rtl
{{- with .Values.ingress.rtl.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.rtl.tls }}
tls:
{{- range .Values.ingress.rtl.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.rtl.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
backend:
serviceName: {{ $fullName }}-rtl
servicePort: {{ .port }}
{{- end }}
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions charts/ride-the-lightning/templates/rtl_svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.rtl.enable -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "lnd.fullname" . }}-rtl
labels:
app: {{ template "lnd.name" . }}-rtl
chart: {{ template "lnd.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
ports:
- name: http
port: {{ .Values.rtl.port }}
targetPort: 3000
selector:
app: {{ template "lnd.name" . }}-rtl
release: {{ .Release.Name }}
{{- end }}
42 changes: 42 additions & 0 deletions charts/ride-the-lightning/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
port: 3000
config:
RTL-Config.json: |-
{
"multiPass": "password",
"port": "3000",
"defaultNodeIndex": 1,
"SSO": {
"rtlSSO": 0,
},
"nodes": [
{
"index": 1,
"lnNode": "Node 1",
"lnImplementation": "LND",
"Authentication": {
"macaroonPath": "/root/nodes/macaroon-1.macaroon",
"lnServerUrl": "https://lnd-1:8080",
},
"Settings": {}
}
]
}
nodeMacaroonSecret: rtl-nodes
image:
repository: shahanafarooqui/rtl
tag: 0.12.2

ingress:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/enable-cors: "true"
hosts:
- host: rtl.lnd.dev.flitz.be
paths:
- path: /
port: 3000
tls:
- hosts:
- rtl.lnd.dev.flitz.be
secretName: lnd-rtl-tls-secret
Loading