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

remove config hash when namespace is excluded #236

Merged
merged 5 commits into from
Feb 10, 2021

Conversation

eytan-avisror
Copy link
Collaborator

@eytan-avisror eytan-avisror commented Feb 9, 2021

Signed-off-by: Eytan Avisror [email protected]

Fixes #235

  • Moves setting of config hash up to controller level, will now unset configHash field if configmap is nil/empty/does not exist.

  • Refactors namespace exclusion logic into IsNamespaceExcluded method

  • Refactors UpdateStatus to use patch instead of update, in order avoid metadata changes causing a reconcile loop - in k8s 1.18 managedFields was introduced along with a time field which causes this problem when using Update method. For now this implements a custom StatusPatch, in the future we might want something similar to Reconcile Improvements - evaluate using Event Filters #240

  • BDD Passing

@backjo

@eytan-avisror eytan-avisror requested review from a team as code owners February 9, 2021 04:40
@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #236 (4f7d437) into master (eb0627c) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
- Coverage   87.90%   87.89%   -0.02%     
==========================================
  Files          17       17              
  Lines        2207     2205       -2     
==========================================
- Hits         1940     1938       -2     
  Misses        162      162              
  Partials      105      105              
Impacted Files Coverage Δ
controllers/provisioners/eks/eks.go 84.21% <ø> (-0.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb0627c...fc63937. Read the comment docs.

controllers/instancegroup_controller.go Outdated Show resolved Hide resolved
controllers/instancegroup_controller.go Outdated Show resolved Hide resolved
Eytan Avisror added 3 commits February 8, 2021 20:55
Signed-off-by: Eytan Avisror <[email protected]>
Signed-off-by: Eytan Avisror <[email protected]>
@eytan-avisror
Copy link
Collaborator Author

27 scenarios (27 passed)
147 steps (147 passed)
28m47.254921999s
testing: warning: no tests to run
PASS
ok  	github.com/keikoproj/instance-manager/test-bdd	1727.554s [no tests to run]

Signed-off-by: Eytan Avisror <[email protected]>
@eytan-avisror eytan-avisror merged commit e40c46e into keikoproj:master Feb 10, 2021
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.

Infinite reconcile loop in Kubernetes 1.18
2 participants