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

console: add initial draft of Values struct #1418

Merged
merged 2 commits into from
Jul 12, 2024
Merged

Conversation

chrisseto
Copy link
Contributor

This commit adds the initial go version of the console helm chart's values.yaml. The typing is primarily based off values.yaml, what can be cleaned from the chart, and the json schema. A test has been added to ensure that values.yaml and the struct are YAML/JSON compatible.

A few minor changes have been made to the values.yaml file to ease the typing consistency.

  • topologySpreadConstraints is treated as a slice in the chart but defaults to an empty dict. It is now an empty slice.
  • livenessProbe.initialDelaySeconds defaults to 0 but the underlying Kubernetes type specifies omitempty. It's defaulting has been moved to runtime to match the marshaling behavior.

@chrisseto
Copy link
Contributor Author

Note to me: Need to update the partial values and there's a tiny bug in genpartial that mucks up tags if omitempty is specified in the target struct 🤔

Prior to this commit `EnsureOmitEmpty` would incorrectly handle json tags
already containing `omitempty`.

This commit fixes the issue, bemoans the lack of a .ReplaceAllSubmatchFunc API,
and adds regression tests.
This commit adds the initial go version of the console helm chart's
values.yaml. The typing is primarily based off `values.yaml`, what can be
cleaned from the chart, and the json schema. A test has been added to ensure
that `values.yaml` and the struct are YAML/JSON compatible.

A few minor changes have been made to the `values.yaml` file to ease the typing
consistency.

- `topologySpreadConstraints` is treated as a slice in the chart but defaults
  to an empty dict. It is now an empty slice.
- `livenessProbe.initialDelaySeconds` defaults to 0 but the underlying
  Kubernetes type specifies `omitempty`. It's defaulting has been moved to
  runtime to match the marshaling behavior.
@chrisseto chrisseto enabled auto-merge (rebase) July 12, 2024 16:50
@chrisseto chrisseto merged commit f6a1569 into main Jul 12, 2024
12 checks passed
@chrisseto chrisseto deleted the chris/p/console-go-values branch July 12, 2024 16:56
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.

None yet

2 participants