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

JSON schema for flink-job #111

Merged
merged 30 commits into from
Oct 17, 2023
Merged

JSON schema for flink-job #111

merged 30 commits into from
Oct 17, 2023

Conversation

iblutrifork
Copy link
Contributor

@iblutrifork iblutrifork commented Sep 12, 2023

Add JSON schema for flink-job

Continuation of #95
Implementing https://jira.trifork.com/browse/KAMDP-341

Used the following script to verify existing charts:

kubectl get helmreleases.helm.toolkit.fluxcd.io --all-namespaces -o yaml > releases.tmp
yq '.items | map(select(.spec.chart.spec.chart == "flink-job")) | .[].spec.values | split_doc' releases.tmp > filtered.tmp
for i in `seq 0 30` ; do yq "select(di == ${i})" filtered.tmp | yq 'load("values.yaml") *= .' > "${i}.tmp" ; done
for i in `seq 0 30` ; do if [ `cat "${i}.tmp" | wc -l` -gt 1 ] ; then helm lint . --values "${i}.tmp" ; fi ; done

for i in `seq 0 30` ; do rm "${i}.tmp" ; done
rm filtered.tmp
rm releases.tmp

@iblutrifork iblutrifork requested a review from a team as a code owner September 12, 2023 07:39
@iblutrifork iblutrifork changed the title Json schema 2 JSON schema for flink-job Sep 12, 2023
Copy link
Contributor

@AndersBennedsgaard AndersBennedsgaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to be able to remove many/all of the fail and required fields in https://github.com/trifork/cheetah-charts/blob/main/charts/flink-job/templates/_helpers.tpl.
Such as

{{- $name := required "topics.name is required" .name -}}
which says that topics[*].name is required, and
{{- fail (printf "Topic type %s not understood. Allowed values are: input, output" .type) -}}
which says that topics[*].type must be input or output

charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
charts/flink-job/values.schema.json Outdated Show resolved Hide resolved
iblutrifork and others added 24 commits October 3, 2023 13:36
Copy link
Contributor

@AndersBennedsgaard AndersBennedsgaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change, but otherwise LGTM 😄

charts/flink-job/templates/_helpers.tpl Outdated Show resolved Hide resolved
@iblutrifork iblutrifork merged commit 477ca07 into main Oct 17, 2023
3 checks passed
@iblutrifork iblutrifork deleted the json-schema-2 branch October 17, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants