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): setup local dev environment for plugin developers #775

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

abhijith-darshan
Copy link
Contributor

@abhijith-darshan abhijith-darshan commented Nov 25, 2024

Plugin developers can now develop and test their charts locally in a KinD cluster.

.PHONY: setup-plugin-dev
setup-plugin-dev: cli
	PLUGIN_PATH=$(PLUGIN_DIR) $(CLI) dev setup -f dev-env/localenv/plugin.config.yaml && make setup-demo

Example Usage:

make setup-plugin-dev PLUGIN_DIR=<absolute/path/to/greenhouse-extensions-dir>

if PLUGIN_PATH ENV is detected then the dev CLI will automatically generate a KinD configuration file with hostPath that mounts the specified path in env to the KinD control-plane node.

make setup-plugin-dev hook will setup -

  • Greenhouse Admin and Remote clusters
  • Modifies Greenhouse Deployment to include host path volume and volume mount
  • Deploys Greenhouse operator along with the necessary manifests into the admin cluster
  • Applies a demo org
  • Onboards the remote cluster to the demo org

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)

Added to documentation?

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

Documentation will be handled in a separate PR.

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
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@abhijith-darshan abhijith-darshan self-assigned this Nov 26, 2024
@abhijith-darshan abhijith-darshan marked this pull request as ready for review November 26, 2024 12:33
@abhijith-darshan abhijith-darshan removed the request for review from a team November 26, 2024 12:49
Copy link
Contributor

@IvoGoman IvoGoman left a comment

Choose a reason for hiding this comment

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

Thanks this looks nice. I am wondering if we could make it in such a way that if I were to add my own samples that they are not tracked by git. Like ignore all files prefixed with local (/dev-env/localenv/samples/local_*.yaml).

pkg/internal/local/commands/common.go Outdated Show resolved Hide resolved
@abhijith-darshan
Copy link
Contributor Author

Thanks this looks nice. I am wondering if we could make it in such a way that if I were to add my own samples that they are not tracked by git. Like ignore all files prefixed with local (/dev-env/localenv/samples/local_*.yaml).

Yes we can add local_*.yaml to gitignore makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants