HOSTEDCP-2207: Add filewatcher to library-go#1904
Conversation
|
@bryan-cox: This pull request references HOSTEDCP-2207 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 task to target the "4.19.0" version, but no target version was set. DetailsIn 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. |
This commit adds filewatcher to library-go. This functionality is used in several OCP operators and is specifically needed for HyperShift's managed Azure service. Signed-off-by: Bryan Cox <brcox@redhat.com>
b2cc6ae to
d28ae78
Compare
|
cc: @bennerv |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bryan-cox The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@bryan-cox: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
| @@ -0,0 +1,9 @@ | |||
| # General | |||
|
|
|||
| Filewatcher watches a file for changes within a pod. If the file contents have changed, the pod this function is running | |||
There was a problem hiding this comment.
I think that library-go already has this feature. Please take a look at
library-go/pkg/operator/watchdog/cmd.go
Line 98 in 8c1789c
For a sample usage example, you can check https://github.com/openshift/cluster-samples-operator/blob/master/manifests/06-operator.yaml#L82
Additionally, the feature provided by the library includes support for graceful termination, which this PR does not appear to offer.
|
/close We won't need this with the new authentication method being introduced in CNTRLPLANE-103 |
|
@bryan-cox: Closed this PR. DetailsIn 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 kubernetes-sigs/prow repository. |
Filewatcher was initially created during development of HyperShift's managed Azure service. Due to the Azure Cloud API authentication type used by this service, client certificate, whenever the certificate rotates, the pod needs to reauthenticate with Azure since Azure SDK for Go currently does not support re-authenticating with Azure with the new certificate.
This functionality was individually added to several OpenShift repos - CNCC, CIO, and CIRO - through the PRs mentioned below:
These repos should use the same codebase for this functionality rather than having 3 different instances of filewatcher.