* Add 100% test coverage for the kubernetes.secret_present state
* Add 100% test coverage for the kubernetes.configmap_absent state
* Add 100% test coverage for the kubernetes.configmap_present state
* Make some fields optional to kubernetes.create_secret and add examples
* Make some fields optional to kubernetes.replace_secret and add examples
* Make some fields optional to kubernetes.create_configmap and add examples
* Make some fields optional to kubernetes.replace_configmap and add examples
* Add 'comment' when a kubernetes configmap or secret is going to be replaced
* Update 'source', 'template', and 'saltenv' kwargs to defaults from the rest of the codebase
* Allow passing empty 'data' to the kubernetes.configmap_present state to remove the existing contents
This allows commands such as `kubectl rollout history deploy/$FOO` to
automatically show the deployment changed as a result of the salt run
and follows exactly how kubectl works when passed the `--record` flag.
When the `client_key_file` attribute was defined and the `client_key`
attribute was not, the conditional for `client_key` would wrongly zero
`kubernetes.client.configuration.key_file`.
This was a bit annoying to figure out, but the kubernetes module now can
authenticate with minikube with a configuration such as this (where jeff
is $USER):
kubernetes.api_url: 'https://192.168.99.100:8443'
kubernetes.certificate-authority-file: '/home/jeff/.minikube/ca.crt'
kubernetes.client-certificate-file: '/home/jeff/.minikube/client.crt'
kubernetes.client-key-file: '/home/jeff/.minikube/client.key'
The various options can be gotten from ~/.kube/config after running `minikube start`.
Elide terminology "execution failed/succeeded" since the result of these
conditions does not indicate a failure in state execution. Instead
simply report the result of each condition.
This is a solution that works for the other functions that interact with
group objects, making it a better overall solution to be used widely
in win_groupadd.
This also updates the mocking in the tests such that we use a more
comprehensive fake class, and more intelligent mocking of get_sam_name
using a lambda.
Move the code that sets up the group object, computer object and gets
existing members out of the individual functions so they can be mocked
Mock the GroupObj
Mock the ComputerObj
Mock existing members
Still need to fix info, getent, and members
Using the private mac range for vms makes it impossible to
distinguish between hypervisors.
Issues #44056
Signed-off-by: Marc Koderer <marc.koderer@sap.com>