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

Reconcile Extensions Secret with EEC Token #3426

Closed
wants to merge 20 commits into from
Closed

Conversation

albertogdd
Copy link
Contributor

Description

K8S-10120

New extensions secret is reconciled when dynakube.spec.extensions.prometheus.enabled = true
Secret name = <dk-name>-extensions-token, containing eec-token data, which gets generated only once.

New conditions added related to the secret creation

How can this be tested?

  • Apply dynakube with dynakube.spec.extensions.prometheus.enabled = true
  • Check that secret gets created
  • Check that condition is added

@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.07692% with 11 lines in your changes missing coverage. Please review.

Project coverage is 57.31%. Comparing base (79211a9) to head (def1061).
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/controllers/dynakube/extension/secret.go 68.57% 7 Missing and 4 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3426      +/-   ##
==========================================
+ Coverage   57.23%   57.31%   +0.07%     
==========================================
  Files         344      346       +2     
  Lines       19781    19834      +53     
==========================================
+ Hits        11322    11367      +45     
- Misses       7221     7226       +5     
- Partials     1238     1241       +3     
Flag Coverage Δ
unittests 57.31% <83.07%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

aorcholski

This comment was marked as outdated.

aorcholski
aorcholski previously approved these changes Jul 10, 2024
pkg/controllers/dynakube/controller.go Show resolved Hide resolved
pkg/controllers/dynakube/extension/conditions.go Outdated Show resolved Hide resolved
return err
}

if errors.IsNotFound(err) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we not checking if the existing secret contains what we expect it to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK we generate its content (the eec-token) and we can't validate it against the API for now, but I will talk with the team about it.

albertogdd and others added 2 commits July 12, 2024 11:33
Co-authored-by: Christoph Muellner <33160506+chrismuellner@users.noreply.github.com>
@albertogdd
Copy link
Contributor Author

Closing PR because of merge conflicts. New PR here #3485

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.

None yet

6 participants