Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ConfigMap for Persistent Plugin File Values #12

Merged
merged 25 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cdc98fb
Use config map for /etc/gatewayd_plugins.yaml
Feb 9, 2024
7ca5b94
refactoring helm repo directory
Feb 18, 2024
d2ceaac
Add docs and fix time out
Feb 18, 2024
d7e8bd6
Create helm test pipeline
hamedsalim1999 Mar 10, 2024
c9d0a01
Merge pull request #13 from gatewayd-io/hamedsalim1999-patch-1
hamedsalim1999 Mar 10, 2024
5c0b61a
Commet all check changes steps
hamedsalim1999 Mar 10, 2024
a3caa26
Add chart-testing
hamedsalim1999 Mar 10, 2024
01a89c0
Change github branch
hamedsalim1999 Mar 10, 2024
b2a4c2a
Fix typO error
hamedsalim1999 Mar 10, 2024
2ab7c29
Remove if changes line
hamedsalim1999 Mar 10, 2024
4dc7ad8
install psql helm chart
hamedsalim1999 Mar 10, 2024
b390509
Try to install psql helm chart
hamedsalim1999 Mar 10, 2024
57d26ec
uncomment test psql
hamedsalim1999 Mar 10, 2024
8602183
Try to install psql at minikube for test pipeline
hamedsalim1999 Apr 7, 2024
ca0d8db
Fix minikube problem
hamedsalim1999 Apr 7, 2024
3f8baa4
Fix gatewayd checks
hamedsalim1999 Apr 7, 2024
44083a3
Fix statement
hamedsalim1999 Apr 7, 2024
875eaac
Change test script
hamedsalim1999 Apr 7, 2024
7d30602
USe same approche for gatewayd
hamedsalim1999 Apr 7, 2024
124a6ea
Test psql is work or not
hamedsalim1999 Apr 7, 2024
9ea84cf
Undo change and confirm pipeline is work fine
hamedsalim1999 Apr 7, 2024
cbf0a29
Change push and PR state
hamedsalim1999 Apr 7, 2024
0f64e16
Fix MR comments
hamedsalim1999 Apr 17, 2024
82fab28
Organized configuration parameters into separate sections for clarity…
hamedsalim1999 Apr 17, 2024
e84125b
Update plugin config
mostafa Apr 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,78 @@ 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
```

## 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. | |
hamedsalim1999 marked this conversation as resolved.
Show resolved Hide resolved
| `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.
hamedsalim1999 marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

Feel free to contribute to the development of this Helm chart by submitting issues or pull requests to the GitHub repository.
16 changes: 0 additions & 16 deletions charts/gatewayd/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
{{- end }}
labels:
{{- include "gatewayd.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
Expand All @@ -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:
Expand All @@ -65,4 +69,4 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions templates/gatewayd_plugins_config.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 36 additions & 13 deletions charts/gatewayd/values.yaml → values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: false
content: |
verificationPolicy: "passdown"
compatibilityPolicy: "strict"
acceptancePolicy: "accept"
hamedsalim1999 marked this conversation as resolved.
Show resolved Hide resolved
terminationPolicy: "stop"
hamedsalim1999 marked this conversation as resolved.
Show resolved Hide resolved
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"]
env:
- MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN
- MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872
- REDIS_URL=redis://localhost:6379/0
- EXPIRY=1h

hamedsalim1999 marked this conversation as resolved.
Show resolved Hide resolved
- 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