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

feat(greenhousectl): localenv OIDC setup with admin and remote clusters #931

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

abhijith-darshan
Copy link
Contributor

@abhijith-darshan abhijith-darshan commented Feb 25, 2025

Description

With the upcoming OIDC cluster connectivity feature, localenv will setup OIDC connectivity with admin and remote clusters as default setup.

Clusters can be onboarded via kubeconfig secret or via oidc secret

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@abhijith-darshan abhijith-darshan marked this pull request as ready for review February 25, 2025 01:12
@abhijith-darshan abhijith-darshan requested review from a team as code owners February 25, 2025 01:12
uwe-mayer
uwe-mayer previously approved these changes Feb 27, 2025
Copy link
Contributor

@uwe-mayer uwe-mayer left a comment

Choose a reason for hiding this comment

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

Thanks for this work!

It makes sense to onboard the remote Cluster via OIDC.

I cannot review the code changes in depth as I do not follow into the depths of unmarshalling kindConfigs to alter configuration in code.

Generally I would like to have as little rocket science as possible, but I trust your judgement on this :)

// executePostSetup - executes post setup actions on the cluster as defined in the configuration file
// piped shell commands are converted to ShellPipe type
// NOTE: output redirects to file are not supported
func (c *Cluster) executePostSetup() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have documentation on this feature?

And on all other config possibilities of Cluster (and other resources) within the localenv?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmmm, no but I didn't think people would need to extend this, as this is baked in the dev.config.yaml

@abhijith-darshan
Copy link
Contributor Author

abhijith-darshan commented Feb 27, 2025

Thanks for this work!

It makes sense to onboard the remote Cluster via OIDC.

I cannot review the code changes in depth as I do not follow into the depths of unmarshalling kindConfigs to alter configuration in code.

Generally I would like to have as little rocket science as possible, but I trust your judgement on this :)

In order to reduce complexity for Plugin Developers the Kind configuration for host path mounts are auto-generated on the fly... But with OIDC configuration also needing some host path mounts, we need to inject the plugin host path into the OIDC kind config.yaml hence the kind config manipulation is needed.

But we can also make it simple by having the plugin developers pass their own kind configuration file to the dev cli.

@abhijith-darshan abhijith-darshan marked this pull request as draft February 27, 2025 16:25
@abhijith-darshan abhijith-darshan self-assigned this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants