Skip to content

Commit 12756d3

Browse files
committed
add ark plugin
1 parent 23823a6 commit 12756d3

File tree

14 files changed

+178
-0
lines changed

14 files changed

+178
-0
lines changed

resources/plugins/ark/ark.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from hooks_api import post_status, pre_status
2+
3+
4+
@pre_status
5+
def print_something_first():
6+
print("The ark plugin is enabled.")
7+
8+
9+
@post_status
10+
def print_something_afterwards():
11+
print("The ark plugin executes after `status` has run.")
12+
13+
14+
def run():
15+
print("Running the ark plugin")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: aspd
3+
description: A Helm chart to deploy aspd
4+
version: 0.1.0
5+
appVersion: "alpha-git-tag"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Thank you for installing aspd.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- define "mychart.name" -}}
2+
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
3+
{{- end -}}
4+
5+
{{- define "mychart.fullname" -}}
6+
{{- printf "%s-%s" (include "mychart.name" .) .Release.Name | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ .Release.Name }}-{{ .Values.name }}
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: {{ .Release.Name }}-{{ .Values.name }}
10+
template:
11+
metadata:
12+
labels:
13+
app: {{ .Release.Name }}-{{ .Values.name }}
14+
spec:
15+
containers:
16+
- name: {{ .Values.name }}-main
17+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
18+
command: ["aspd", "start", "--datadir", "{{ .Values.datadir }}"]
19+
volumeMounts:
20+
- name: data-volume
21+
mountPath: "{{ .Values.datadir }}"
22+
env:
23+
- name: BITCOIND_URL
24+
value: "{{ .Values.bitcoind.url }}"
25+
- name: BITCOIND_COOKIE
26+
valueFrom:
27+
secretKeyRef:
28+
name: {{ .Release.Name }}-bitcoind
29+
key: cookie
30+
initContainers:
31+
- name: {{ .Values.name }}-setup
32+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
33+
command:
34+
[
35+
"aspd", "create",
36+
"--network", "{{ .Values.network }}",
37+
"--datadir", "{{ .Values.datadir }}",
38+
"--bitcoind-url", "{{ .Values.bitcoind.url }}",
39+
"--bitcoind-cookie", "$(BITCOIND_COOKIE)"
40+
]
41+
env:
42+
- name: BITCOIND_COOKIE
43+
valueFrom:
44+
secretKeyRef:
45+
name: {{ .Release.Name }}-bitcoind
46+
key: cookie
47+
volumeMounts:
48+
- name: data-volume
49+
mountPath: "{{ .Values.datadir }}"
50+
volumes:
51+
- name: data-volume
52+
emptyDir: {}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "aspd"
2+
3+
image:
4+
repository: "mplsgrant/aspd"
5+
tag: "d1200b9"
6+
pullPolicy: IfNotPresent
7+
8+
network: regtest
9+
datadir: /data/arkdatadir
10+
11+
bitcoind:
12+
url: http://bitcoind-url:port
13+
cookie: bitcoind-cookie
14+
15+
service:
16+
type: ClusterIP
17+
port: 3535
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: bark
3+
description: A Helm chart to deploy bark
4+
version: 0.1.0
5+
appVersion: alpha-git-tag
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Thank you for installing bark.

0 commit comments

Comments
 (0)