Skip to content

Commit

Permalink
[gateway-api-crds] New chart (#731)
Browse files Browse the repository at this point in the history
* feat(gateway-api-crds): new chart

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed May 10, 2024
1 parent 03795ac commit 84e3041
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
41 changes: 41 additions & 0 deletions 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
32 changes: 32 additions & 0 deletions 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:** <https:/https://gateway-api.sigs.k8s.io>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| nlamirault | <nicolas.lamirault@gmail.com> | <https://github.com/nlamirault> |

## Source Code

* <https://github.com/kubernetes-sigs/gateway-api>

## 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)
35 changes: 35 additions & 0 deletions 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
5 changes: 5 additions & 0 deletions charts/gateway-api-crds/values.yaml
@@ -0,0 +1,5 @@
---
## Annotations for CRDs
##
crds:
annotations: {}

0 comments on commit 84e3041

Please sign in to comment.