Skip to content

Commit 58eb019

Browse files
committed
clean up simln chart
1 parent e88a626 commit 58eb019

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

resources/plugins/simln/charts/simln/files/sim.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
{
44
"id": "tank-0000-ln",
55
"address": "https://tank-0004-ln:10009",
6-
"macaroon": "/config/admin.macaroon",
7-
"cert": "/config/tls.cert"
6+
"macaroon": "/working/admin.macaroon",
7+
"cert": "/working/tls.cert"
88
},
99
{
1010
"id": "tank-0001-ln",
1111
"address": "https://tank-0005-ln:10009",
12-
"macaroon": "/config/admin.macaroon",
13-
"cert": "/config/tls.cert"
12+
"macaroon": "/working/admin.macaroon",
13+
"cert": "/working/tls.cert"
1414
}
1515
]
1616
}

resources/plugins/simln/charts/simln/templates/pod.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,40 @@ metadata:
77
mission: plugin
88
spec:
99
initContainers:
10-
- name: decode-macaroon
11-
image: busybox
12-
command: ["sh", "-c"]
10+
- name: "init-container"
11+
image: "busybox"
12+
command:
13+
- "sh"
14+
- "-c"
1315
args:
14-
- |
15-
cp /configmap/* /config
16-
cat /config/admin.macaroon.hex | xxd -r -p > /config/admin.macaroon
16+
- >
17+
cp /configmap/* /working;
18+
cd /working;
19+
cat admin.macaroon.hex | xxd -r -p > admin.macaroon
1720
volumeMounts:
18-
- name: config-volume
19-
mountPath: /config
20-
- name: configmap-volume
21-
mountPath: /configmap
21+
- name: {{ .Values.workingVolume.name }}
22+
mountPath: {{ .Values.workingVolume.mountPath }}
23+
- name: {{ .Values.configmapVolume.name }}
24+
mountPath: {{ .Values.configmapVolume.mountPath }}
2225
containers:
2326
- name: {{ .Values.name }}
2427
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2528
imagePullPolicy: {{ .Values.image.pullPolicy }}
26-
command: {{ .Values.command | toJson }}
27-
args: {{ .Values.args | toJson }}
29+
command:
30+
- "sh"
31+
- "-c"
32+
args:
33+
- >
34+
cd /working;
35+
sim-cli
2836
volumeMounts:
29-
- name: config-volume
30-
mountPath: /config
31-
- name: configmap-volume
32-
mountPath: /configmap
37+
- name: {{ .Values.workingVolume.name }}
38+
mountPath: {{ .Values.workingVolume.mountPath }}
39+
- name: {{ .Values.configmapVolume.name }}
40+
mountPath: {{ .Values.configmapVolume.mountPath }}
3341
volumes:
34-
- name: configmap-volume
42+
- name: {{ .Values.configmapVolume.name }}
3543
configMap:
3644
name: {{ include "mychart.fullname" . }}-data
37-
- name: config-volume
45+
- name: {{ .Values.workingVolume.name }}
3846
emptyDir: {}

resources/plugins/simln/charts/simln/values.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ image:
33
repository: "mplsgrant/sim-ln"
44
tag: "d8c165d"
55
pullPolicy: IfNotPresent
6-
command: ["sh", "-c"]
7-
args: ["cd /config; sim-cli"]
6+
7+
workingVolume:
8+
name: working-volume
9+
mountPath: /working
10+
configmapVolume:
11+
name: configmap-volume
12+
mountPath: /configmap
13+
814
defaultDataDir: /app/data

0 commit comments

Comments
 (0)