-
Notifications
You must be signed in to change notification settings - Fork 6
Unify baseConfig logic for apps.Config across app and project config #225
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
base: main
Are you sure you want to change the base?
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeout could be on an extra line
| Name: "scheduled-1", | ||
| Size: ptr.To(string(test.AppStandard1)), | ||
| Schedule: "* * * * *", | ||
| Retries: 1, Timeout: time.Minute * 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeout could be on a separate line
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.