Hi guys - I'm trying out the pulumi operator. In m...
# pulumi-kubernetes-operator
l
Hi guys - I'm trying out the pulumi operator. In my case, I provide the stack configuration in the CRD. Updating the CRD with a configuration change goes undetected, although the CRD's generation has incremented. I don't want to use continueResyncOnCommitMatch because the operator should resync on CRD updates only. Clearly, putting the config in git would solve this, but it is not my intention. Is there a way to tell the operator to watch for CRD updates? Thanks!
e
Which CRD are you talking about — do you mean a Stack object, or a Program object?
l
a Stack object 👍
e
I see, so you want stack runs to be triggered by a change to the Stack object, but not run on a schedule. Setting .continueSyncOnCommitMatch means it’ll run on a schedule; not setting it means when the stack object changes, it’ll usually not run the stack because the commit didn’t change.
Naively, I would expect
resyncFrequency: 0
[sic] to mean “run when triggered, but don’t reschedule”. I know it doesn’t do that; but would that work for you?
It would run when you changed the config, but also if anything else in the Stack was changed, and on operator startup, and maybe some other times, because of how the API machinery works.
l
Yes, basically I would expect the operator to monitor both changes in the git repository (programs) and in the Stack definition, I guess it would be a simple and logical thing to do.. for me it sounds like somebody forgot to implement it 😄
e
It is more that the sensibility of the Pulumi command-line tool was carried over into the operator. The base assumption is that you only want to update the stack when you changed your code (and therefore there’s something to change), and not to spend resources running it otherwise. So, the operator will notice if a Stack has changed, but abandon the update if it’s already been run at that commit.
Actually there’s a bug in there, I think: https://github.com/pulumi/pulumi-kubernetes-operator/issues/397
As in, it should really work as you expected.
l
Ah, nice! Thanks for the information @eager-football-6317, I'll watch this one 👍