Skip to content

Commit

Permalink
Add helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoquintanav committed Aug 17, 2022
1 parent 6b9fe6e commit 9befeb1
Show file tree
Hide file tree
Showing 29 changed files with 779 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# auroral-node-helm-chart
Helm chart for auroral node https://github.com/AuroralH2020/auroral-node

Helm chart for auroral node <https://github.com/AuroralH2020/auroral-node>
26 changes: 26 additions & 0 deletions manifests/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# helm secrets decoded files
*.yaml.dec
8 changes: 8 additions & 0 deletions manifests/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: auroral-node
description: A generated Helm Chart for docker-compose from Skippbox Kompose
version: 0.0.1
apiVersion: v1
keywords:
- docker-compose
sources:
home:
1 change: 1 addition & 0 deletions manifests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This chart was created by Kompose from <https://github.com/AuroralH2020/auroral-node> and adapted by [aiguasol](https://aiguasol.coop/).
14 changes: 14 additions & 0 deletions manifests/templates/aur-gateway-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: aur-gateway
name: aur-gateway
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
status: {}
13 changes: 13 additions & 0 deletions manifests/templates/aur-helio-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: aur-helio
creationTimestamp: null
labels:
io.kompose.service: aur-helio
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
14 changes: 14 additions & 0 deletions manifests/templates/aur-redis-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: aur-redis
name: aur-redis
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
status: {}
14 changes: 14 additions & 0 deletions manifests/templates/aur-triplestore-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: aur-triplestore
name: aur-triplestore
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: auroral-agent-claim0
name: auroral-agent-claim0
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}
26 changes: 26 additions & 0 deletions manifests/templates/auroral-agent-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-agent-config
data:
.env: |
ADAPTER_HOST={{ .Values.adapter_host | quote }}
ADAPTER_MODE={{ .Values.adapter_mode | quote }}
ADAPTER_PORT={{ .Values.adapter_port }}
DB_CACHE_ENABLED={{ .Values.db_cache_enabled | quote}}
DB_CACHE_TTL={{ .Values.db_cache_ttl }}
DB_HOST={{ .Values.db_host }}
DB_PORT={{ .Values.db_port }}
EXTERNAL_PORT={{ .Values.external_port }}
GTW_HOST={{ .Values.gtw_host | quote }}
GTW_PORT={{ .Values.gtw_port }}
GTW_TIMEOUT={{ .Values.gtw_timeout }}
IP={{ .Values.ip }}
NODE_ENV={{ .Values.node_env | quote }}
PORT={{ .Values.port }}
WOT_ENABLED={{ .Values.wot_enabled | quote }}
WOT_HOST={{ .Values.wot_host }}
WOT_PORT={{ .Values.wot_port }}
DB_PASSWORD={{ .Values.db_password | quote }}
GTW_ID={{ .Values.gtw_id | quote }}
GTW_PWD={{ .Values.gtw_pwd | quote }}
51 changes: 51 additions & 0 deletions manifests/templates/auroral-agent-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: auroral-agent
name: auroral-agent
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: auroral-agent
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: auroral-agent
spec:
containers:
- image: ghcr.io/auroralh2020/auroral-node-agent:latest
imagePullPolicy: Always
ports:
- containerPort: {{ .Values.port }}
livenessProbe:
exec:
command:
- node
- healthcheck.js
failureThreshold: 10
periodSeconds: 15
timeoutSeconds: 15
name: auroral-agent
resources: {}
volumeMounts:
- mountPath: /app/.env
name: {{ .Release.Name }}-agent-config-volume
subPath: .env
restartPolicy: Always
volumes:
- name: {{ .Release.Name }}-agent-config-volume
configMap:
name: {{ .Release.Name }}-agent-config
status: {}
19 changes: 19 additions & 0 deletions manifests/templates/auroral-agent-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: auroral-agent
name: auroral-agent
spec:
ports:
- name: {{ .Values.port | quote }}
port: {{ .Values.port }}
targetPort: {{ .Values.port }}
selector:
io.kompose.service: auroral-agent
status:
loadBalancer: {}
60 changes: 60 additions & 0 deletions manifests/templates/cache-db-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: cache-db
name: cache-db
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: cache-db
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: cache-db
spec:
containers:
- args:
- bash
- -c
- ' docker-entrypoint.sh --requirepass {{ .Values.db_password | quote }} --bind "0.0.0.0" '
image: redis:6.2.6-buster
livenessProbe:
exec:
command:
- redis-cli
- ping
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 5
name: cache-db
ports:
- containerPort: {{ .Values.db_port }}
resources: {}
volumeMounts:
- mountPath: /data
name: aur-redis
# initContainers:
# - name: make-backup-dir
# image: redis:6.2.6-buster
# command: ["cp", "-r", "/data", "/tmp/"]
# volumeMounts:
# - name: aur-redis
# mountPath: /tmp/
restartPolicy: Always
volumes:
- name: aur-redis
persistentVolumeClaim:
claimName: aur-redis
status: {}
19 changes: 19 additions & 0 deletions manifests/templates/cache-db-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -c
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: cache-db
name: cache-db
spec:
ports:
- name: {{ .Values.db_port | quote }}
port: {{ .Values.db_port }}
targetPort: {{ .Values.db_port }}
selector:
io.kompose.service: cache-db
status:
loadBalancer: {}
22 changes: 22 additions & 0 deletions manifests/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: ConfigMap
data:
ADAPTER_HOST: {{ .Values.adapter_host | quote }}
ADAPTER_MODE: {{ .Values.adapter_mode | quote }}
ADAPTER_PORT: {{ .Values.adapter_port | quote }}
DB_CACHE_ENABLED: {{ .Values.db_cache_enabled | quote }}
DB_CACHE_TTL: {{ .Values.db_cache_ttl | quote }}
DB_HOST: {{ .Values.db_host | quote }}
DB_PORT: {{ .Values.db_port | quote }}
EXTERNAL_PORT: {{ .Values.external_port | quote }}
GTW_HOST: {{ .Values.gtw_host | quote }}
GTW_PORT: {{ .Values.gtw_port | quote }}
GTW_TIMEOUT: {{ .Values.gtw_timeout | quote }}
IP: {{ .Values.ip | quote }}
NODE_ENV: {{ .Values.node_env | quote }}
PORT: {{ .Values.port | quote }}
WOT_ENABLED: {{ .Values.wot_enabled | quote }}
WOT_HOST: {{ .Values.wot_host | quote }}
WOT_PORT: {{ .Values.wot_port | quote }}
metadata:
name: {{ .Release.Name }}-config
6 changes: 6 additions & 0 deletions manifests/templates/dockerhub-login.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# dockerhub login stored with sops, see https://helm.sh/docs/howto/charts_tips_and_tricks/#creating-image-pull-secrets
{{- define "imagePullSecret" }}
{{- with .Values.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
Loading

0 comments on commit 9befeb1

Please sign in to comment.