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

Fix incorrect path for Kustomize in addon operators #91

Merged
merged 1 commit into from
May 5, 2020

Conversation

rajansandeep
Copy link
Contributor

@rajansandeep rajansandeep commented Apr 21, 2020

Kustomize cannot find the kustomization.yaml file for creating the final manifest.

The error before this fix:

2020-04-17T13:13:20.045-0400	ERROR	running kustomize to create final manifest	{"error": "unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/'"}
github.com/go-logr/zapr.(*zapLogger).Error
	/Users/srajan/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128
sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative.(*Reconciler).reconcileExists
	/Users/srajan/go/pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.0.0-20200415210853-85eb326a6add/pkg/patterns/declarative/reconciler.go:145
sigs.k8s.io/kubebuilder-declarative-pattern/pkg/patterns/declarative.(*Reconciler).Reconcile
	/Users/srajan/go/pkg/mod/sigs.k8s.io/kubebuilder-declarative-pattern@v0.0.0-20200415210853-85eb326a6add/pkg/patterns/declarative/reconciler.go:106
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/Users/srajan/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/Users/srajan/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/Users/srajan/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	/Users/srajan/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/Users/srajan/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	/Users/srajan/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:88
2020-04-17T13:13:20.251-0400	ERROR	controller-runtime.controller	Reconciler error	{"controller": "coredns-controller", "request": "kube-system/coredns-operator", "error": "error running kustomize: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/'"}

This PR fixes the error and also updates the test to reflect the case where an operator uses Kustomize

Probable related issue: #56

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Apr 21, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 21, 2020
@atoato88
Copy link
Contributor

atoato88 commented Apr 21, 2020

@rajansandeep
Thank you to create PR! 🎉

This PR changes private "Reconciler.options" with public "Reconciler.Options", I know the reason do that.
"reconcilerParams.kustomize" is also same.

But, we should minimize a range which can access to variable, I think.
It may need some refactorings in Reconciler functions.
Could you do that?

@justinsb
WDYT?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 27, 2020
@rajansandeep
Copy link
Contributor Author

/cc @johnsonj

@k8s-ci-robot k8s-ci-robot requested a review from johnsonj May 5, 2020 18:53
@johnsonj
Copy link
Contributor

johnsonj commented May 5, 2020

Thank you @rajansandeep !

I think @atoato88 's feedback was addressed by the getter. I think this is a good approach. Please raise if that didn't solve it.

/lgtm
/approved

@johnsonj
Copy link
Contributor

johnsonj commented May 5, 2020

/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnsonj, rajansandeep

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 5, 2020
@k8s-ci-robot k8s-ci-robot merged commit b11bab3 into kubernetes-sigs:master May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants