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

chore: use ack provider to resolve the cluster cni #95

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

jwcesign
Copy link
Contributor

@jwcesign jwcesign commented Nov 6, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

chore: use ack provider to resolve the cluster cni

Which issue(s) this PR fixes:

Fixes #91

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Copy link

gitautomator bot commented Nov 6, 2024

Thanks to your contribution, the maintainers will review it as soon as they can!

@jwcesign
Copy link
Contributor Author

jwcesign commented Nov 6, 2024

cc @helen-frank for checking

Copy link
Contributor

@helen-frank helen-frank left a comment

Choose a reason for hiding this comment

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

resolve pre-submit check

/lgtm

ackClient: ackClient,
clusterID: clusterID,
ackClient: ackClient,
clusterCNI: "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is an empty string necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not necessary, thanks for suggestion

func (p *DefaultProvider) LivenessProbe(_ *http.Request) error {
p.muClusterCNI.Lock()
//nolint: staticcheck
p.muClusterCNI.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any write operation here? Maybe it doesn't need the lock and unlock operation if just a read operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used to check whether it is in dead-lock state. aws provider does this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha.

Signed-off-by: jwcesign <jwcesign@cloudpilot.ai>
@helen-frank helen-frank merged commit ee655e7 into cloudpilot-ai:main Nov 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Detect the cni automatically
3 participants