From cdc98fb94c1cb1785da034d8bc148a4c3a271295 Mon Sep 17 00:00:00 2001 From: "Hamed.Salimzadeh" Date: Fri, 9 Feb 2024 09:17:35 +0100 Subject: [PATCH 01/24] Use config map for /etc/gatewayd_plugins.yaml --- charts/gatewayd/templates/deployment.yaml | 16 +++--- .../templates/gatewayd_plugins_config.yaml | 9 ++++ charts/gatewayd/values.yaml | 49 ++++++++++++++----- 3 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 charts/gatewayd/templates/gatewayd_plugins_config.yaml diff --git a/charts/gatewayd/templates/deployment.yaml b/charts/gatewayd/templates/deployment.yaml index 478cb12..130b9f2 100644 --- a/charts/gatewayd/templates/deployment.yaml +++ b/charts/gatewayd/templates/deployment.yaml @@ -19,7 +19,7 @@ spec: {{- end }} labels: {{- include "gatewayd.labels" . | nindent 8 }} - {{- with .Values.podLabels }} + {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -46,13 +46,17 @@ spec: name: {{ include "gatewayd.fullname" . }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.volumeMounts }} + {{- if .Values.gatewaydPluginsConfig.enabled }} volumeMounts: - {{- toYaml . | nindent 12 }} + - name: config-volume + mountPath: /etc/gatewayd_plugins.yaml + subPath: gatewayd_plugins.yaml {{- end }} - {{- with .Values.volumes }} + {{- if .Values.gatewaydPluginsConfig.enabled }} volumes: - {{- toYaml . | nindent 8 }} + - name: config-volume + configMap: + name: {{ .Release.Name }}-gatewayd-plugins-config {{- end }} {{- with .Values.nodeSelector }} nodeSelector: @@ -65,4 +69,4 @@ spec: {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/charts/gatewayd/templates/gatewayd_plugins_config.yaml b/charts/gatewayd/templates/gatewayd_plugins_config.yaml new file mode 100644 index 0000000..eb4d90f --- /dev/null +++ b/charts/gatewayd/templates/gatewayd_plugins_config.yaml @@ -0,0 +1,9 @@ +{{- if .Values.gatewaydPluginsConfig.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-gatewayd-plugins-config +data: + gatewayd_plugins.yaml: | + {{ .Values.gatewaydPluginsConfig.content | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/gatewayd/values.yaml b/charts/gatewayd/values.yaml index 7fe807c..5ee0b3e 100644 --- a/charts/gatewayd/values.yaml +++ b/charts/gatewayd/values.yaml @@ -82,21 +82,44 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 -# Additional volumes on the output Deployment definition. -volumes: [] -# - name: foo -# secret: -# secretName: mysecret -# optional: false - -# Additional volumeMounts on the output Deployment definition. -volumeMounts: [] -# - name: foo -# mountPath: "/etc/foo" -# readOnly: true - nodeSelector: {} tolerations: [] affinity: {} + +gatewaydPluginsConfig: + enabled: true + content: | + verificationPolicy: "passdown" + compatibilityPolicy: "strict" + acceptancePolicy: "accept" + terminationPolicy: "stop" + enableMetricsMerger: True + metricsMergerPeriod: 5s + healthCheckPeriod: 5s + reloadOnCrash: True + timeout: 55s + startTimeout: 1m + plugins: + - name: gatewayd-plugin-cache + enabled: True + url: github.com/gatewayd-io/gatewayd-plugin-cache@latest + localPath: ../gatewayd-plugin-cache/gatewayd-plugin-cache + args: ["--log-level", "debug"] + env: + - MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN + - MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872 + - REDIS_URL=redis://localhost:6379/0 + - EXPIRY=1h + + - METRICS_ENABLED=True + - METRICS_UNIX_DOMAIN_SOCKET=/tmp/gatewayd-plugin-cache.sock + - METRICS_PATH=/metrics + - PERIODIC_INVALIDATOR_ENABLED=True + - PERIODIC_INVALIDATOR_INTERVAL=1m + - PERIODIC_INVALIDATOR_START_DELAY=1m + - API_ADDRESS=localhost:18080 + - EXIT_ON_STARTUP_ERROR=False + - SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328 + checksum: 054e7dba9c1e3e3910f4928a000d35c8a6199719fad505c66527f3e9b1993833 \ No newline at end of file From 7ca5b9426da6afa76843ab7efa8aec9ab536ae16 Mon Sep 17 00:00:00 2001 From: hamedsalim1999 Date: Sun, 18 Feb 2024 14:46:55 +0100 Subject: [PATCH 02/24] refactoring helm repo directory --- charts/gatewayd/.helmignore => .helmignore | 0 charts/gatewayd/Chart.yaml => Chart.yaml | 0 README.md | 17 +++++++++++++++++ charts/gatewayd/README.md | 16 ---------------- .../gatewayd/templates => templates}/NOTES.txt | 0 .../templates => templates}/_helpers.tpl | 0 .../templates => templates}/configmap.yaml | 0 .../templates => templates}/deployment.yaml | 0 .../gatewayd_plugins_config.yaml | 0 .../gatewayd/templates => templates}/hpa.yaml | 0 .../templates => templates}/ingress.yaml | 0 .../templates => templates}/service.yaml | 0 .../templates => templates}/serviceaccount.yaml | 0 .../tests/test-connection.yaml | 0 charts/gatewayd/values.yaml => values.yaml | 4 ++-- 15 files changed, 19 insertions(+), 18 deletions(-) rename charts/gatewayd/.helmignore => .helmignore (100%) rename charts/gatewayd/Chart.yaml => Chart.yaml (100%) delete mode 100644 charts/gatewayd/README.md rename {charts/gatewayd/templates => templates}/NOTES.txt (100%) rename {charts/gatewayd/templates => templates}/_helpers.tpl (100%) rename {charts/gatewayd/templates => templates}/configmap.yaml (100%) rename {charts/gatewayd/templates => templates}/deployment.yaml (100%) rename {charts/gatewayd/templates => templates}/gatewayd_plugins_config.yaml (100%) rename {charts/gatewayd/templates => templates}/hpa.yaml (100%) rename {charts/gatewayd/templates => templates}/ingress.yaml (100%) rename {charts/gatewayd/templates => templates}/service.yaml (100%) rename {charts/gatewayd/templates => templates}/serviceaccount.yaml (100%) rename {charts/gatewayd/templates => templates}/tests/test-connection.yaml (100%) rename charts/gatewayd/values.yaml => values.yaml (98%) diff --git a/charts/gatewayd/.helmignore b/.helmignore similarity index 100% rename from charts/gatewayd/.helmignore rename to .helmignore diff --git a/charts/gatewayd/Chart.yaml b/Chart.yaml similarity index 100% rename from charts/gatewayd/Chart.yaml rename to Chart.yaml diff --git a/README.md b/README.md index ddc1e34..8f35c3c 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,20 @@ We welcome contributions from everyone. Just open an [issue](https://github.com/ ## License GatewayD Helm Charts is licensed under the [Apache 2.0 License](https://github.com/gatewayd-io/helm-charts/blob/main/LICENSE). + +# GatewayD Community Kubernetes Helm Charts + +This Helm charts installs GatewayD on your Kubernetes cluster. + +## How to use the charts + +1. Clone this repository +2. Install the chart +3. (Optionally) Uninstall the chart + +```bash +git clone https://github.com/gatewayd-io/helm-charts.git +cd helm-charts/charts/gatewayd/ +helm install gatewayd-release -f values.yaml ./ +# helm uninstall gatewayd-release +``` \ No newline at end of file diff --git a/charts/gatewayd/README.md b/charts/gatewayd/README.md deleted file mode 100644 index c174724..0000000 --- a/charts/gatewayd/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# GatewayD Community Kubernetes Helm Charts - -This Helm charts installs GatewayD on your Kubernetes cluster. - -## How to use the charts - -1. Clone this repository -2. Install the chart -3. (Optionally) Uninstall the chart - -```bash -git clone https://github.com/gatewayd-io/helm-charts.git -cd helm-charts/charts/gatewayd/ -helm install gatewayd-release -f values.yaml ./ -# helm uninstall gatewayd-release -``` diff --git a/charts/gatewayd/templates/NOTES.txt b/templates/NOTES.txt similarity index 100% rename from charts/gatewayd/templates/NOTES.txt rename to templates/NOTES.txt diff --git a/charts/gatewayd/templates/_helpers.tpl b/templates/_helpers.tpl similarity index 100% rename from charts/gatewayd/templates/_helpers.tpl rename to templates/_helpers.tpl diff --git a/charts/gatewayd/templates/configmap.yaml b/templates/configmap.yaml similarity index 100% rename from charts/gatewayd/templates/configmap.yaml rename to templates/configmap.yaml diff --git a/charts/gatewayd/templates/deployment.yaml b/templates/deployment.yaml similarity index 100% rename from charts/gatewayd/templates/deployment.yaml rename to templates/deployment.yaml diff --git a/charts/gatewayd/templates/gatewayd_plugins_config.yaml b/templates/gatewayd_plugins_config.yaml similarity index 100% rename from charts/gatewayd/templates/gatewayd_plugins_config.yaml rename to templates/gatewayd_plugins_config.yaml diff --git a/charts/gatewayd/templates/hpa.yaml b/templates/hpa.yaml similarity index 100% rename from charts/gatewayd/templates/hpa.yaml rename to templates/hpa.yaml diff --git a/charts/gatewayd/templates/ingress.yaml b/templates/ingress.yaml similarity index 100% rename from charts/gatewayd/templates/ingress.yaml rename to templates/ingress.yaml diff --git a/charts/gatewayd/templates/service.yaml b/templates/service.yaml similarity index 100% rename from charts/gatewayd/templates/service.yaml rename to templates/service.yaml diff --git a/charts/gatewayd/templates/serviceaccount.yaml b/templates/serviceaccount.yaml similarity index 100% rename from charts/gatewayd/templates/serviceaccount.yaml rename to templates/serviceaccount.yaml diff --git a/charts/gatewayd/templates/tests/test-connection.yaml b/templates/tests/test-connection.yaml similarity index 100% rename from charts/gatewayd/templates/tests/test-connection.yaml rename to templates/tests/test-connection.yaml diff --git a/charts/gatewayd/values.yaml b/values.yaml similarity index 98% rename from charts/gatewayd/values.yaml rename to values.yaml index 5ee0b3e..a351f3c 100644 --- a/charts/gatewayd/values.yaml +++ b/values.yaml @@ -89,7 +89,7 @@ tolerations: [] affinity: {} gatewaydPluginsConfig: - enabled: true + enabled: false content: | verificationPolicy: "passdown" compatibilityPolicy: "strict" @@ -122,4 +122,4 @@ gatewaydPluginsConfig: - API_ADDRESS=localhost:18080 - EXIT_ON_STARTUP_ERROR=False - SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328 - checksum: 054e7dba9c1e3e3910f4928a000d35c8a6199719fad505c66527f3e9b1993833 \ No newline at end of file + checksum: 054e7dba9c1e3e3910f4928a000d35c8a6199719fad505c66527f3e9b1993833 \ No newline at end of file From d2ceaac68536ea540684eb78bd29b445516fbc7b Mon Sep 17 00:00:00 2001 From: hamedsalim1999 Date: Sun, 18 Feb 2024 15:34:55 +0100 Subject: [PATCH 03/24] Add docs and fix time out --- README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++- values.yaml | 2 +- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f35c3c..3648229 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,62 @@ git clone https://github.com/gatewayd-io/helm-charts.git cd helm-charts/charts/gatewayd/ helm install gatewayd-release -f values.yaml ./ # helm uninstall gatewayd-release -``` \ No newline at end of file +``` + +## Configuration +The following table lists the configurable parameters of the GatewayD Helm chart and their default values: + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| +| `autoscaling.enabled` | Determines whether autoscaling is enabled for the deployment. If not enabled, the `replicaCount` value is used to set the number of replicas. | `false` | +| `replicaCount` | The number of replicas to create for the deployment | `1` | +| `podAnnotations` | Annotations to add to the pod | `{}` | +| `podLabels` | Labels to add to the pod | `{}` | +| `imagePullSecrets` | Image pull secrets for the Docker registry | `[]` | +| `serviceAccountName` | The name of the service account to use for the deployment | `""` | +| `podSecurityContext` | Security context for the pod | `{}` | +| `securityContext` | Security context for the container | `{}` | +| `image.repository` | The Docker image repository | `gatewaydio/gatewayd` | +| `image.tag` | The Docker image tag. If not set, the app version from the chart is used | `""` | +| `image.pullPolicy` | The image pull policy | `IfNotPresent` | +| `service.port` | The port that the service listens on | `15432` | +| `resources` | Resource requests and limits for the container | `{}` | +| `gatewaydPluginsConfig.enabled` | Determines whether the `gatewayd_plugins.yaml` ConfigMap is mounted to the container. If enabled, a volume and volumeMount are added to the deployment. | `false` | +| `nodeSelector` | Node selector for the pod | `{}` | +| `affinity` | Affinity for the pod | `{}` | +| `tolerations` | Tolerations for the pod | `[]` | +| `ingress.enabled` | Determines whether an Ingress resource should be created | `false` | +| `gatewayd.fullname` | The full name of the deployment, used as part of the Ingress resource name | | +| `service.port` | The port that the service listens on, used as the service port in the Ingress rules | | +| `ingress.className` | The Ingress class to assign to the Ingress resource. This is only used for Kubernetes versions less than 1.18. | | +| `ingress.annotations` | Annotations to add to the Ingress resource. If `ingress.className` is set and the Kubernetes version is less than 1.18, the `kubernetes.io/ingress.class` annotation is added with the value of `ingress.className`. | `{}` | +| `Capabilities.KubeVersion.GitVersion` | The Kubernetes version running in the cluster. This is used to determine the API version of the Ingress resource to create. | | +| `gatewayd.fullname` | The full name of the deployment, used as the target of the Horizontal Pod Autoscaler. | | +| `autoscaling.minReplicas` | The minimum number of replicas that the Horizontal Pod Autoscaler should maintain | | +| `autoscaling.maxReplicas` | The maximum number of replicas that the Horizontal Pod Autoscaler can scale out to | | +| `autoscaling.targetCPUUtilizationPercentage`| The target percentage of CPU utilization across all replicas that the Horizontal Pod Autoscaler should maintain. If set, a CPU utilization metric is added to the Horizontal Pod Autoscaler. | | +| `autoscaling.targetMemoryUtilizationPercentage`| The target percentage of memory utilization across all replicas that the Horizontal Pod Autoscaler should maintain. If set, a memory utilization metric is added to the Horizontal Pod Autoscaler. | | +| `gatewayd.fullname` | The full name of the deployment, used as the name of the Service. | | +| `gatewayd.labels` | The labels to apply to the Service. | | +| `service.type` | The type of the Service. Common types include `ClusterIP`, `NodePort`, and `LoadBalancer`. | | +| `service.port` | The port that the Service listens on. This is the port that other services in the cluster use to communicate with this Service. | | +| `gatewayd.selectorLabels` | The selector for the Service. This should match the labels of the Pods that the Service should route traffic to. | | +| `serviceAccount.create` | Determines whether a ServiceAccount should be created | | +| `gatewayd.serviceAccountName` | The name of the ServiceAccount. This is used as the name of the ServiceAccount resource. | | +| `gatewayd.labels` | The labels to apply to the ServiceAccount. | | +| `serviceAccount.annotations` | Annotations to add to the ServiceAccount. | | +| `serviceAccount.automount` | Determines whether the ServiceAccount token should be automatically mounted to the pods. This is set as the `automountServiceAccountToken` field in the ServiceAccount resource. | | +| `gatewayd.fullname` | The full name of the deployment, used as the name of the ConfigMap. | | +| `gatewayd.clients.default.address` | The default address for the gatewayd clients. This is set as the `GATEWAYD_CLIENTS_DEFAULT_ADDRESS` data in the ConfigMap. | | +| `gatewayd.loggers.default.level` | The default level for the gatewayd loggers. This is set as the `GATEWAYD_LOGGERS_DEFAULT_LEVEL` data in the ConfigMap. | | +| `gatewaydPluginsConfig.enabled` | Determines whether the `gatewayd_plugins.yaml` ConfigMap should be created. | | +| `.Release.Name` | The release name, used as part of the ConfigMap name. | | +| `gatewaydPluginsConfig.content` | The content of the `gatewayd_plugins.yaml` file. This is set as the `gatewayd_plugins.yaml` data in the ConfigMap. | | + +## Usage + +Modify the values.yaml file to customize the deployment according to your requirements. You can override any default values as needed. + +## Contributing + +Feel free to contribute to the development of this Helm chart by submitting issues or pull requests to the GitHub repository. diff --git a/values.yaml b/values.yaml index a351f3c..1062aa4 100644 --- a/values.yaml +++ b/values.yaml @@ -99,7 +99,7 @@ gatewaydPluginsConfig: metricsMergerPeriod: 5s healthCheckPeriod: 5s reloadOnCrash: True - timeout: 55s + timeout: 30s startTimeout: 1m plugins: - name: gatewayd-plugin-cache From d7e8bd6dc96f8f93bf04c94bff5db404cbed95b0 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:20:01 +0100 Subject: [PATCH 04/24] Create helm test pipeline --- .github/workflows/helm-test.yml | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/helm-test.yml diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml new file mode 100644 index 0000000..e92211d --- /dev/null +++ b/.github/workflows/helm-test.yml @@ -0,0 +1,40 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "8-add-configmap" ] + pull_request: + branches: [ "8-add-configmap" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # Runs a TEst cahrt + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.9.0 + + - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} + From 5c0b61a92010f9ea248c957cc6cb4b772f20319e Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:23:15 +0100 Subject: [PATCH 05/24] Commet all check changes steps --- .github/workflows/helm-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index e92211d..72fe7cb 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -27,14 +27,14 @@ jobs: # Runs a TEst cahrt - name: Run chart-testing (lint) - if: steps.list-changed.outputs.changed == 'true' + # if: steps.list-changed.outputs.changed == 'true' run: ct lint --target-branch ${{ github.event.repository.default_branch }} - name: Create kind cluster - if: steps.list-changed.outputs.changed == 'true' + # if: steps.list-changed.outputs.changed == 'true' uses: helm/kind-action@v1.9.0 - name: Run chart-testing (install) - if: steps.list-changed.outputs.changed == 'true' + # if: steps.list-changed.outputs.changed == 'true' run: ct install --target-branch ${{ github.event.repository.default_branch }} From a3caa26d408650669067174224ff82c05539d226 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:27:19 +0100 Subject: [PATCH 06/24] Add chart-testing --- .github/workflows/helm-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 72fe7cb..3e0129a 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -24,15 +24,17 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.0 - # Runs a TEst cahrt - name: Run chart-testing (lint) # if: steps.list-changed.outputs.changed == 'true' run: ct lint --target-branch ${{ github.event.repository.default_branch }} - name: Create kind cluster # if: steps.list-changed.outputs.changed == 'true' - uses: helm/kind-action@v1.9.0 + uses: helm/kind-action@v1 - name: Run chart-testing (install) # if: steps.list-changed.outputs.changed == 'true' From 01a89c0232caf6dd4ce692846647a2d0896a671c Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:28:59 +0100 Subject: [PATCH 07/24] Change github branch --- .github/workflows/helm-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 3e0129a..3f9a9d7 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -24,13 +24,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - + - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.0 - name: Run chart-testing (lint) # if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch ${{ github.event.repository.default_branch }} + run: ct lint --target-branch 8-add-configmap" - name: Create kind cluster # if: steps.list-changed.outputs.changed == 'true' @@ -38,5 +38,5 @@ jobs: - name: Run chart-testing (install) # if: steps.list-changed.outputs.changed == 'true' - run: ct install --target-branch ${{ github.event.repository.default_branch }} + run: ct install --target-branch 8-add-configmap" From b2a4c2a5dd97fc46d4a390688689834bd855dc11 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:29:41 +0100 Subject: [PATCH 08/24] Fix typO error --- .github/workflows/helm-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 3f9a9d7..7051365 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -30,7 +30,7 @@ jobs: - name: Run chart-testing (lint) # if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch 8-add-configmap" + run: ct lint --target-branch 8-add-configmap - name: Create kind cluster # if: steps.list-changed.outputs.changed == 'true' @@ -38,5 +38,5 @@ jobs: - name: Run chart-testing (install) # if: steps.list-changed.outputs.changed == 'true' - run: ct install --target-branch 8-add-configmap" + run: ct install --target-branch 8-add-configmap From 2ab7c292e95eed1b534138c1ef630921dea1f97a Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:31:59 +0100 Subject: [PATCH 09/24] Remove if changes line --- .github/workflows/helm-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 7051365..bfdd9aa 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -29,14 +29,14 @@ jobs: uses: helm/chart-testing-action@v2.6.0 - name: Run chart-testing (lint) - # if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch 8-add-configmap - name: Create kind cluster - # if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1 - name: Run chart-testing (install) - # if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch 8-add-configmap From 4dc7ad847f5039b5930a5e8ef4aca362e6f20ea9 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:44:05 +0100 Subject: [PATCH 10/24] install psql helm chart --- .github/workflows/helm-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index bfdd9aa..09013cb 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -38,5 +38,8 @@ jobs: - name: Run chart-testing (install) - run: ct install --target-branch 8-add-configmap + run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql + + + # --set primary.persistence.enabled=false \ No newline at end of file From b390509867bc2eadde255981cc56010e616f4618 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:48:37 +0100 Subject: [PATCH 11/24] Try to install psql helm chart --- .github/workflows/helm-test.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 09013cb..2e3a5ec 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -32,13 +32,21 @@ jobs: run: ct lint --target-branch 8-add-configmap - - name: Create kind cluster - + - name: Create k8s Kind Cluster uses: helm/kind-action@v1 - - name: Run chart-testing (install) + # install postgresql chart + - id: postgresql + uses: evryfs/helm-ephemeral-action@master + with: + repo: https://charts.bitnami.com/bitnami + chart: postgresql + helm: 'helm' # optional, default value is 'helm' + args: '--wait --timeout 2m' + + # - name: Run chart-testing (install) - run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql + # run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql From 57d26ecbdffbc6e28fe6c4aea24082dba7250471 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 10 Mar 2024 10:13:36 +0100 Subject: [PATCH 12/24] uncomment test psql --- .github/workflows/helm-test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 2e3a5ec..0f96116 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -41,13 +41,8 @@ jobs: with: repo: https://charts.bitnami.com/bitnami chart: postgresql - helm: 'helm' # optional, default value is 'helm' + helm: 'helm' args: '--wait --timeout 2m' - # - name: Run chart-testing (install) - - # run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql - - - - # --set primary.persistence.enabled=false \ No newline at end of file + - name: Run chart-testing (install) + run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql \ No newline at end of file From 8602183da305ab808272938f0a4c1c973f907681 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:35:18 +0200 Subject: [PATCH 13/24] Try to install psql at minikube for test pipeline --- .github/workflows/helm-test.yml | 64 ++++++++++++++++++--------------- values.yaml | 2 +- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 0f96116..09e3f31 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -15,34 +15,42 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on + example: + name: Minikube installation - Basic test runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.0 - - - name: Run chart-testing (lint) - - run: ct lint --target-branch 8-add-configmap - - - name: Create k8s Kind Cluster - uses: helm/kind-action@v1 - - # install postgresql chart - - id: postgresql - uses: evryfs/helm-ephemeral-action@master + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Minikube + uses: manusa/actions-setup-minikube@v2.7.2 with: - repo: https://charts.bitnami.com/bitnami - chart: postgresql - helm: 'helm' - args: '--wait --timeout 2m' - - - name: Run chart-testing (install) - run: ct install --charts oci://registry-1.docker.io/bitnamicharts/postgresql \ No newline at end of file + minikube version: 'v1.32.0' + kubernetes version: 'v1.28.3' + github token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout code + uses: actions/checkout@v3 + - name: Install PostgreSQL + run: helm install psql oci://registry-1.docker.io/bitnamicharts/postgresql --set global.postgresql.auth.postgresPassword=postgres + - name: Check deployment status + run: | + kubectl rollout status --watch statefulset/psql-postgresql --timeout=5m + - name: Wait for PostgreSQL database to start + run: | + for n in [ 0 1 2 3 4 5 6 7 8 9 ] + do + if kubectl logs pod/psql-postgresql-0 | grep 'database system is ready to accept connections' + then + exit 0 + fi + sleep 30 + done + echo PostgreSQL did not start within 300 seconds! + exit 1 + - name: Install gatewayd + run: helm install gatewayd . + - name: Check deployment status + run: | + kubectl rollout status --watch deployment/gatewayd --timeout=5m + - name: Wait for gatewayd to start + run: status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0); if [ -z "$status" ]; then echo "It's not okay"; exit 1; else echo "It's okay"; fi diff --git a/values.yaml b/values.yaml index 1062aa4..8107191 100644 --- a/values.yaml +++ b/values.yaml @@ -1,7 +1,7 @@ gatewayd: clients: default: - address: "postgres:5432" + address: "psql-postgresql:5432" loggers: default: # For production, use info From ca0d8db0e914bf591195261df9a6b8a1a0c285aa Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:38:51 +0200 Subject: [PATCH 14/24] Fix minikube problem --- .github/workflows/helm-test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 09e3f31..4fb1a84 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -19,15 +19,11 @@ jobs: name: Minikube installation - Basic test runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Minikube - uses: manusa/actions-setup-minikube@v2.7.2 - with: - minikube version: 'v1.32.0' - kubernetes version: 'v1.28.3' - github token: ${{ secrets.GITHUB_TOKEN }} - + - uses: actions/checkout@v2 + - name: Start minikube + uses: medyagh/setup-minikube@master + - name: Try the cluster ! + run: kubectl get pods -A - name: Checkout code uses: actions/checkout@v3 - name: Install PostgreSQL From 3f8baa4539a93dc88b624b74a890027b5898ad98 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:42:28 +0200 Subject: [PATCH 15/24] Fix gatewayd checks --- .github/workflows/helm-test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 4fb1a84..5e4f8e4 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -49,4 +49,14 @@ jobs: run: | kubectl rollout status --watch deployment/gatewayd --timeout=5m - name: Wait for gatewayd to start - run: status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0); if [ -z "$status" ]; then echo "It's not okay"; exit 1; else echo "It's okay"; fi + run: | + for ((i=0; i<4; i++)); do + status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0) + if [ -z "$status" ]; then + echo "It's not okay" + exit 1 + else + echo "It's okay" + fi + sleep 60 + done From 44083a3ffbf7a5f1fd98145049224e0775ae8905 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:51:14 +0200 Subject: [PATCH 16/24] Fix statement --- .github/workflows/helm-test.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 5e4f8e4..47ca620 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -50,13 +50,16 @@ jobs: kubectl rollout status --watch deployment/gatewayd --timeout=5m - name: Wait for gatewayd to start run: | - for ((i=0; i<4; i++)); do - status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0) - if [ -z "$status" ]; then - echo "It's not okay" - exit 1 - else - echo "It's okay" - fi - sleep 60 + for ((i=0; i<5; i++)); do + status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0) + sleep 60 + if [ -z "$status" ]; then + echo "It's not okay" + if [ $i -eq 4 ]; then + exit 1 + fi + else + echo "It's okay" + break + fi done From 875eaac1da74c6a7f62d143895edf4a1beeafab4 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:03:26 +0200 Subject: [PATCH 17/24] Change test script --- .github/workflows/helm-test.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 47ca620..61d0433 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -51,15 +51,17 @@ jobs: - name: Wait for gatewayd to start run: | for ((i=0; i<5; i++)); do - status=$(kubectl get pod | grep gatewayd | awk '{print $2}' | grep 0) - sleep 60 - if [ -z "$status" ]; then - echo "It's not okay" + deployment_status=$(kubectl get deployment gatewayd | awk '{print $2}' | grep 0) + + if [ -z "$deployment_status" ]; then + echo "Deployment is ready" + break + else + echo "Deployment is not ready" if [ $i -eq 4 ]; then exit 1 fi - else - echo "It's okay" - break fi + sleep 60 done + \ No newline at end of file From 7d3060256645d864aa2408bc11ad80b950b5debb Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:12:44 +0200 Subject: [PATCH 18/24] USe same approche for gatewayd --- .github/workflows/helm-test.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 61d0433..f18bdc7 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -50,18 +50,13 @@ jobs: kubectl rollout status --watch deployment/gatewayd --timeout=5m - name: Wait for gatewayd to start run: | - for ((i=0; i<5; i++)); do - deployment_status=$(kubectl get deployment gatewayd | awk '{print $2}' | grep 0) - - if [ -z "$deployment_status" ]; then - echo "Deployment is ready" - break - else - echo "Deployment is not ready" - if [ $i -eq 4 ]; then - exit 1 - fi - fi - sleep 60 + for n in [ 0 1 2 3 4 5 6 7 8 9 ] + do + if kubectl get deployment gatewayd | awk '{print $2}' | grep 1/1 + then + exit 0 + fi + sleep 30 done - \ No newline at end of file + echo gatewayd did not start within 300 seconds! + exit 1 From 124a6ead2043f9704a104e604f3b7b1e2804c90c Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:15:22 +0200 Subject: [PATCH 19/24] Test psql is work or not --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 8107191..9838e3f 100644 --- a/values.yaml +++ b/values.yaml @@ -1,7 +1,7 @@ gatewayd: clients: default: - address: "psql-postgresql:5432" + address: "psq09l-postgresql:5432" loggers: default: # For production, use info From 9ea84cfd4cfa2eaf8f1f0d9405bf26febdd50e44 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:22:26 +0200 Subject: [PATCH 20/24] Undo change and confirm pipeline is work fine --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 9838e3f..8107191 100644 --- a/values.yaml +++ b/values.yaml @@ -1,7 +1,7 @@ gatewayd: clients: default: - address: "psq09l-postgresql:5432" + address: "psql-postgresql:5432" loggers: default: # For production, use info From cbf0a298942ffc5de4988ec05dd3a09b42ad2466 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Sun, 7 Apr 2024 20:44:40 +0200 Subject: [PATCH 21/24] Change push and PR state --- .github/workflows/helm-test.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index f18bdc7..3941f43 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -1,22 +1,18 @@ -# This is a basic workflow to help you get started with Actions -name: CI - -# Controls when the workflow will run +name: Test Action on: - # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "8-add-configmap" ] + branches: + - main + tags: + - v* pull_request: - branches: [ "8-add-configmap" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + branches: + - main -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: example: - name: Minikube installation - Basic test + name: Basic test by Minikube runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 0f64e1639cb32569061752a7faff5415571bb0f7 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:51:59 +0200 Subject: [PATCH 22/24] Fix MR comments --- .github/workflows/helm-test.yml | 10 ++++------ README.md | 2 +- values.yaml | 7 ------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 3941f43..b4a8be6 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -11,17 +11,15 @@ on: - main jobs: - example: - name: Basic test by Minikube + test: + name: Basic chart test using Minikube runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Start minikube uses: medyagh/setup-minikube@master - - name: Try the cluster ! + - name: Test whether the cluster is running run: kubectl get pods -A - - name: Checkout code - uses: actions/checkout@v3 - name: Install PostgreSQL run: helm install psql oci://registry-1.docker.io/bitnamicharts/postgresql --set global.postgresql.auth.postgresPassword=postgres - name: Check deployment status diff --git a/README.md b/README.md index 3648229..ca226fe 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ The following table lists the configurable parameters of the GatewayD Helm chart ## Usage -Modify the values.yaml file to customize the deployment according to your requirements. You can override any default values as needed. +Modify the [values.yaml](values.yaml) file to customize the deployment according to your requirements. You can override any default values as needed. ## Contributing diff --git a/values.yaml b/values.yaml index 8107191..3a5937b 100644 --- a/values.yaml +++ b/values.yaml @@ -92,9 +92,6 @@ gatewaydPluginsConfig: enabled: false content: | verificationPolicy: "passdown" - compatibilityPolicy: "strict" - acceptancePolicy: "accept" - terminationPolicy: "stop" enableMetricsMerger: True metricsMergerPeriod: 5s healthCheckPeriod: 5s @@ -109,10 +106,6 @@ gatewaydPluginsConfig: args: ["--log-level", "debug"] env: - MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN - - MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872 - - REDIS_URL=redis://localhost:6379/0 - - EXPIRY=1h - - METRICS_ENABLED=True - METRICS_UNIX_DOMAIN_SOCKET=/tmp/gatewayd-plugin-cache.sock - METRICS_PATH=/metrics From 82fab28867a71d5b4a2e699adcfa3f06178c5580 Mon Sep 17 00:00:00 2001 From: hamed salimzade <39666049+hamedsalim1999@users.noreply.github.com> Date: Wed, 17 Apr 2024 23:04:51 +0200 Subject: [PATCH 23/24] Organized configuration parameters into separate sections for clarity and ease of reference --- README.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ca226fe..60d34ca 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ helm install gatewayd-release -f values.yaml ./ # helm uninstall gatewayd-release ``` -## Configuration -The following table lists the configurable parameters of the GatewayD Helm chart and their default values: +## Configuration for GatewayD Helm Chart + +#### Deployment Configuration | Parameter | Description | Default Value | |---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| @@ -43,40 +44,58 @@ The following table lists the configurable parameters of the GatewayD Helm chart | `image.repository` | The Docker image repository | `gatewaydio/gatewayd` | | `image.tag` | The Docker image tag. If not set, the app version from the chart is used | `""` | | `image.pullPolicy` | The image pull policy | `IfNotPresent` | -| `service.port` | The port that the service listens on | `15432` | | `resources` | Resource requests and limits for the container | `{}` | | `gatewaydPluginsConfig.enabled` | Determines whether the `gatewayd_plugins.yaml` ConfigMap is mounted to the container. If enabled, a volume and volumeMount are added to the deployment. | `false` | | `nodeSelector` | Node selector for the pod | `{}` | | `affinity` | Affinity for the pod | `{}` | | `tolerations` | Tolerations for the pod | `[]` | + +#### Service Configuration + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| +| `service.port` | The port that the service listens on | `15432` | | `ingress.enabled` | Determines whether an Ingress resource should be created | `false` | + +#### Ingress Configuration + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| | `gatewayd.fullname` | The full name of the deployment, used as part of the Ingress resource name | | | `service.port` | The port that the service listens on, used as the service port in the Ingress rules | | | `ingress.className` | The Ingress class to assign to the Ingress resource. This is only used for Kubernetes versions less than 1.18. | | | `ingress.annotations` | Annotations to add to the Ingress resource. If `ingress.className` is set and the Kubernetes version is less than 1.18, the `kubernetes.io/ingress.class` annotation is added with the value of `ingress.className`. | `{}` | | `Capabilities.KubeVersion.GitVersion` | The Kubernetes version running in the cluster. This is used to determine the API version of the Ingress resource to create. | | + +#### Autoscaling Configuration + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| | `gatewayd.fullname` | The full name of the deployment, used as the target of the Horizontal Pod Autoscaler. | | | `autoscaling.minReplicas` | The minimum number of replicas that the Horizontal Pod Autoscaler should maintain | | | `autoscaling.maxReplicas` | The maximum number of replicas that the Horizontal Pod Autoscaler can scale out to | | | `autoscaling.targetCPUUtilizationPercentage`| The target percentage of CPU utilization across all replicas that the Horizontal Pod Autoscaler should maintain. If set, a CPU utilization metric is added to the Horizontal Pod Autoscaler. | | | `autoscaling.targetMemoryUtilizationPercentage`| The target percentage of memory utilization across all replicas that the Horizontal Pod Autoscaler should maintain. If set, a memory utilization metric is added to the Horizontal Pod Autoscaler. | | -| `gatewayd.fullname` | The full name of the deployment, used as the name of the Service. | | -| `gatewayd.labels` | The labels to apply to the Service. | | -| `service.type` | The type of the Service. Common types include `ClusterIP`, `NodePort`, and `LoadBalancer`. | | -| `service.port` | The port that the Service listens on. This is the port that other services in the cluster use to communicate with this Service. | | -| `gatewayd.selectorLabels` | The selector for the Service. This should match the labels of the Pods that the Service should route traffic to. | | + +#### Service Account Configuration + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| | `serviceAccount.create` | Determines whether a ServiceAccount should be created | | | `gatewayd.serviceAccountName` | The name of the ServiceAccount. This is used as the name of the ServiceAccount resource. | | | `gatewayd.labels` | The labels to apply to the ServiceAccount. | | | `serviceAccount.annotations` | Annotations to add to the ServiceAccount. | | | `serviceAccount.automount` | Determines whether the ServiceAccount token should be automatically mounted to the pods. This is set as the `automountServiceAccountToken` field in the ServiceAccount resource. | | + +#### ConfigMap Configuration + +| Parameter | Description | Default Value | +|---------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------| | `gatewayd.fullname` | The full name of the deployment, used as the name of the ConfigMap. | | -| `gatewayd.clients.default.address` | The default address for the gatewayd clients. This is set as the `GATEWAYD_CLIENTS_DEFAULT_ADDRESS` data in the ConfigMap. | | -| `gatewayd.loggers.default.level` | The default level for the gatewayd loggers. This is set as the `GATEWAYD_LOGGERS_DEFAULT_LEVEL` data in the ConfigMap. | | -| `gatewaydPluginsConfig.enabled` | Determines whether the `gatewayd_plugins.yaml` ConfigMap should be created. | | | `.Release.Name` | The release name, used as part of the ConfigMap name. | | | `gatewaydPluginsConfig.content` | The content of the `gatewayd_plugins.yaml` file. This is set as the `gatewayd_plugins.yaml` data in the ConfigMap. | | + ## Usage Modify the [values.yaml](values.yaml) file to customize the deployment according to your requirements. You can override any default values as needed. From e84125b7e333564d6985662562b32848b04f9f22 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Thu, 18 Apr 2024 10:43:24 +0200 Subject: [PATCH 24/24] Update plugin config --- values.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/values.yaml b/values.yaml index 3a5937b..35acb35 100644 --- a/values.yaml +++ b/values.yaml @@ -91,21 +91,24 @@ affinity: {} gatewaydPluginsConfig: enabled: false content: | - verificationPolicy: "passdown" + compatibilityPolicy: "strict" enableMetricsMerger: True metricsMergerPeriod: 5s healthCheckPeriod: 5s reloadOnCrash: True timeout: 30s - startTimeout: 1m + plugins: - name: gatewayd-plugin-cache enabled: True url: github.com/gatewayd-io/gatewayd-plugin-cache@latest localPath: ../gatewayd-plugin-cache/gatewayd-plugin-cache - args: ["--log-level", "debug"] + args: ["--log-level", "info"] env: - MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN + - MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872 + - REDIS_URL=redis://localhost:6379/0 + - EXPIRY=1h - METRICS_ENABLED=True - METRICS_UNIX_DOMAIN_SOCKET=/tmp/gatewayd-plugin-cache.sock - METRICS_PATH=/metrics @@ -115,4 +118,5 @@ gatewaydPluginsConfig: - API_ADDRESS=localhost:18080 - EXIT_ON_STARTUP_ERROR=False - SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328 - checksum: 054e7dba9c1e3e3910f4928a000d35c8a6199719fad505c66527f3e9b1993833 \ No newline at end of file + - CACHE_CHANNEL_BUFFER_SIZE=100 + checksum: 3988e10aefce2cd9b30888eddd2ec93a431c9018a695aea1cea0dac46ba91cae