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

Add runtime configuration validation #8943

Merged
merged 8 commits into from
Nov 8, 2021
Merged

Conversation

ofek
Copy link
Contributor

@ofek ofek commented Mar 22, 2021

What does this PR do?

Adds config models from #8675

@ofek ofek force-pushed the ofek/sync_config_models_kong branch from 3aaee8a to a8bc90a Compare March 23, 2021 14:35
@ofek ofek changed the title Sync config models Add runtime configuration validation Mar 23, 2021
kerberos_hostname: Optional[str]
kerberos_keytab: Optional[str]
kerberos_principal: Optional[str]
kong_status_url: str
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kong_status_url: str
kong_status_url: Optional[str]

Since the check also offers an openmetrics option. The spec.yaml will also need updating.

@ofek ofek requested a review from a team as a code owner November 6, 2021 01:56
@ghost ghost added the documentation label Nov 6, 2021
@github-actions
Copy link

github-actions bot commented Nov 6, 2021

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@codecov
Copy link

codecov bot commented Nov 6, 2021

Codecov Report

Merging #8943 (e7382da) into master (763da12) will not change coverage.
The diff coverage is n/a.

Flag Coverage Δ
kong 92.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@ofek ofek merged commit 2fa18b7 into master Nov 8, 2021
@ofek ofek deleted the ofek/sync_config_models_kong branch November 8, 2021 17:41
github-actions bot pushed a commit that referenced this pull request Nov 8, 2021
* Sync config models

* re-sync

* address

* sync 2fa18b7
@@ -8,13 +8,13 @@ files:
- template: instances
options:
- name: kong_status_url
required: true
Copy link
Contributor

@hithwen hithwen Nov 15, 2021

Choose a reason for hiding this comment

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

But it is required

if 'kong_status_url' not in instance:
raise Exception('missing "kong_status_url" value')

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, but only if openmetrics_endpoint is not defined

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

Successfully merging this pull request may close these issues.

3 participants