Skip to content

Commit

Permalink
fix: rename gateway api + add enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweaver87 committed Dec 16, 2024
1 parent 2a499fc commit 1f5ddd5
Show file tree
Hide file tree
Showing 24 changed files with 2,162 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ If you still want to manage CRDs your self, it can be opt-out:

```bash
# Upgrade Traefik and skip all CRDs installation
helm upgrade traefik traefik/traefik --set traefik-crds.traefik=false --set traefik-crds.hub=false --set traefik-crds.gateway_api=false
helm upgrade traefik traefik/traefik --set traefik-crds.enabled=true --set traefik-crds.traefik=false --set traefik-crds.hub=false --set traefik-crds.gatewayAPI=false
```

### Upgrade up to 27.X
Expand Down
3 changes: 2 additions & 1 deletion traefik-crds/VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Kubernetes: `>=1.22.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| deleteOnUninstall | bool | `false` | |
| gateway_api | bool | `false` | |
| enabled | bool | `true` | |
| gatewayAPI | bool | `false` | |
| global | string | `nil` | |
| hub | bool | `false` | |
| traefik | bool | `false` | |
Expand Down
16 changes: 16 additions & 0 deletions traefik-crds/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
resources:
<<<<<<< HEAD
# curl -o crds-files/gateway_api/gateway-standard-install.yaml -L https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
- crds-files/gateway_api/gateway-standard-install.yaml
- crds-files/hub.traefik.io_accesscontrolpolicies.yaml
Expand All @@ -15,6 +16,21 @@ resources:
- crds-files/hub.traefik.io_apis.yaml
- crds-files/hub.traefik.io_apiversions.yaml
- crds-files/hub.traefik.io_managedsubscriptions.yaml
=======
# curl -o gateway-standard-install-v1.2.0.yaml -L https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml
- crds-files/gatewayAPI/gateway-standard-install-v1.2.0.yaml
- crds-files/hub/hub.traefik.io_accesscontrolpolicies.yaml
- crds-files/hub/hub.traefik.io_aiservices.yaml
- crds-files/hub/hub.traefik.io_apiaccesses.yaml
- crds-files/hub/hub.traefik.io_apibundles.yaml
- crds-files/hub/hub.traefik.io_apicatalogitems.yaml
- crds-files/hub/hub.traefik.io_apiplans.yaml
- crds-files/hub/hub.traefik.io_apiportals.yaml
- crds-files/hub/hub.traefik.io_apiratelimits.yaml
- crds-files/hub/hub.traefik.io_apis.yaml
- crds-files/hub/hub.traefik.io_apiversions.yaml
- crds-files/hub/hub.traefik.io_managedsubscriptions.yaml
>>>>>>> b296543 (fix: rename gateway api + add enabled flag)
- crds-files/traefik/traefik.io_ingressroutes.yaml
- crds-files/traefik/traefik.io_ingressroutetcps.yaml
- crds-files/traefik/traefik.io_ingressrouteudps.yaml
Expand Down
4 changes: 2 additions & 2 deletions traefik-crds/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
{{ include "traefik-crds.render-crds" (dict "scope" . "path" "crds-files/hub/*.yaml") }}
{{- end }}

{{- if eq (.Values.gateway_api | toString) "true" -}}
{{ include "traefik-crds.render-crds" (dict "scope" . "path" "crds-files/gateway_api/*.yaml") }}
{{- if eq (.Values.gatewayAPI | toString) "true" -}}
{{ include "traefik-crds.render-crds" (dict "scope" . "path" "crds-files/gatewayAPI/*.yaml") }}
{{- end }}
4 changes: 2 additions & 2 deletions traefik-crds/tests/crds_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tests:

- it: should have all Gateway API crds
set:
gateway_api: true
gatewayAPI: true
asserts:
- hasDocuments:
count: 5
Expand All @@ -63,7 +63,7 @@ tests:

- it: should have all Gateway API crds without helm keep resource policy
set:
gateway_api: true
gatewayAPI: true
deleteOnUninstall: true
asserts:
- hasDocuments:
Expand Down
5 changes: 4 additions & 1 deletion traefik-crds/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"deleteOnUninstall": {
"type": "boolean"
},
"gateway_api": {
"enabled": {
"type": "boolean"
},
"gatewayAPI": {
"default": false,
"type": [
"string",
Expand Down
3 changes: 2 additions & 1 deletion traefik-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
global: # @schema type:[object, null]; additionalProperties: true
enabled: true
traefik: false
gateway_api: false # @schema type:[string, boolean]; default: false
gatewayAPI: false # @schema type:[string, boolean]; default: false
hub: false # @schema type:[string, boolean]; default: false
deleteOnUninstall: false
2 changes: 1 addition & 1 deletion traefik/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ dependencies:
- name: traefik-crds
version: 0.0.1
repository: https://traefik.github.io/charts
condition: or traefik-crds.traefik traefik-crds.hub traefik-crds.gateway_api
condition: traefik-crds.enabled
5 changes: 5 additions & 0 deletions traefik/VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,15 @@ Kubernetes: `>=1.22.0-0`
| tracing.otlp.http.tls.cert | string | `""` | The path to the public certificate. When using this option, setting the key option is required. |
| tracing.otlp.http.tls.insecureSkipVerify | bool | `false` | When set to true, the TLS connection accepts any certificate presented by the server regardless of the hostnames it covers. |
| tracing.otlp.http.tls.key | string | `""` | The path to the private key. When using this option, setting the cert option is required. |
<<<<<<< HEAD
| tracing.safeQueryParams | list | `[]` | By default, all query parameters are redacted. Defines the list of query parameters to not redact. |
| tracing.sampleRate | string | `nil` | The proportion of requests to trace, specified between 0.0 and 1.0. Default: 1.0. |
| tracing.serviceName | string | `nil` | Service name used in selected backend. Default: traefik. |
| traefik-crds.gateway_api | string | `"{{- tpl \".Values.providers.kubernetesGateway.enabled\" . }}\n"` | |
=======
| traefik-crds.enabled | bool | `false` | Set it to true to opt-in CRD management |
| traefik-crds.gatewayAPI | string | `"{{- tpl \".Values.providers.kubernetesGateway.enabled\" . }}\n"` | |
>>>>>>> b296543 (fix: rename gateway api + add enabled flag)
| traefik-crds.hub | string | `"{{- tpl \"and .Values.hub.token .Values.hub.apimanagement.enabled\"' . }}\n"` | |
| traefik-crds.traefik | bool | `true` | Set all the following to false if you want to manage CRDs your-self |
| updateStrategy.rollingUpdate.maxSurge | int | `1` | |
Expand Down
File renamed without changes.
Loading

0 comments on commit 1f5ddd5

Please sign in to comment.