Skip to content

HOSTEDCP-2207: Add filewatcher to library-go#1904

Closed
bryan-cox wants to merge 1 commit into
openshift:masterfrom
bryan-cox:add-filewatcher
Closed

HOSTEDCP-2207: Add filewatcher to library-go#1904
bryan-cox wants to merge 1 commit into
openshift:masterfrom
bryan-cox:add-filewatcher

Conversation

@bryan-cox
Copy link
Copy Markdown
Member

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 9, 2024
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Dec 9, 2024

@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.

Details

In response to this:

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.

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>
@bryan-cox
Copy link
Copy Markdown
Member Author

cc: @bennerv

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bryan-cox
Once this PR has been reviewed and has the lgtm label, please assign bertinatto for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 9, 2024

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

Comment thread pkg/filewatcher/README.md
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that library-go already has this feature. Please take a look at

func NewFileWatcherWatchdog() *cobra.Command {

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.

@bryan-cox
Copy link
Copy Markdown
Member Author

/close

We won't need this with the new authentication method being introduced in CNTRLPLANE-103

@openshift-ci openshift-ci Bot closed this Jan 16, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 16, 2025

@bryan-cox: Closed this PR.

Details

In response to this:

/close

We won't need this with the new authentication method being introduced in CNTRLPLANE-103

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.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants