kubernetes-sigs / kubebuilder-declarative-pattern

A toolkit for building declarative operators with kubebuilder
Apache License 2.0
256 stars 85 forks source link

Set dummy name for apply on direct.go #225

Closed atoato88 closed 2 years ago

atoato88 commented 2 years ago

What this PR does / why we need it:

This PR sets filename field with dummy name for appling manifest. Before this PR, operator said errors followings: ERROR applying manifest {"error": "error getting apply options: must specify one of -f and -k"}

I checked that this PR fixed current bug, but it's pretty rough, I think.

Which issue(s) this PR fixes:

Fixes #224

Special notes for your reviewer:

Currently, update is pretty rough, but root cause is discovered. Feel free to comment more good approach.

Additional documentation: NONE

atoato88 commented 2 years ago

/rename Set dummy name for apply on direct.go

atoato88 commented 2 years ago

/retitle Set dummy name for apply on direct.go

oh, command miss...

atoato88 commented 2 years ago

/assign @justinsb I created this for fixing #224 which is noted on here. Could you review this?

I think that this PR fixes issue, but it's rough approach. Could you suggest some ideas for this?

jcanseco commented 2 years ago

@atoato88 thanks for looking into this!

@justinsb Gentle ping: Can you take a look at this when you get the chance? This impacts us as well.

justinsb commented 2 years ago

Thanks for fixing @atoato88 ... this was an unfortunate change in a library that was supposed to simplify things :-( With server-side-apply, I'm not sure how much it is helping us. We also have https://github.com/kubernetes/kops/pull/13753/files in another project (kOps) which could be a better applier, and our appliers are now pluggable.

In any case, thanks for this and sorry about the delay!

/approve /lgtm

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atoato88, justinsb

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/blob/master/OWNERS)~~ [atoato88,justinsb] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
atoato88 commented 2 years ago

Thank you to mention me and suggestion for good implementation. I'll check taht 😄

jcanseco commented 2 years ago

Awesome, thank you both!