From 41d03efb8910a8adf511c878bf982af8ff28464e Mon Sep 17 00:00:00 2001 From: mpw Date: Fri, 3 Feb 2023 11:52:06 -0300 Subject: [PATCH 1/2] hub-gateway chart update, remove graphql plugin --- charts/hub-gateway/templates/opa-config.yaml | 2 ++ charts/hub-gateway/templates/opa-deploy.yaml | 2 ++ charts/hub-gateway/templates/opa-s3-creds.yaml | 4 +++- charts/hub-gateway/templates/opa-svc.yaml | 3 ++- charts/hub-gateway/values.yaml | 9 --------- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/charts/hub-gateway/templates/opa-config.yaml b/charts/hub-gateway/templates/opa-config.yaml index 2a3e0e5..5a138e3 100644 --- a/charts/hub-gateway/templates/opa-config.yaml +++ b/charts/hub-gateway/templates/opa-config.yaml @@ -1,3 +1,4 @@ +{{- if .Values.apisixPlugins.opa.serviceName }} apiVersion: v1 kind: ConfigMap metadata: @@ -21,3 +22,4 @@ data: polling: min_delay_seconds: 30 max_delay_seconds: 120 +{{ end }} diff --git a/charts/hub-gateway/templates/opa-deploy.yaml b/charts/hub-gateway/templates/opa-deploy.yaml index 75ae3b2..ab30210 100644 --- a/charts/hub-gateway/templates/opa-deploy.yaml +++ b/charts/hub-gateway/templates/opa-deploy.yaml @@ -1,3 +1,4 @@ +{{- if .Values.apisixPlugins.opa.serviceName }} {{- $namespace := .Values.hubNamespace -}} {{- $apisixPlugins := .Values.apisixPlugins -}} apiVersion: apps/v1 @@ -57,3 +58,4 @@ spec: - name: config configMap: name: opa-config +{{- end }} diff --git a/charts/hub-gateway/templates/opa-s3-creds.yaml b/charts/hub-gateway/templates/opa-s3-creds.yaml index 0eeaec9..d6722c4 100644 --- a/charts/hub-gateway/templates/opa-s3-creds.yaml +++ b/charts/hub-gateway/templates/opa-s3-creds.yaml @@ -1,5 +1,6 @@ -{{- $namespace := .Values.hubNamespace -}} +{{- if .Values.apisixPlugins.opa.serviceName }} {{- $opa := .Values.apisixPlugins.opa -}} +{{- $namespace := .Values.hubNamespace -}} {{- $s3 := $opa.s3 -}} apiVersion: v1 kind: Secret @@ -14,3 +15,4 @@ data: AWS_BUCKET_URL: {{ $s3.bucketUrl | b64enc }} AWS_ACCESS_KEY_ID: {{ $s3.accessKey | b64enc }} AWS_SECRET_ACCESS_KEY: {{ $s3.secretKey | b64enc }} +{{- end }} diff --git a/charts/hub-gateway/templates/opa-svc.yaml b/charts/hub-gateway/templates/opa-svc.yaml index ccc96c4..a5a5b8b 100644 --- a/charts/hub-gateway/templates/opa-svc.yaml +++ b/charts/hub-gateway/templates/opa-svc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.apisixPlugins.opa.serviceName }} {{- $namespace := .Values.hubNamespace -}} {{- $apisixPlugins := .Values.apisixPlugins -}} kind: Service @@ -17,4 +18,4 @@ spec: protocol: TCP port: {{ $apisixPlugins.opa.servicePort }} targetPort: {{ $apisixPlugins.opa.servicePort }} - +{{- end }} diff --git a/charts/hub-gateway/values.yaml b/charts/hub-gateway/values.yaml index 9d0e2af..36349e2 100644 --- a/charts/hub-gateway/values.yaml +++ b/charts/hub-gateway/values.yaml @@ -16,7 +16,6 @@ routes: require_auth: true regex_uri: ["/graphql", "/"] policy: "hub/graphql/example" - schema_query: "{ _service { sdl } }" - name: ui-public subdomain: hub @@ -52,11 +51,6 @@ apisixPlugins: servicePort: 80 files: - plugins/kratos.lua - graphql: - serviceName: federated-router - servicePort: 80 - files: - - plugins/graphql.lua opa: image: openpolicyagent/opa:0.48.0-rootless s3: @@ -125,7 +119,6 @@ apisix: plugins: - kratos - opa-mod - - graphql - mocking - redirect - serverless-pre-function @@ -146,8 +139,6 @@ apisix: path: "/opts/custom_plugins/apisix/plugins/opa-mod.lua" - key: "opa-helper.lua" path: "/opts/custom_plugins/apisix/plugins/opa-mod/helper.lua" - - key: "graphql.lua" - path: "/opts/custom_plugins/apisix/plugins/graphql.lua" logs: enableAccessLog: true From 1adcb2c246e3fc94dbb23afc1d7a4f61d575b6c1 Mon Sep 17 00:00:00 2001 From: mpw Date: Fri, 3 Feb 2023 11:54:54 -0300 Subject: [PATCH 2/2] bump chart version --- charts/hub-gateway/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/hub-gateway/Chart.yaml b/charts/hub-gateway/Chart.yaml index 6a08943..5bc078a 100644 --- a/charts/hub-gateway/Chart.yaml +++ b/charts/hub-gateway/Chart.yaml @@ -18,13 +18,13 @@ 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.2 +version: 0.1.3 # 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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.1.2" +appVersion: "0.1.3" sources: - https://github.com/holaplex/helm-charts