-
Notifications
You must be signed in to change notification settings - Fork 58
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
Example of deploying the operator with Flux source controller #339
Conversation
spec: { | ||
interval: '5m0s', | ||
url: 'https://github.com/squaremo/pko-dev', | ||
ref: { branch: 'main' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth showing off any of the value add here? (Features we get via Flux that aren’t available directly?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, somewhere. This example is a "how to", to show people how to get it working at all, and (secondarily) for them to adapt to their needs. Putting fancy stuff in would obscure that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would cool to do more examples that show off e.g.,
- using OCI images with cosign verification
- following a semver tag
- using "ignore" to filter down the files made available
- using webhooks for notifications (at least once watching sources is implemented in the operator)
f512b25
to
9fa7e96
Compare
This has two Pulumi projects: - the top directory (examples/flux-source) is for deploying the Pulumi Kubernetes operator along with the Flux source controller - the subdirectory app/ has an example a a Stack object refering to a Flux source. Signed-off-by: Michael Bridgen <[email protected]>
Installing the CRD in this stack causes problems when you want to update it, since you can't patch/update a CRD within a ConfigFile. Instead, just assume it's already installed, e.g., by `make install`, for now. Signed-off-by: Michael Bridgen <[email protected]>
Signed-off-by: Michael Bridgen <[email protected]>
Instead of asserting that the Stack CRD is present, download and apply it unconditionally. Once you've run the stack, you can apply a development version of the CRD over the top of it, if you wish. Signed-off-by: Michael Bridgen <[email protected]>
- include Flux's notification-controller when installing Flux - create a webhook receiver object This parameterises the git URL used for the GitRepository source, so you must supply your own. (People won't be able to install webhooks in my repo!) Signed-off-by: Michael Bridgen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 tiny changes - all seems to work brilliantly with these.
You can use ngrok to tunnel webhooks through to a local or otherwise private cluster. This gives an example of deploying it which is enough to make the webhook in ../app work. Signed-off-by: Michael Bridgen <[email protected]>
Signed-off-by: Michael Bridgen <[email protected]>
This is better than quietly failing later on, with a bogus token. Signed-off-by: Michael Bridgen <[email protected]>
Signed-off-by: Michael Bridgen <[email protected]>
This removes another hard-coding of an account name. Signed-off-by: Michael Bridgen <[email protected]>
Signed-off-by: Michael Bridgen <[email protected]>
13aca21
to
20bd15b
Compare
This example shows how to set up the operator and Flux's source controller so they can work together. It includes a subordinate example which shows how to create a
GitRepository
(a Flux source) and aStack
object that points to it.This should remain a draft until the Flux support is released.