diff --git a/charts/gateway-api-crds/Chart.yaml b/charts/gateway-api-crds/Chart.yaml new file mode 100644 index 00000000..86542ba6 --- /dev/null +++ b/charts/gateway-api-crds/Chart.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: v2 +description: Gateway API CRDs +name: gateway-api-crds +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 +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..b2f2b076 --- /dev/null +++ b/charts/gateway-api-crds/README.md @@ -0,0 +1,32 @@ +# gateway-api-crds + +![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) + +Gateway API CRDs + +**Homepage:** + +## 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