millions-judge-24978
04/05/2019, 9:22 PMconfigMap.metadata.name
of a ConfigMap. Changing the data
of the ConfigMap is causing both resources to be replaced.white-balloon-205
Does a replacement of one resource automatically cause a replacement of anything dependent on it?No - a replace resource only triggers replacements of other resources that depend on it if the property that carried the dependency indicates that it requires replacement when there are changes. In what way does your
StatefulSet
depend on configMap.metadata.name
? I would have expected that your StatefulSet
would update in-place with the new configmap contents.millions-judge-24978
04/05/2019, 9:32 PMmetadata.name
output from the ConfigMap as input to the StatefulSet with no real reason to. I think the solution is to just break that dependencyspec
of the StatefulSet to change in response to the ConfigMap update.
The ConfigMap supplies an entrypoint script, and I would like the StatefulSet to update when it changes.{
name: 'ENTRYPOINT_SHA',
value: configMap.data.apply(data => data['entrypoint.sh'].apply(entrypoint => sha1hash(entrypoint))),
}
Just trying to get the pulumi parts exactly correctOutput<string>
, but at runtime it's just a string
.
Forced to do this:
{
name: 'ENTRYPOINT_SHA',
value: configMap.data.apply(data => {
const entrypoint = data['entrypoint.sh'] as unknown as string;
return sha1hash(entrypoint);
}),
}
-kubernetes:apps/v1:StatefulSet: (replace) 🔒
[id=ethernetes/ethernetes-goerli]
[urn=urn:pulumi:prod::ethernetes::ethernetes:k8s-eth-node$kubernetes:apps/v1:StatefulSet::ethernetes-goerli]
[provider=urn:pulumi:prod::ethernetes::pulumi:providers:kubernetes::infrastructure::b7c38e43-a431-4928-b5fc-ba76f8843d16]
~ spec : {
~ template : {
~ spec : {
~ containers : [
~ [0]: {
~ env : [
~ [1]: {
~ value: "ed045838" => "069ec057"
}
]
}
]
}
}
}
gorgeous-egg-16927
04/05/2019, 10:25 PMmillions-judge-24978
04/05/2019, 10:28 PMspec
updates just caused kubernetes:apps:StatefulSet ethernetes-kovan update [diff: ~spec]
where it would do a rolling updategorgeous-egg-16927
04/05/2019, 10:33 PMmillions-judge-24978
04/05/2019, 10:34 PMConfigMap
and update the StatefulSet
as a resultgorgeous-egg-16927
04/05/2019, 10:35 PMmillions-judge-24978
04/05/2019, 10:36 PMconfigMap.data.apply(data => {
const entrypoint = data['entrypoint.sh'] as unknown as string;
return sha1hash(entrypoint);
is pretty odd though.gorgeous-egg-16927
04/05/2019, 10:38 PMmillions-judge-24978
04/05/2019, 10:41 PMgorgeous-egg-16927
04/05/2019, 10:56 PMconst entrypoint = configMap.data.apply(data => data['entrypoint.sh']);
export const sha = entrypoint.apply(ep => sha1hash(ep));
millions-judge-24978
04/05/2019, 10:57 PMStatefulSet
, that could be causing it?gorgeous-egg-16927
04/05/2019, 10:58 PM.metadata.name
, which is probably the causemillions-judge-24978
04/05/2019, 10:59 PMgorgeous-egg-16927
04/05/2019, 10:59 PMmillions-judge-24978
04/05/2019, 11:00 PMgorgeous-egg-16927
04/05/2019, 11:00 PMmillions-judge-24978
04/05/2019, 11:03 PM