Skip to content

Conversation

@echupriyanov
Copy link

@echupriyanov echupriyanov commented Nov 7, 2017

Original code adds aliases to arf_spec, which often cause conflicts with top-level properties

closes #115

Copy link
Member

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm nervous about merging a change like this, because it will change the valid argument list for every single resource in openshift-ansible-kubernetes, and likely break everybody who has playbooks relying on them. I think a smaller change that just avoids creating conflicts is probably a better approach to take.

if prop_alt_prefix != prop_prefix:
if prop_alt_prefix:
args[prop_prefix + prop_name]['aliases'] = [prop_alt_prefix + prop_name]
elif prop_prefix:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think rather than removing these branches entirely, it might be better to just add a check that ensures it's not creating an alias that conflicts with a top level key.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may even just entail keeping a set of all names + aliases that have been used and checking that everything we're setting is unique.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this make sense. Will consider this option too

@fabianvf
Copy link
Member

The generated modules are deprecated in favor of the new dynamic client and corresponding k8s module

@fabianvf fabianvf closed this Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k8s_v1beta1_cluster_role_binding: role_ref_name is overwritten by object name

2 participants