Skip to content
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

Integrate KIND into makefile #152

Merged
merged 1 commit into from
Nov 25, 2020
Merged

Integrate KIND into makefile #152

merged 1 commit into from
Nov 25, 2020

Conversation

ccremer
Copy link
Contributor

@ccremer ccremer commented Nov 25, 2020

  • Integrates KIND into makefile, just run make run_kind and it will
    • Install the CRDs
    • Run the Operator with this kubeconfig
  • Makes the CRD compatible with K8s v1.18 again (the CRD generated was invalid):
The CustomResourceDefinition "prebackuppods.backup.appuio.ch" is invalid: 
* spec.validation.openAPIV3Schema.properties[spec].properties[pod].properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[pod].properties[spec].properties[containers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
make: *** [Makefile:163: setup_e2e_test] Error 1

Copy link
Contributor

@tobru tobru left a comment

Choose a reason for hiding this comment

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

hack/fix-crd.go might need some explanation what it does and why it is needed, either with a comment, better filename or hint in the README. I'm also not sure if the file is not well formatted?

@ccremer
Copy link
Contributor Author

ccremer commented Nov 25, 2020

hack/fix-crd.go might need some explanation what it does and why it is needed, either with a comment, better filename or hint in the README. I'm also not sure if the file is not well formatted?

I left comments in the Makefile as for the reasons...
But yes, it's not properly formatted. go fmt ./... doesnt catch this file, since there's the // +build fix-crd and that excludes it from fmt ./..., unless I do go fmt hack/fix-crd.go

@tobru
Copy link
Contributor

tobru commented Nov 25, 2020

I left comments in the Makefile as for the reasons...

Yes, but I'd rather want to see these comments in the go file to not have them disconnected. When I see such a file in a repo I would have no idea where to look for a description what it does, also with such an non-descriptive filename.

Preparation for possible e2e tests and also improves local running of K8up
@ccremer
Copy link
Contributor Author

ccremer commented Nov 25, 2020

I renamed the file and moved the comment

@ccremer ccremer merged commit 89672df into development Nov 25, 2020
@ccremer ccremer deleted the setup-kind branch November 25, 2020 15:38
@ccremer ccremer added the change Generic change that is neither a fix or feature label Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Generic change that is neither a fix or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants