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

POC: support for k8s secrets #330

Merged
merged 8 commits into from
Jul 7, 2024

Conversation

ffais
Copy link
Contributor

@ffais ffais commented Mar 26, 2024

This is a POC to resolve this issue #323. I tested on my cluster and works fine.
There're some issue with my implementation, for example secret namespace and secret key are hard coded.

If you have suggestion on how load secret namespace and key from the CR let me know.

Signed-off-by: ffais <ffais@fbk.eu>
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.40%. Comparing base (61b5c5e) to head (a33dc7c).
Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
+ Coverage   63.22%   64.40%   +1.17%     
==========================================
  Files           6        6              
  Lines         669      545     -124     
==========================================
- Hits          423      351      -72     
+ Misses        198      144      -54     
- Partials       48       50       +2     

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

Copy link
Owner

@nakamasato nakamasato left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.
Basically LGTM but left tiny comments!

@nakamasato
Copy link
Owner

Can you also update docs?

…x k8s-secret-namespace description

Signed-off-by: ffais <ffais@fbk.eu>
@ffais
Copy link
Contributor Author

ffais commented Apr 29, 2024

Can you also update docs?

I'll work on the documentations in the next days, it will probably also be necessary to update the Helm chart to align it with the documentation.

@morfien101
Copy link

morfien101 commented Jun 10, 2024

Is this going to get merged in?

By supporting k8s secrets you can actually remove the GCP support and hand that over to projects like external secrets. This will make this project simpler and more clear cut.

@nakamasato
Copy link
Owner

@morfien101 Yeah, I'd love to merge this pr. I'll update the branch to run the CI.

@nakamasato
Copy link
Owner

@ffais I think we need to grant the get permission of Secret to mysql_controller. Can you add it? Other than that, I think we can merge your pr.

//+kubebuilder:rbac:groups=mysql.nakamasato.com,resources=mysqls,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=mysql.nakamasato.com,resources=mysqls/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=mysql.nakamasato.com,resources=mysqls/finalizers,verbs=update
//+kubebuilder:rbac:groups=mysql.nakamasato.com,resources=mysqlusers,verbs=list;
//+kubebuilder:rbac:groups=mysql.nakamasato.com,resources=mysqldbs,verbs=list;

Signed-off-by: ffais <ffais@fbk.eu>
Signed-off-by: ffais <ffais@fbk.eu>
ffais and others added 2 commits July 3, 2024 07:26
Co-authored-by: Naka Masato <masatonaka1989@gmail.com>
Copy link
Owner

@nakamasato nakamasato left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
I've updated config/rbac/role.yaml and all CI passed!

@nakamasato nakamasato merged commit ac6274c into nakamasato:main Jul 7, 2024
9 checks 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.

3 participants