* Add 100% test coverage for the kubernetes.node_label_absent state
* Add 100% test coverage for the kubernetes.namespace_present state
* Add 100% test coverage for the kubernetes.namespace_absent state
* Add 100% test coverage for the kubernetes.secret_absent state
* Add 100% coverage for kubernetes.node_label_present
* Also add 'comment' to kubernetes.node_add_label
* Make the faux test objects more believable in test_kubernetes.py
* 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`.
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
Currently test expects that if the extension is already present salt will indicate that it will create it (which won't really happen without test=true since the extension is present), state was fixed so now salt will return correct information with test=true so fix the test to follow correct behaviour.