-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deployCrds template rewrite in generated CRD #832
Conversation
- Fixed the auto-removal of deployCrds logic from CRD manifest by controller-gen, the manifest is wrapped with template after generation - Added extra helper messages to affected make targets and functions Signed-off-by: Timofey Ilinykh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I missed that in #818
@echo -e "\n$(YELLOW)Generating the CRD manifests$(NC)" | ||
@echo -n "{{- if .Values.k8gb.deployCrds }}" > $(GSLB_CRD_YAML) | ||
$(GOBIN)/controller-gen crd:crdVersions=v1 paths="./..." output:crd:stdout >> $(GSLB_CRD_YAML) | ||
@echo "{{- end }}" >> $(GSLB_CRD_YAML) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it will tamper the git status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ytsarev not sure I'm following
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@somaritane i've meant from the PoV that it will affect git status
after regeneration but it is actually valid in case of API changes. And if there are no API changes in the working tree the GSLB_CRD_YAML file will stay intact. So all good, approving
@echo -e "\n$(YELLOW)Generating the CRD manifests$(NC)" | ||
@echo -n "{{- if .Values.k8gb.deployCrds }}" > $(GSLB_CRD_YAML) | ||
$(GOBIN)/controller-gen crd:crdVersions=v1 paths="./..." output:crd:stdout >> $(GSLB_CRD_YAML) | ||
@echo "{{- end }}" >> $(GSLB_CRD_YAML) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@somaritane i've meant from the PoV that it will affect git status
after regeneration but it is actually valid in case of API changes. And if there are no API changes in the working tree the GSLB_CRD_YAML file will stay intact. So all good, approving
controller-gen, the manifest is wrapped with template after generation
Signed-off-by: Timofey Ilinykh [email protected]