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

【FIX】fix daemonset pod updater pointer error #1340

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

JameKeal
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

When i use helm to deploy application, the daemonset in helm charts is add annotations for daemonsetpodupdater to use, and containers are constantly being created and deleted after deploy.

I print some log for daemonsetpodupdater

I0329 10:16:42.059308   55304 util.go:77] IsDaemonsetPodLatest pod.Labels: 1, fmt.Sprint(generation): 0xc0008cc768

and find some error

pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(generation)

the code want to use pointer convert to string to compare

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@openyurt-bot openyurt-bot added the kind/bug kind/bug label Mar 29, 2023
@openyurt-bot
Copy link
Collaborator

@JameKeal: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

When i use helm to deploy application, the daemonset in helm charts is add annotations for daemonsetpodupdater to use, and containers are constantly being created and deleted after deploy.

I print some log for daemonsetpodupdater

I0329 10:16:42.059308   55304 util.go:77] IsDaemonsetPodLatest pod.Labels: 1, fmt.Sprint(generation): 0xc0008cc768

and find some error

pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(generation)

the code want to use pointer convert to string to compare

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

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/test-infra repository.

@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:node-servant. As part of the setup process, we have scanned this repository and found 4 existing alerts. Please check the repository Security tab to see all alerts.

@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:yurt-manager. As part of the setup process, we have scanned this repository and found 4 existing alerts. Please check the repository Security tab to see all alerts.

@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:yurthub. As part of the setup process, we have scanned this repository and found 4 existing alerts. Please check the repository Security tab to see all alerts.

@sonarcloud
Copy link

sonarcloud bot commented Mar 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rambohe-ch
Copy link
Member

@xavier-hou PTAL

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #1340 (cff087d) into master (384238f) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
+ Coverage   52.96%   53.05%   +0.09%     
==========================================
  Files         102      102              
  Lines       12849    12849              
==========================================
+ Hits         6805     6817      +12     
+ Misses       5486     5475      -11     
+ Partials      558      557       -1     
Flag Coverage Δ
unittests 53.05% <100.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
pkg/controller/daemonpodupdater/util.go 70.50% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@xavier-hou
Copy link
Member

@JameKeal Thank you for your contribution~
/lgtm

@openyurt-bot
Copy link
Collaborator

@xavier-hou: changing LGTM is restricted to collaborators

In response to this:

@JameKeal Thank you for your contribution~
/lgtm

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/test-infra repository.

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JameKeal, rambohe-ch

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot added the approved approved label Mar 29, 2023
@openyurt-bot openyurt-bot merged commit 75719ae into openyurtio:master Mar 29, 2023
@JameKeal JameKeal deleted the fix-daemonpodupdater-error branch March 29, 2023 12:23
JameKeal added a commit to JameKeal/openyurt that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/bug kind/bug lgtm lgtm size/XS size/XS: 0-9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants