Skip to content

removes dictionary key for subhelm and uses selectorsInherited#576

Merged
mumoshu merged 2 commits intoroboll:masterfrom
sgandon:sgandon/removes_dic_key_subhelmfile
May 6, 2019
Merged

removes dictionary key for subhelm and uses selectorsInherited#576
mumoshu merged 2 commits intoroboll:masterfrom
sgandon:sgandon/removes_dic_key_subhelmfile

Conversation

@sgandon
Copy link
Copy Markdown
Contributor

@sgandon sgandon commented May 5, 2019

following @mumoshu comments here #567, I removed the usage of subhelmfile path as map key.
I also introduced the selectorsInherited key for explicit parent selector inheritance.

@sgandon sgandon force-pushed the sgandon/removes_dic_key_subhelmfile branch from 3507c68 to b2a085a Compare May 5, 2019 22:34
Comment thread state/state.go
default:
return fmt.Errorf("Expecting list of strings or and empty {} mapping [-%v] but got: [%v] of type [%T] ", hf.Path, selectors, selectors)
//also exclude SelectorsInherited to true and explicit selectors
if hf.SelectorsInherited && len(hf.Selectors) > 0 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this guard!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mumoshu about this. I was wondering if we could not accept inheritance and selectors like this

helmfiles:
- path: /infrastructure-helmfile.yaml
  selectors:
  - name=grafana
  - name=prometheus
  SelectorsInherited : true

where if nothing comes from the parent helmfile or the command line then only grafana and prometheus are selected and if there is parent selectors then they would be combined together, meaning inherited selectors added to the default selectors.
What do you think ?

Copy link
Copy Markdown
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for following up ☺️

@mumoshu mumoshu merged commit 9a820d7 into roboll:master May 6, 2019
@sgandon sgandon deleted the sgandon/removes_dic_key_subhelmfile branch May 6, 2019 07:02
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.

2 participants