Skip to content

Conversation

@pawelkuc
Copy link
Contributor

@pawelkuc pawelkuc commented May 6, 2025

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.

pawelkuc added 3 commits May 6, 2025 19:39
…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",
Copy link
Contributor

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,
Copy link
Contributor

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,
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants