sparse-intern-71089
02/08/2022, 8:56 PMbored-table-20691
02/08/2022, 8:59 PMbored-table-20691
02/08/2022, 9:22 PMchilly-plastic-75584
02/08/2022, 9:47 PMquiet-wolf-18467
bored-table-20691
02/08/2022, 10:03 PMbored-table-20691
02/08/2022, 10:07 PMchilly-plastic-75584
02/08/2022, 10:09 PMbored-table-20691
02/08/2022, 10:12 PMbored-table-20691
02/08/2022, 10:13 PMquiet-wolf-18467
bored-table-20691
02/08/2022, 11:43 PMbored-table-20691
02/08/2022, 11:50 PMbored-table-20691
02/08/2022, 11:52 PMimmutable
in the new Kubernetes capability sense.orange-policeman-59119
02/09/2022, 1:48 AMmetadata.spec.name
, changes to that value are treated as an update.
If you set metadata.spec.name
we generate a Replace on consumers, which can cause the unexpected behavior of deleting & recreating a Deployment, StatefulSet, etc.chilly-plastic-75584
02/09/2022, 11:27 PMbored-table-20691
02/09/2022, 11:28 PMchilly-plastic-75584
02/09/2022, 11:28 PMcfgMap, err = corev1.NewConfigMap(ctx, configData.ServiceConfigMapName(), &corev1.ConfigMapArgs{
Metadata: &metav1.ObjectMetaArgs{
Labels: configData.AppPulumiStringMap(),
},
Data: pulumi.StringMap{configData.Configdatamapname: pulumi.String(string(marshalledConfigVals))},
Immutable: pulumi.Bool(true),
}, pulumi.Provider(prov))
I'm not setting metadata name explictlychilly-plastic-75584
02/09/2022, 11:28 PMchilly-plastic-75584
02/09/2022, 11:28 PMchilly-plastic-75584
02/09/2022, 11:29 PMmyapi-project-adlkfsli
style. It just isn't making the configmap be rebuilt when the marshalled string has a different value.orange-policeman-59119
02/09/2022, 11:30 PMchilly-plastic-75584
02/09/2022, 11:31 PM--refresh
?bored-table-20691
02/09/2022, 11:31 PMpulumi preview
- does it show the config map as needing an update?chilly-plastic-75584
02/09/2022, 11:31 PMchilly-plastic-75584
02/09/2022, 11:31 PMchilly-plastic-75584
02/09/2022, 11:32 PMbored-table-20691
02/09/2022, 11:32 PMrefresh
seems orthogonal here.orange-policeman-59119
02/09/2022, 11:32 PMchilly-plastic-75584
02/09/2022, 11:32 PMorange-policeman-59119
02/09/2022, 11:32 PMbored-table-20691
02/09/2022, 11:33 PMpulumi up
, then update your config, then run pulumi up
again - what happens?chilly-plastic-75584
02/09/2022, 11:34 PMorange-policeman-59119
02/09/2022, 11:34 PMchilly-plastic-75584
02/09/2022, 11:34 PMchilly-plastic-75584
02/09/2022, 11:35 PMorange-policeman-59119
02/09/2022, 11:35 PMmetadata.name
or something like thatchilly-plastic-75584
02/09/2022, 11:35 PMmage pulumi:diff myproject dev
(i love mage)... I get a new configmapchilly-plastic-75584
02/09/2022, 11:36 PMchilly-plastic-75584
02/09/2022, 11:36 PMchilly-plastic-75584
02/09/2022, 11:37 PMorange-policeman-59119
02/09/2022, 11:38 PMchilly-plastic-75584
02/09/2022, 11:38 PMResources:
~ 2 updated
+-1 replaced
3 changes. 6 unchanged
Duration: 16s
chilly-plastic-75584
02/09/2022, 11:38 PMorange-policeman-59119
02/09/2022, 11:39 PMchilly-plastic-75584
02/09/2022, 11:41 PMorange-policeman-59119
02/09/2022, 11:41 PMorange-policeman-59119
02/09/2022, 11:42 PMpulumi refresh
and the refresh stage of pulumi up --refresh
takes resources in your stack, as they existed at the last deployment, and compares them to what's currently deployed. It's basically doing kubectl get config ...
and refreshing the state file.chilly-plastic-75584
02/09/2022, 11:42 PMchilly-plastic-75584
02/09/2022, 11:42 PMorange-policeman-59119
02/09/2022, 11:42 PMchilly-plastic-75584
02/09/2022, 11:42 PMbored-table-20691
02/09/2022, 11:43 PMup
- it’ll just edit the local statechilly-plastic-75584
02/09/2022, 11:44 PMwatch --refresh
orange-policeman-59119
02/09/2022, 11:44 PMpulumi stack export --file stack.json
I think adding --refresh
causes us to run a "refresh step" before other commands, e.g.: pulumi up --refresh
is equivalent to pulumi refresh; pulumi up
chilly-plastic-75584
02/09/2022, 11:44 PMorange-policeman-59119
02/09/2022, 11:44 PMpulumi watch --refresh
is just pulumi refresh; pulumi watch
(or if you're familiar with nodemon, watchexec, it's like pulumi refresh; watchexec pulumi up
)bored-table-20691
02/09/2022, 11:46 PMrefresh
would have any impact here, unless the resource was already updated on k8s.orange-policeman-59119
02/09/2022, 11:46 PM