From 896468e1a7eb9091c3b82a9d8006191e44d90a98 Mon Sep 17 00:00:00 2001 From: mpw Date: Thu, 28 Sep 2023 04:09:02 -0300 Subject: [PATCH] add netpolicy for redis if enabled. fix default redisUrl --- charts/hub-nfts/Chart.yaml | 2 +- charts/hub-nfts/templates/netpol.yaml | 10 ++++++++++ charts/hub-nfts/values.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/hub-nfts/Chart.yaml b/charts/hub-nfts/Chart.yaml index f3c75ff..b3d7cc8 100644 --- a/charts/hub-nfts/Chart.yaml +++ b/charts/hub-nfts/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.9.0 +version: 0.9.1 # 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-nfts/templates/netpol.yaml b/charts/hub-nfts/templates/netpol.yaml index cccc0b0..1c440cc 100644 --- a/charts/hub-nfts/templates/netpol.yaml +++ b/charts/hub-nfts/templates/netpol.yaml @@ -49,6 +49,16 @@ spec: ports: - port: 53 protocol: UDP + {{- if .Values.redis.enabled }} + - to: + - podSelector: + matchLabels: + app.kubernetes.io/instance: hub-nfts + app.kubernetes.io/name: redis + ports: + - port: 6379 + protocol: TCP + {{- end }} {{- if .Values.networkPolicies.extraEgress }} {{ toYaml .Values.networkPolicies.extraEgress | indent 4 }} {{- end }} diff --git a/charts/hub-nfts/values.yaml b/charts/hub-nfts/values.yaml index 4a7d7b2..93bdc63 100644 --- a/charts/hub-nfts/values.yaml +++ b/charts/hub-nfts/values.yaml @@ -113,4 +113,4 @@ environment: nftStorageApiEndpoint: "https://api.nft.storage" ipfsEndpoint: "https://ipfs.io/ipfs/" assetCdn: "https://assets.holaplex.tools" - redisUrl: "redis://nfts-redis-master:6379" + redisUrl: "redis://hub-nfts-redis-master:6379"