Open kellervater opened 1 year ago
@kellervater Thanks for reporting this issue and providing the fix for this. You are indeed correct that a NetworkPolicy to enable ingress to Flux is required for the Pulumi Operator to interact with Flux's source-controller.
Looking at the examples we have in our Operator codebase, we explicitly enable ingress to Flux components when we install Flux using the Pulumi Flux provider. The default installation of Flux does not allow ingress, which likely explains the initial error you experienced.
I'll ensure that this requirement is documented somewhere. Thanks for bringing this up once again!
What happened?
I tried to integrate a Pulumi Program written in Go via a Flux source like described in here: https://www.pulumi.com/blog/pulumi-kubernetes-new-2022/#integration-with-flux-sources
Unfortunately this is failing due to a timeout-issue. The pulumi-operator times out grabbing the GitRepository from the Flux-Source-Controller like this:
I was able to overcome this issue by adding this exact network policy for the flux source-controller:
I'm not sure if my "outdated" flux or pulumi are the reason for this behavior, but they are set as follows: Pulumi version in cluster:
v3.68.0
Flux version:v0.41.2
(current: v2.0.1)Expected Behavior
a chapter in the documentation describing on how to add the above network policy or a built-in way which does it for you.
Steps to reproduce
Just follow the documentation in here https://www.pulumi.com/blog/pulumi-kubernetes-new-2022/#integration-with-flux-sources with the above mentioned pulumi/flux versions.
Output of
pulumi about
From within the pulumi-operator pod:![image](https://github.com/pulumi/pulumi-kubernetes-operator/assets/33324812/3d480203-0cb4-4842-8372-28a4ddc2b69e)
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).