diff --git a/README.md b/README.md index 8b839db..114153c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # auroral-node-helm-chart -Helm chart for auroral node https://github.com/AuroralH2020/auroral-node + +Helm chart for auroral node diff --git a/manifests/.helmignore b/manifests/.helmignore new file mode 100644 index 0000000..eb7cc9e --- /dev/null +++ b/manifests/.helmignore @@ -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 \ No newline at end of file diff --git a/manifests/Chart.yaml b/manifests/Chart.yaml new file mode 100644 index 0000000..592c3d2 --- /dev/null +++ b/manifests/Chart.yaml @@ -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: diff --git a/manifests/README.md b/manifests/README.md new file mode 100644 index 0000000..75e5c0d --- /dev/null +++ b/manifests/README.md @@ -0,0 +1 @@ +This chart was created by Kompose from and adapted by [aiguasol](https://aiguasol.coop/). diff --git a/manifests/templates/aur-gateway-persistentvolumeclaim.yaml b/manifests/templates/aur-gateway-persistentvolumeclaim.yaml new file mode 100644 index 0000000..a108ffc --- /dev/null +++ b/manifests/templates/aur-gateway-persistentvolumeclaim.yaml @@ -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: {} diff --git a/manifests/templates/aur-helio-persistentvolumeclaim.yaml b/manifests/templates/aur-helio-persistentvolumeclaim.yaml new file mode 100644 index 0000000..e579edb --- /dev/null +++ b/manifests/templates/aur-helio-persistentvolumeclaim.yaml @@ -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 \ No newline at end of file diff --git a/manifests/templates/aur-redis-persistentvolumeclaim.yaml b/manifests/templates/aur-redis-persistentvolumeclaim.yaml new file mode 100644 index 0000000..e16cbda --- /dev/null +++ b/manifests/templates/aur-redis-persistentvolumeclaim.yaml @@ -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: {} diff --git a/manifests/templates/aur-triplestore-persistentvolumeclaim.yaml b/manifests/templates/aur-triplestore-persistentvolumeclaim.yaml new file mode 100644 index 0000000..d3131c3 --- /dev/null +++ b/manifests/templates/aur-triplestore-persistentvolumeclaim.yaml @@ -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: {} diff --git a/manifests/templates/auroral-agent-claim0-persistentvolumeclaim.yaml b/manifests/templates/auroral-agent-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..fb85719 --- /dev/null +++ b/manifests/templates/auroral-agent-claim0-persistentvolumeclaim.yaml @@ -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: {} diff --git a/manifests/templates/auroral-agent-configmap.yaml b/manifests/templates/auroral-agent-configmap.yaml new file mode 100644 index 0000000..7e33618 --- /dev/null +++ b/manifests/templates/auroral-agent-configmap.yaml @@ -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 }} diff --git a/manifests/templates/auroral-agent-deployment.yaml b/manifests/templates/auroral-agent-deployment.yaml new file mode 100644 index 0000000..01ed4c3 --- /dev/null +++ b/manifests/templates/auroral-agent-deployment.yaml @@ -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: {} diff --git a/manifests/templates/auroral-agent-service.yaml b/manifests/templates/auroral-agent-service.yaml new file mode 100644 index 0000000..54732a8 --- /dev/null +++ b/manifests/templates/auroral-agent-service.yaml @@ -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: {} diff --git a/manifests/templates/cache-db-deployment.yaml b/manifests/templates/cache-db-deployment.yaml new file mode 100644 index 0000000..1412660 --- /dev/null +++ b/manifests/templates/cache-db-deployment.yaml @@ -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: {} diff --git a/manifests/templates/cache-db-service.yaml b/manifests/templates/cache-db-service.yaml new file mode 100644 index 0000000..3279483 --- /dev/null +++ b/manifests/templates/cache-db-service.yaml @@ -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: {} diff --git a/manifests/templates/configmap.yaml b/manifests/templates/configmap.yaml new file mode 100644 index 0000000..f243721 --- /dev/null +++ b/manifests/templates/configmap.yaml @@ -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 diff --git a/manifests/templates/dockerhub-login.tpl b/manifests/templates/dockerhub-login.tpl new file mode 100644 index 0000000..3907bd4 --- /dev/null +++ b/manifests/templates/dockerhub-login.tpl @@ -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 }} \ No newline at end of file diff --git a/manifests/templates/gateway-deployment.yaml b/manifests/templates/gateway-deployment.yaml new file mode 100644 index 0000000..26de4de --- /dev/null +++ b/manifests/templates/gateway-deployment.yaml @@ -0,0 +1,87 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: gateway + name: gateway +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: gateway + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: gateway + spec: + containers: + - name: gateway + image: ghcr.io/auroralh2020/auroral-gateway:latest + ports: + - containerPort: {{ .Values.gtw_port }} + name: web + protocol: TCP + resources: {} + volumeMounts: + - name: aur-gateway + mountPath: /gateway/persistance + initContainers: + # workaround for avoid mounting empty volumes, see + # https://stackoverflow.com/a/67091257/5819113 + # https://stackoverflow.com/a/59979968/5819113 + - name: chown-backup-dir-hack + image: busybox + command: ["sh", "-c", "chown -R 1001:1001 /data/gateway/persistance"] + volumeMounts: + - name: aur-gateway + mountPath: /data/gateway/persistance + - name: make-backup-dir + image: ghcr.io/auroralh2020/auroral-gateway:latest + command: ["cp", "-r", "/gateway/persistance", "/data/gateway/"] + volumeMounts: + - name: aur-gateway + mountPath: /data/gateway/persistance + - name: launch-gateway-agid-fill + image: ghcr.io/auroralh2020/auroral-gateway:latest + command: + - "/bin/bash" + - "-c" + - | + cd /gateway/persistance/config && ./fillAgid.sh {{ .Values.gtw_id }} + volumeMounts: + - name: aur-gateway + mountPath: /gateway/persistance + - name: launch-gateway-genkeys + image: ghcr.io/auroralh2020/auroral-gateway:latest + command: + - "/bin/bash" + - "-c" + - | + PUBKEY=/gateway/persistance/keystore/platform-pubkey.pem + if test -f "$PUBKEY"; + then + echo "$PUBKEY exists." + else + echo "$PUBKEY does not exist. Generating new ones" + cd /gateway/persistance/keystore && ./genkeys.sh; + fi; + cat /gateway/persistance/keystore/platform-pubkey.pem + volumeMounts: + - name: aur-gateway + mountPath: /gateway/persistance + restartPolicy: Always + volumes: + - name: aur-gateway + persistentVolumeClaim: + claimName: aur-gateway +status: {} diff --git a/manifests/templates/gateway-service.yaml b/manifests/templates/gateway-service.yaml new file mode 100644 index 0000000..5627c8c --- /dev/null +++ b/manifests/templates/gateway-service.yaml @@ -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: gateway + name: gateway +spec: + ports: + - name: {{ .Values.gtw_port | quote }} + port: {{ .Values.gtw_port }} + targetPort: {{ .Values.gtw_port }} + selector: + io.kompose.service: gateway +status: + loadBalancer: {} diff --git a/manifests/templates/helio-deployment.yaml b/manifests/templates/helio-deployment.yaml new file mode 100644 index 0000000..1c777da --- /dev/null +++ b/manifests/templates/helio-deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: helio + labels: + io.kompose.service: helio +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: helio + template: + metadata: + labels: + io.kompose.service: helio + spec: + containers: + - name: helio + image: aiguasol/boscapp-helio-rest:latest + imagePullPolicy: "Always" + resources: {} + ports: + - containerPort: {{ .Values.helio_port }} + name: web + protocol: TCP + volumeMounts: + - mountPath: /helio/app + name: aur-helio + volumes: + - name: aur-helio + persistentVolumeClaim: + claimName: aur-helio \ No newline at end of file diff --git a/manifests/templates/helio-service.yaml b/manifests/templates/helio-service.yaml new file mode 100644 index 0000000..9220dc7 --- /dev/null +++ b/manifests/templates/helio-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: helio + labels: + io.kompose.service: helio +spec: + ports: + - name: {{ .Values.helio_port | quote }} + port: {{ .Values.helio_port }} + protocol: TCP + targetPort: {{ .Values.helio_port }} + selector: + io.kompose.service: helio + type: ClusterIP \ No newline at end of file diff --git a/manifests/templates/ingressroute.yaml b/manifests/templates/ingressroute.yaml new file mode 100644 index 0000000..33a484a --- /dev/null +++ b/manifests/templates/ingressroute.yaml @@ -0,0 +1,64 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: {{ .Release.Name }}-node-stripprefix +spec: + stripPrefix: + prefixes: + - {{ .Values.node_ingress_path }} +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: {{ .Release.Name }}-helio-stripprefix +spec: + stripPrefix: + prefixes: + - {{ .Values.helio_ingress_path }} +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: https-redirect +spec: + redirectScheme: + permanent: true + scheme: https +--- +# https://stackoverflow.com/questions/51697574/adding-trailing-slash-to-microservice-root-path-in-traefik-ingress +# https://stackoverflow.com/a/71094495/5819113 +# auroral-agent docs live in /docs/ and not in /docs so we redirect +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: {{ .Release.Name }}-agent-redirect-docs +spec: + redirectRegex: + permanent: true + regex: "^https://{{ .Values.node_path }}/docs$" + replacement: "https://{{ .Values.node_path }}/docs/" +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: {{ .Release.Name }}-ingressroute +spec: + entryPoints: + - https + routes: + - kind: Rule + match: Host(`{{ .Values.node_path }}`) + services: + - name: auroral-agent + port: {{ .Values.port }} + middlewares: + - name: {{ .Release.Name }}-agent-redirect-docs + - kind: Rule + match: Host(`{{ .Values.node_path }}`) && PathPrefix(`{{ .Values.helio_ingress_path }}`) + services: + - name: helio + port: {{ .Values.helio_port }} + middlewares: + - name: {{ .Release.Name }}-helio-stripprefix + tls: + certResolver: default diff --git a/manifests/templates/proxy-deployment.yaml b/manifests/templates/proxy-deployment.yaml new file mode 100644 index 0000000..4bf3fa7 --- /dev/null +++ b/manifests/templates/proxy-deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: proxy + name: proxy +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: proxy + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: proxy + spec: + containers: + - image: ghcr.io/auroralh2020/auroral-node-proxy:latest + name: proxy + ports: + - containerPort: {{ .Values.proxy_port }} + resources: {} + restartPolicy: Always +status: {} diff --git a/manifests/templates/proxy-service.yaml b/manifests/templates/proxy-service.yaml new file mode 100644 index 0000000..aec3683 --- /dev/null +++ b/manifests/templates/proxy-service.yaml @@ -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: proxy + name: proxy +spec: + ports: + - name: {{ .Values.proxy_port | quote }} + port: {{ .Values.proxy_port }} + targetPort: {{ .Values.proxy_port }} + selector: + io.kompose.service: proxy +status: + loadBalancer: {} diff --git a/manifests/templates/secrets.yaml b/manifests/templates/secrets.yaml new file mode 100644 index 0000000..127d8f3 --- /dev/null +++ b/manifests/templates/secrets.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name }}-secrets +type: Opaque +data: + DB_PASSWORD: {{ .Values.db_password | b64enc | quote }} + GTW_ID: {{ .Values.gtw_id | b64enc | quote }} + GTW_PWD: {{ .Values.gtw_pwd | b64enc | quote }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: dockerhub-login +data: + .dockerconfigjson: {{ template "imagePullSecret" . }} +type: kubernetes.io/dockerconfigjson \ No newline at end of file diff --git a/manifests/templates/triplestore-deployment.yaml b/manifests/templates/triplestore-deployment.yaml new file mode 100644 index 0000000..7369493 --- /dev/null +++ b/manifests/templates/triplestore-deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: triplestore + name: triplestore +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: triplestore + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: triplestore + spec: + containers: + - image: acimmino/auroral-fuseky:latest + livenessProbe: + exec: + command: + - curl + - localhost:{{ .Values.triplestore_port }}/ + failureThreshold: 10 + periodSeconds: 15 + timeoutSeconds: 15 + name: triplestore + ports: + - containerPort: {{ .Values.triplestore_port }} + resources: {} + # volumeMounts: + # - mountPath: /fuseki + # name: aur-triplestore + restartPolicy: Always + volumes: + - name: aur-triplestore + persistentVolumeClaim: + claimName: aur-triplestore +status: {} diff --git a/manifests/templates/triplestore-service.yaml b/manifests/templates/triplestore-service.yaml new file mode 100644 index 0000000..537f7d6 --- /dev/null +++ b/manifests/templates/triplestore-service.yaml @@ -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: triplestore + name: triplestore +spec: + ports: + - name: {{ .Values.triplestore_port | quote }} + port: {{ .Values.triplestore_port }} + targetPort: {{ .Values.triplestore_port }} + selector: + io.kompose.service: triplestore +status: + loadBalancer: {} diff --git a/manifests/templates/wothive-deployment.yaml b/manifests/templates/wothive-deployment.yaml new file mode 100644 index 0000000..6d52d59 --- /dev/null +++ b/manifests/templates/wothive-deployment.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: wothive + name: wothive +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: wothive + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -c + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: wothive + spec: + containers: + - image: acimmino/wot-hive:0.2.3 + livenessProbe: + exec: + command: + - curl + - localhost:{{ .Values.wot_port }}/ + failureThreshold: 10 + periodSeconds: 15 + timeoutSeconds: 15 + name: wothive + ports: + - containerPort: {{ .Values.wot_port }} + resources: {} + restartPolicy: Always +status: {} diff --git a/manifests/templates/wothive-service.yaml b/manifests/templates/wothive-service.yaml new file mode 100644 index 0000000..22ce07f --- /dev/null +++ b/manifests/templates/wothive-service.yaml @@ -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: wothive + name: wothive +spec: + ports: + - name: {{ .Values.wot_port | quote }} + port: {{ .Values.wot_port }} + targetPort: {{ .Values.wot_port }} + selector: + io.kompose.service: wothive +status: + loadBalancer: {} diff --git a/manifests/values.yaml b/manifests/values.yaml new file mode 100644 index 0000000..8b473f8 --- /dev/null +++ b/manifests/values.yaml @@ -0,0 +1,56 @@ +## CONFIGURATION +node_env: "prod" +ip: 0.0.0.0 +port: 4000 +# CHANGE IF RUNNING TWO NODES IN SAME MACHINE! +external_port: 81 +proxy_port: 8080 + +## GATEWAY +#### Replace GTW_HOST by localhost if local mode +gtw_host: "http://gateway" +gtw_port: 8181 +gtw_timeout: 10000 + +#### Add your credentials below, obtain them in the Neighbourhood Manager +gtw_id: +gtw_pwd: + +## Persistance +#### Replace DB_HOST by localhost if local mode +db_type: 'REDIS' +db_password: +db_host: cache-db +db_port: 6379 +db_cache_enabled: "true" +db_cache_ttl: 60 + +## WoT repository +wot_enabled: "true" +wot_host: "http://wothive" +wot_port: 9000 + +#### Modes ["dummy", "proxy"(default), "semantic"] +adapter_mode: "semantic" +adapter_host: "" +adapter_port: 443 + +### triplestore +triplestore_port: 3030 + +## helio +helio_port: 4567 + +## ingressroute +node_ingress_path: "/node" +helio_ingress_path: "/helio" +host_path: host.from.your.org +node_path: node.from.your.org + +# for dockerhub login +# https://helm.sh/docs/howto/charts_tips_and_tricks/#creating-image-pull-secrets +imageCredentials: + registry: quay.io + username: someone + password: sillyness + email: someone@host.com \ No newline at end of file