https://pulumi.com logo
#pulumi-kubernetes-operator
Title
# pulumi-kubernetes-operator
l

loud-energy-23510

12/16/2022, 8:15 AM
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

eager-football-6317

12/16/2022, 12:04 PM
Which CRD are you talking about — do you mean a Stack object, or a Program object?
l

loud-energy-23510

12/16/2022, 12:05 PM
a Stack object 👍
e

eager-football-6317

12/16/2022, 1:35 PM
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

loud-energy-23510

12/16/2022, 2:21 PM
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

eager-football-6317

01/05/2023, 4:28 PM
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

loud-energy-23510

01/07/2023, 6:08 AM
Ah, nice! Thanks for the information @eager-football-6317, I'll watch this one 👍
27 Views