Skip to content

Controller read resource another controller #3172

Closed Answered by camilamacedo86
Tomelin asked this question in Support
Discussion options

You must be logged in to vote

Yes, you can achieve that.
You're looking to create a controller primarily responsible for managing a principal Kind (e.g., MyKind). This will be your main controller for this Kind.

However, to implement this solution, you'll also need to manage a second Kind created in your project. You'll watch this, and manage it similarly to how you'd handle a deployment.

The code utilizes the outdated watch syntax. Now, it's recommended to use the builder pattern. While the current layout is no longer supported, you can find an example in the postgresql-operator project. In this project, the Kind responsible for creating the cronjob observes the Kind that represents the database on the cluster.

Closi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by camilamacedo86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants