From 2ee2984199eaacb5d34883cfdf4518511eab86ff Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Fri, 10 May 2024 12:01:41 +0200 Subject: [PATCH 1/3] feat(gateway-api-crds): new chart Signed-off-by: Nicolas Lamirault --- charts/gateway-api-crds/Chart.yaml | 41 +++++++++++++++++++++ charts/gateway-api-crds/README.md | 30 +++++++++++++++ charts/gateway-api-crds/hack/update_crds.sh | 35 ++++++++++++++++++ charts/gateway-api-crds/values.yaml | 5 +++ 4 files changed, 111 insertions(+) create mode 100644 charts/gateway-api-crds/Chart.yaml create mode 100644 charts/gateway-api-crds/README.md create mode 100755 charts/gateway-api-crds/hack/update_crds.sh create mode 100644 charts/gateway-api-crds/values.yaml diff --git a/charts/gateway-api-crds/Chart.yaml b/charts/gateway-api-crds/Chart.yaml new file mode 100644 index 00000000..b53fdcad --- /dev/null +++ b/charts/gateway-api-crds/Chart.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: v2 +description: Gateway API CRDs +name: gateway-api-crds +version: 0.1.0 +appVersion: 1.0.0 +home: https:/https://gateway-api.sigs.k8s.io +icon: https://avatars.githubusercontent.com/u/36015203?s=400&v=4 +sources: + - https://github.com/kubernetes-sigs/gateway-api +keywords: + - kubernetes + - gateway-api + - crds + +dependencies: + - name: crds + version: "0.0.0" + +maintainers: + - name: nlamirault + email: nicolas.lamirault@gmail.com + url: https://github.com/nlamirault + +# https://artifacthub.io/docs/topics/repositories/ +annotations: + artifacthub.io/license: Apache-2.0 + artifacthub.io/links: | + - name: Kubernetes Gateway API + url: https:/https://gateway-api.sigs.k8s.io + - name: Chart Source + url: https://github.com/portefaix/portefaix-hub + artifacthub.io/maintainers: | + - name: nlamirault + email: nicolas.lamirault@gmail.com + artifacthub.io/signKey: | + fingerprint: C39918B3EBDE35C23B8D0B8E5F99269A6FCA437C + url: https://keybase.io/nlamirault/pgp_keys.asc + artifacthub.io/changes: | + - kind: added + description: Init chart diff --git a/charts/gateway-api-crds/README.md b/charts/gateway-api-crds/README.md new file mode 100644 index 00000000..c034262e --- /dev/null +++ b/charts/gateway-api-crds/README.md @@ -0,0 +1,30 @@ +# gateway-api-crds + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square) + +This chart brings Custom Resource Definitions (CRD) used by [Kubernetes Gateway API](https://github.com/kubernetes-sigs/gateway-api). + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| nlamirault | | | + +## Source Code + +* + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| | crds | 0.0.0 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| crds.annotations | object | `{}` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) diff --git a/charts/gateway-api-crds/hack/update_crds.sh b/charts/gateway-api-crds/hack/update_crds.sh new file mode 100755 index 00000000..a8dd1a9c --- /dev/null +++ b/charts/gateway-api-crds/hack/update_crds.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +FILES=( + "gateway.networking.k8s.io_gatewayclasses.yaml" + "gateway.networking.k8s.io_gateways.yaml" + "gateway.networking.k8s.io_httproutes.yaml" + gateway.networking.k8s.io_referencegrants.yaml +) + +VERSION=$(grep appVersion ${SCRIPT_DIR}/../Chart.yaml | awk -F" " '{ print $2 }') +echo "Gateway API: ${VERSION}" + +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + SED="sed" +elif [[ "$OSTYPE" == "darwin"* ]]; then + SED="gsed" +fi + +for file in "${FILES[@]}"; do + echo "CRD: ${file}" + URL="https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v${VERSION}/config/crd/standard/${file}" + if ! curl --silent --retry-all-errors --fail --location "${URL}" > "${SCRIPT_DIR}/../charts/crds/templates/${file}"; then + echo -e "Failed to download ${URL}" + exit 1 + fi + + # Update or insert annotations block + if yq -e '.metadata.annotations' "${SCRIPT_DIR}/../charts/crds/templates/${file}" >/dev/null; then + ${SED} -i '/^ annotations:$/a {{- with .Values.annotations }}\n{{- toYaml . | nindent 4 }}\n{{- end }}' "${SCRIPT_DIR}/../charts/crds/templates/${file}" + else + ${SED} -i '/^metadata:$/a {{- with .Values.annotations }}\n annotations:\n{{- toYaml . | nindent 4 }}\n{{- end }}' "${SCRIPT_DIR}/../charts/crds/templates/${file}" + fi +done diff --git a/charts/gateway-api-crds/values.yaml b/charts/gateway-api-crds/values.yaml new file mode 100644 index 00000000..518b5886 --- /dev/null +++ b/charts/gateway-api-crds/values.yaml @@ -0,0 +1,5 @@ +--- +## Annotations for CRDs +## +crds: + annotations: {} \ No newline at end of file From 4ce283806fc723ad464a75e58661444c372db11c Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Fri, 10 May 2024 12:03:23 +0200 Subject: [PATCH 2/3] feat(gateway-api-crds): bump chart version Signed-off-by: Nicolas Lamirault --- charts/gateway-api-crds/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gateway-api-crds/Chart.yaml b/charts/gateway-api-crds/Chart.yaml index b53fdcad..86542ba6 100644 --- a/charts/gateway-api-crds/Chart.yaml +++ b/charts/gateway-api-crds/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: Gateway API CRDs name: gateway-api-crds -version: 0.1.0 +version: 1.0.0 appVersion: 1.0.0 home: https:/https://gateway-api.sigs.k8s.io icon: https://avatars.githubusercontent.com/u/36015203?s=400&v=4 From 5f54a90fe73b80861035e43d442bbd4b7dbbcd77 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Fri, 10 May 2024 12:03:38 +0200 Subject: [PATCH 3/3] feat(gateway-api-crds): doc Signed-off-by: Nicolas Lamirault --- charts/gateway-api-crds/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/gateway-api-crds/README.md b/charts/gateway-api-crds/README.md index c034262e..b2f2b076 100644 --- a/charts/gateway-api-crds/README.md +++ b/charts/gateway-api-crds/README.md @@ -1,8 +1,10 @@ # gateway-api-crds -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square) +![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square) -This chart brings Custom Resource Definitions (CRD) used by [Kubernetes Gateway API](https://github.com/kubernetes-sigs/gateway-api). +Gateway API CRDs + +**Homepage:** ## Maintainers