Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chart): automate helm json schema #5075

Merged
merged 29 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1f9b383
helm(json-schema): simplified schema validation
ivankatliarchuk Feb 9, 2025
47e3291
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
600c6f9
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
09cb4d0
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
39a9058
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
e1b9ba7
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
e3d18fa
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
51d062b
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
687aeea
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
d87a53e
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
3aa5d0d
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
9b56fa0
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
1cf0de0
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
5736225
helm(json-schema): simplified schema validation and documentation gen…
ivankatliarchuk Feb 9, 2025
0eded1c
feat(chart): automate helm json schema
ivankatliarchuk Feb 11, 2025
6fcdd0b
feat(chart): automate helm json schema
ivankatliarchuk Feb 11, 2025
40154d6
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
0e5b95c
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
61d117d
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
75c3d93
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
34d2db9
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
f014fd2
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
b2c71f2
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
fd7c7d0
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
634eb7b
feat(chart): automate helm json schema
ivankatliarchuk Feb 12, 2025
61221a0
Apply suggestions from code review
ivankatliarchuk Feb 13, 2025
9816a64
feat(chart): automate helm json schema
ivankatliarchuk Feb 14, 2025
23dfe2c
Merge remote-tracking branch 'refs/remotes/origin/helm-4989' into hel…
ivankatliarchuk Feb 14, 2025
a8bf8fe
Apply suggestions from code review
ivankatliarchuk Feb 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/lint-test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ jobs:
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
token: ${{ github.token }}
version: latest

- name: Run Helm Schema check
working-directory: charts/external-dns
run: |
set -euo pipefail

helm plugin install https://github.com/losisin/helm-values-schema-json.git
helm schema
if [[ -n "$(git status --porcelain --untracked-files=no)" ]]
then
echo "Schema not up to date. Please run helm schema and commit changes!" >&2
exit 1
fi

- name: Install Helm Docs
uses: action-stars/install-tool-from-github-release@ece2623611b240002e0dd73a0d685505733122f6 # v0.2.4
with:
Expand Down Expand Up @@ -52,12 +71,6 @@ jobs:
- name: Run Artifact Hub lint
run: ah lint --kind helm || exit 1

- name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
token: ${{ github.token }}
version: latest

- name: Install Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
Expand Down
3 changes: 3 additions & 0 deletions charts/external-dns/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
.idea/
*.tmproj
.vscode/
ci/
schema/
.schema.yaml
11 changes: 11 additions & 0 deletions charts/external-dns/.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ref: https://github.com/losisin/helm-values-schema-json.git
input:
- schema/values.yaml
- values.yaml

draft: 7
indent: 2
output: values.schema.json

schemaRoot:
additionalProperties: true
9 changes: 9 additions & 0 deletions charts/external-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Added

- Added ability to generate schema with `helm plugin schema`. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_
- Added `docs/contributing/dev-guide.md#helm-values` guide. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_

### Changed

- Regenerate JSON schema with `helm-values-schema-json' plugin. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_

## [v1.15.2] - 2025-02-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion charts/external-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
| secretConfiguration.subPath | string | `nil` | Sub-path for mounting the `Secret`, this can be templated. |
| securityContext | object | See _values.yaml_ | [Security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the `external-dns` container. |
| service.annotations | object | `{}` | Service annotations. |
| service.ipFamilies | list | `[]` | Service IP families. |
| service.ipFamilies | list | `[]` | Service IP families (e.g. IPv4 and/or IPv6). |
| service.ipFamilyPolicy | string | `nil` | Service IP family policy. |
| service.port | int | `7979` | Service HTTP port. |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. Templates are allowed in both the key and the value. Example: `example.com/annotation/{{ .Values.nameOverride }}: {{ .Values.nameOverride }}` |
Expand Down
19 changes: 19 additions & 0 deletions charts/external-dns/schema/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Custom values for schema creation.
# This is a YAML-formatted file.
# Declare variables to be passed into your schema.
resources:
requests:
cpu: 200m
memory: 128Mi
limits:
cpu: 200m
memory: 128Mi

provider:
webhook:
requests:
cpu: 200m
memory: 128Mi
limits:
cpu: 300m
memory: 200Mi
Loading
Loading