This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
k8s Secret check_mode issue #282
Labels
has_pr
This issue has a related PR that may close it.
priority/medium
type/bug
Something isn't working
Comments
One finding regarding the issue:
|
Since the k8s module is generic, in check mode it sees that what the user wants is We can just special case secrets in check mode here to make it work correctly, we just need to change |
tima
added
planned
This issue is planned to be taken up in a feature release
priority/medium
labels
Oct 22, 2020
gravesm
added a commit
to gravesm/community.kubernetes
that referenced
this issue
Jan 12, 2021
When adding a Secret and using stringData, check_mode will always show changes. An existing resource fetched from Kubernetes will have the stringData already base64 encoded and merged into the data attribute. This change performs the base64 encoding and merging with the provided definition to more accurately represent the current state of the cluster. This change only affects check_mode. When making any changes to the cluster the stringData is passed along as provided in the definition. Closes ansible-collections#282.
Merged
resolved_by_pr #343 |
Akasurde
added
has_pr
This issue has a related PR that may close it.
type/bug
Something isn't working
and removed
planned
This issue is planned to be taken up in a feature release
labels
Jan 13, 2021
goneri
pushed a commit
that referenced
this issue
Jan 14, 2021
When adding a Secret and using stringData, check_mode will always show changes. An existing resource fetched from Kubernetes will have the stringData already base64 encoded and merged into the data attribute. This change performs the base64 encoding and merging with the provided definition to more accurately represent the current state of the cluster. This change only affects check_mode. When making any changes to the cluster the stringData is passed along as provided in the definition. Closes #282.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
has_pr
This issue has a related PR that may close it.
priority/medium
type/bug
Something isn't working
SUMMARY
When k8s module is used for Kubernetes Secret (state=present) with a check_mode enabled, then it always returns changed: True. Without check_mode, the very same manifest returns changed: False. Please note this issue only applies to Secret resource type, ConfigMap resource returns expected results.
ISSUE TYPE
COMPONENT NAME
community.kubernetes.k8s
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Centos 8.2.2004
STEPS TO REPRODUCE
EXPECTED RESULTS
Having check_mode enabled, it should return empty diff when there is no change to be applied and change result set to False.
ACTUAL RESULTS
When check_mode is enabled, it always returns changed: True result even though there is no change to be applied.
The text was updated successfully, but these errors were encountered: