Unify baseConfig logic for apps.Config across app and project config#225
Open
Unify baseConfig logic for apps.Config across app and project config#225
Conversation
…onfig Introduce shared apps.Config logic, in a form of baseConfig struct, that removes duplication between application and project config. As a result this automatically fixes missing features in project config such as missing scheduledjob and workerjob arguments and missing delete env support. Also introduce shared test helpers for baseConfig and job assertion logic.
… validation We now rely on the Kubernetes admission webhook deployed for our CRD backend, which performs full validation of the config, including DeployJob. The removed logic only checked the job name and did not cover other important fields, making it insufficient for robust validation.
…efaults
Add a call to ApplicationKongVars in TestProjectConfigFlags so that all
app_default_* variables (e.g. ${app_default_size} in the help/placeholder
strings) are populated before invoking kong.Must(). This change prevents
build-time panics from unresolved placeholders.
| BasicAuth: ptr.To(true), | ||
| Env: map[string]string{"key1": "val1"}, | ||
| DeployJob: deployJob{ | ||
| Command: "exit 0", Name: "exit", |
Contributor
There was a problem hiding this comment.
could we maybe add some line breaks here?
| Env: map[string]string{"key1": "val1"}, | ||
| DeployJob: deployJob{ | ||
| Command: "exit 0", Name: "exit", | ||
| Retries: 1, Timeout: time.Minute * 5, |
Contributor
There was a problem hiding this comment.
Timeout could be on an extra line
| Name: "scheduled-1", | ||
| Size: ptr.To(string(test.AppStandard1)), | ||
| Schedule: "* * * * *", | ||
| Retries: 1, Timeout: time.Minute * 5, |
Contributor
There was a problem hiding this comment.
Timeout could be on a separate line
thirdeyenick
approved these changes
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce shared apps.Config logic, in a form of baseConfig struct, that removes duplication between application and project config. Also introduce shared test helpers for baseConfig and job assertion logic.