Closed copejon closed 5 years ago
LGTM
@guymguym So in adding a setable version value, we'll be adding a new param to NewProvisioner(). What do you think about making that a separate PR, given it's an API breaking change? This PR would still add basic labeling with the provisioner name as the key.
Summary of discussion with @guymguym:
The lib's Provisioner
struct can have a label-value string field added. This becomes the value of <provisioner-name>=<label-value>
label with the default value being "".
closing in favor of #159
Fixes #133 #57
Adds a label (
<provisioner_name>: ""
) to the OBC, OB, CM, and Secret. By k8s convention, provisioner names are usually in the form ofqualified.name/foo
. Labels values may only have.
,_
, or-
special characters whereas label keys are parsed in the same manner as provisioner names. Thus, assigning the name to the label key does not create an intuitive experience when getting object by label.The method for getting by label is the same:
kubectl get <obj> -l provisionerName
A little refactoring was done on CreateSecret and CreateConfigMap to separate process concerns (defining the object vs creating the object) and to clean up function signatures.
TODO: adjust unit tests