water-hole / ansible-operator

POC Code for the operator backed by ansible
48 stars 29 forks source link

convert spec parameters to snake_case before sending them to ansible. #17

Closed fabianvf closed 6 years ago

lkhomenk commented 5 years ago

@fabianvf Hi. could you please paste a link to the backgroud issue this PR fixed? at the moment we are facing opposite problems. spec of our CR contains valid k8s affinity which we wanted to reuse in deployments/pod/etc via the our ansible-based operator. But this mandatory MapToSnake is a showstopper for us

fabianvf commented 5 years ago

You can still access the unmodified spec of the object in the _{group}_{kind} (lower case with dots changed to underscores) variable, so if you have an apps.example.com/v1alpha1 Sample object the unmodified spec would be in _apps_example_com_sample.spec