From 202ad06d83c8a153754f4bbcfad244f713146613 Mon Sep 17 00:00:00 2001 From: Kyle Espinola Date: Fri, 17 Mar 2023 15:40:35 +0100 Subject: [PATCH] feat: setup environment for uploading assets to nft storage --- charts/hub-ui/Chart.yaml | 2 +- charts/hub-ui/templates/environment.yaml | 1 + charts/hub-ui/templates/secrets.yaml | 13 +++++++++++++ charts/hub-ui/values.yaml | 8 +++++++- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 charts/hub-ui/templates/secrets.yaml diff --git a/charts/hub-ui/Chart.yaml b/charts/hub-ui/Chart.yaml index bdf4fcb..13ddb97 100644 --- a/charts/hub-ui/Chart.yaml +++ b/charts/hub-ui/Chart.yaml @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/hub-ui/templates/environment.yaml b/charts/hub-ui/templates/environment.yaml index 6cccbe3..1fea27d 100644 --- a/charts/hub-ui/templates/environment.yaml +++ b/charts/hub-ui/templates/environment.yaml @@ -7,4 +7,5 @@ data: PORT: {{ .port | quote }} KRATOS_ENDPOINT: {{ .kratosPublicEndpoint | quote }} GRAPHQL_ENDPOINT: {{ .internalGraphqlEndpoint | quote }} + IPFS_GATEWAY: {{ .ipfsGateway | quote }} {{- end }} diff --git a/charts/hub-ui/templates/secrets.yaml b/charts/hub-ui/templates/secrets.yaml new file mode 100644 index 0000000..580dc7b --- /dev/null +++ b/charts/hub-ui/templates/secrets.yaml @@ -0,0 +1,13 @@ +{{- with .Values.secrets }} +{{- if .enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "hub-ui.fullname" $ }} + annotations: + "helm.sh/hook": pre-install +type: Opaque +data: + NFT_STORAGE_TOKEN: {{ required "must set nft storage token" .entries.nftStorageToken | b64enc }} +{{- end }} +{{- end }} diff --git a/charts/hub-ui/values.yaml b/charts/hub-ui/values.yaml index a98694f..8468e71 100644 --- a/charts/hub-ui/values.yaml +++ b/charts/hub-ui/values.yaml @@ -68,4 +68,10 @@ affinity: {} environment: port: 3000 kratosPublicEndpoint: http://kratos-public - internalGraphqlEndpoint: http://apisix-gateway-internal.ingress-apisix.svc.cluster.local/graphql + internalGraphqlEndpoint: http://apisix-gateway-internal.ingress-apisix.svc.cluster.local/graphql + ifpsGateway: https://nftstorage.link/ipfs + +secrets: + enabled: true + entries: + nftStorageToken: