-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Most of the saltext-kubernetes state module present functions replace the resource if changes are detected. Ideally the state module is idempotent to prevent unnecessary changes to resource. As it stands now, the module replaces resources i.e. deployments, services, secrets, etc. - or hard fails for things like pods which are mostly immutable after creation.
Discussion on the topic below.
assert ret.changes["kubernetes.node_label_folder"]["new"] == "absent"
Yes, that's correct.
I do not think we can do that because the state module doesn't treat resources as idempotent like typical salt present functions.
Oh, you're right. The state module .present
functions are not idempotent -.-. Just comment out the assertions then, but leave them in for future improvements.
# TODO: improve checks # pylint: disable=fixme |
This is a bit of a hyperbole since there are none. 😅 Idempotency is the whole point of a state module...
Originally posted by @lkubb in #11 (comment)