-
Notifications
You must be signed in to change notification settings - Fork 198
OTA-1404: Add Support for a Configuration File: Creation of a Periodic Check #1192
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?
OTA-1404: Add Support for a Configuration File: Creation of a Periodic Check #1192
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
defer utilruntime.HandleCrash() | ||
wait.UntilWithContext(runContext, func(_ context.Context) { | ||
klog.V(4).Infof("Syncing configuration file") | ||
}, time.Second*15) |
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.
Maybe 15 seconds is too little; however, the logic won't be that extensive.
Testing. Default Cluster - not run as expected.
Locally built and run CVO with the flag specified. As expected.
Locally built and run CVO with the flag NOT specified. As expected.
|
Add a new flag instead of a new environment variable to specify the path of the configuration file. Using env variables has the benefit of better backwards compatibility, for example, specifying not used env variable has no impact. Using a not-implemented flag results in an error. The flag is primarily intended for use in HyperShift, thus, these topics are relevant. In case the feature gate does not get into default, we must not drop the flag out of nowhere, which could cause issues in HyperShift. However, the new API is very small, and it is not likely for this functionality to be dropped along the way. An alternative is to use an env variable before the feature gets into default; however, I do not think this is worth the risk at the moment.
Right now, a placeholder log is present. The log will be exchanged with the actual logic to sync the configuration file later on.
293ee72
to
55d2d56
Compare
@DavidHurta: This pull request references OTA-1404 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
The force push has updated commit messages. The failing HyperShift job does not seem to be caused by the PR. |
/cc |
/hold Checking out using related libraries. |
/unhold The periodic checking will be replaced with a more proper solution in a later PR. |
The first PR in the series to enable the CVO to read a configuration file periodically for updates.
The goal of this PR is to create a new
config-file
flag and create a gated periodic check with a placeholder logic.The following PR will add logic to read, parse, and configure the CVO's verbosity of logs based on the file.
cvo: Add config-file flag
Add a new flag instead of a new environment variable to specify the path of the
configuration file. Using env variables has the benefit of better backwards
compatibility, for example, specifying not used env variable has no impact. Using
a not-implemented flag results in an error. The flag is primarily intended for use
in HyperShift, thus, these topics are relevant.
In case the feature gate does not get into default, we must not drop the flag
out of nowhere, which could cause issues in HyperShift. However, the new API
is very small, and it is not likely for this functionality to be dropped
along the way. An alternative is to use an env variable before the feature gets
into default; however, I do not think this is worth the risk at the moment.
pkg/cvo: Create periodic check for configuration file
Right now, a placeholder log is present.
The log will be exchanged with the actual logic to sync
the configuration file later on.