busy-soccer-65968
06/05/2020, 7:10 PMmetadeta.name
to my secret. Then my deployment diff shows [secret]
and does a delete-replace instead of simply updated the deployment spec. If I do not include metadata.name
in my secret and update the stringData
then the deployent does an update instead of delete replace. It also, does not show the [secret]
diff. Is this expect?// Create a Secret with the database credentials.
const databaseSecret = new k8s.core.v1.Secret("db-secret", {
stringData: {
"database-username": "test1",
"database-password": "test1",
}
}, { provider: provider });
run pulumi update
it creates the deployment with that secret
then I update
const databaseSecret = new k8s.core.v1.Secret("db-secret", {
stringData: {
"database-username": "test2",
"database-password": "test2",
}
}, { provider: provider });
and run pulumi update. Then the Deployment shows update. However,
if I make
// Create a Secret with the database credentials.
const databaseSecret = new k8s.core.v1.Secret("db-secret", {
metadata: {name: "blahblah"}, <---- adding metadata.name
stringData: {
"database-username": "test1",
"database-password": "test1",
}
}, { provider: provider });
and then perform the same steps above. Then the deployment actually shows as replace
instead of update
which TERMINATES all pods and the deployment. Then replaces them all.metadata.name
however I would like to be able to name my secret without it replacing the deployment everytime the stringData
changesSecret.ts
it doesn't look like metadata is secret output. https://github.com/pulumi/pulumi-kubernetes/blob/master/sdk/nodejs/core/v1/Secret.ts#L134-L137