Skip to content

Commit

Permalink
add meta-kubernetes-gateway-api chart
Browse files Browse the repository at this point in the history
  • Loading branch information
vladarts committed May 22, 2024
1 parent 8f00673 commit 8a49c04
Show file tree
Hide file tree
Showing 14 changed files with 4,616 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/meta-kubernetes-gateway-api/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config/*
values.schema.full.json
values.example.yaml
6 changes: 6 additions & 0 deletions charts/meta-kubernetes-gateway-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: meta-kubernetes-gateway-api
description: Metachart born Helm Chart for Kubernetes Gateway API
type: application
version: "1.1.0"
appVersion: none
47 changes: 47 additions & 0 deletions charts/meta-kubernetes-gateway-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# meta-kubernetes-gateway-api

`meta-kubernetes-gateway-api` is a [metachart](https://github.com/iponweb/metachart)
born [Helm](https://helm.sh/) Chart for
[gateway-api](https://github.com/kubernetes-sigs/gateway-api)
operator custom resources

## Quickstart

Add the [Helm](https://helm.sh/) repository:

```shell
helm repo add iponweb https://iponweb.github.io/charts/
```

Add the [values.schema.json](values.schema.json) file to your favourite IDE
to enable values file autocompletion and validation.
Examples:
- [IntelliJ IDEA](https://www.jetbrains.com/help/idea/json.html#ws_json_schema_add_custom)
- [Visual Studio Code](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings)
- [Sublime Text](https://github.com/sublimelsp/LSP-json)

Define `values.yaml` with required resources and install the release:

```shell
helm install release-name -f values.yaml iponweb/meta-kubernetes-gateway-api
```

See also [values.example.yaml](values.example.yaml)

## Documentation

For complete resources list support see [resources](docs/resources.md).

See the `metachart` [Documentation](https://github.com/iponweb/metachart/docs)
for more details.

## Requirements

Minimal supported [Helm](https://helm.sh/) version is `v3.2.0`.

## Versioning

Chart major and minor version parts follow
[gateway-api](https://github.com/kubernetes-sigs/gateway-api)
versions which has been used for the chart generation. Patch component is used
for charts own changes/fixes.
40 changes: 40 additions & 0 deletions charts/meta-kubernetes-gateway-api/config/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
resources:
#: gateway.networking.k8s.io/v1alpha2
backendlbpolicies:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: BackendLBPolicy
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.BackendLBPolicy
referencegrants:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: ReferenceGrant
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.ReferenceGrant
tcproutes:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.TCPRoute
tlsroutes:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.TLSRoute
udproutes:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: UDPRoute
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.UDPRoute

#: gateway.networking.k8s.io/v1
gatewayclasses:
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1.GatewayClass
gateways:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1.Gateway
httproutes:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1.HTTPRoute
grpcroutes:
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
jsonSchemaRef: metachart.api.io.k8s.sigs.gateway-api.apis.v1.GRPCRoute
68 changes: 68 additions & 0 deletions charts/meta-kubernetes-gateway-api/config/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.defaults:
disallowed: &defaultDisallowed
- status
- kind
- apiVersion
properties: &defaultProperties
enabled: metachart.interface.boolean
metadata: metachart.api.meta.v1.ObjectMeta
rootKey: &defaultRootKey
disallowed: *defaultDisallowed
properties: *defaultProperties

definitions:
- https://raw.githubusercontent.com/iponweb/schemas/main/json-schemas/kubernetes/v1.30.1-strict/_definitions.json
- https://raw.githubusercontent.com/iponweb/schemas/main/json-schemas/kubernetes-gateway-api/v1.1.0-strict/_definitions.json

rules:
#: Common
#:
#: meta.v1.ObjectMeta
- target: metachart.api.meta.v1.ObjectMeta
source: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
allowed:
- annotations
- labels
- finalizers
- namespace
- name
properties:
checksums: metachart.interface.checksums

#: gateway.networking.k8s.io/v1alpha2
- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.BackendLBPolicy
source: io.k8s.sigs.gateway-api.apis.v1alpha2.BackendLBPolicy
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.ReferenceGrant
source: io.k8s.sigs.gateway-api.apis.v1alpha2.ReferenceGrant
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.TCPRoute
source: io.k8s.sigs.gateway-api.apis.v1alpha2.TCPRoute
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.TLSRoute
source: io.k8s.sigs.gateway-api.apis.v1alpha2.TLSRoute
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1alpha2.UDPRoute
source: io.k8s.sigs.gateway-api.apis.v1alpha2.UDPRoute
<<: *defaultRootKey

#: gateway.networking.k8s.io/v1
- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1.GatewayClass
source: io.k8s.sigs.gateway-api.apis.v1.GatewayClass
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1.Gateway
source: io.k8s.sigs.gateway-api.apis.v1.Gateway
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1.HTTPRoute
source: io.k8s.sigs.gateway-api.apis.v1.HTTPRoute
<<: *defaultRootKey

- target: metachart.api.io.k8s.sigs.gateway-api.apis.v1.GRPCRoute
source: io.k8s.sigs.gateway-api.apis.v1.GRPCRoute
<<: *defaultRootKey
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {}
}
23 changes: 23 additions & 0 deletions charts/meta-kubernetes-gateway-api/docs/resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Resources

A set of resources supported by the chart

## gateway.networking.k8s.io/v1

| Values file key | Kind | Preprocessor |
| --------------- | ---- | ------------ |
| gatewayclasses | GatewayClass | - |
| gateways | Gateway | - |
| grpcroutes | GRPCRoute | - |
| httproutes | HTTPRoute | - |


## gateway.networking.k8s.io/v1alpha2

| Values file key | Kind | Preprocessor |
| --------------- | ---- | ------------ |
| backendlbpolicies | BackendLBPolicy | - |
| referencegrants | ReferenceGrant | - |
| tcproutes | TCPRoute | - |
| tlsroutes | TLSRoute | - |
| udproutes | UDPRoute | - |
1 change: 1 addition & 0 deletions charts/meta-kubernetes-gateway-api/templates/_custom.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{/* Place user-provided templates there */}}
Loading

0 comments on commit 8a49c04

Please sign in to comment.