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

kustomize integration #56

Closed
annp1987 opened this issue Oct 16, 2019 · 19 comments
Closed

kustomize integration #56

annp1987 opened this issue Oct 16, 2019 · 19 comments
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@annp1987
Copy link
Contributor

Hi Everyone,

Currently, we can adding labels, changing namespace of manifest before apply them. But I'm not sure there is possible to manipulate manifest from kustomize build then apply it? Do you have any advice?

@johnsonj johnsonj changed the title Is there possible to manipulate manifest with kustomize before applying it? kustomize integration Dec 2, 2019
@johnsonj
Copy link
Contributor

johnsonj commented Dec 2, 2019

@annp1987 - Should we assign this bug to you?

@annp1987
Copy link
Contributor Author

annp1987 commented Dec 3, 2019

@johnsonj ,
Please assign this bug to me. Its my pleasure. :-)

@annp1987
Copy link
Contributor Author

annp1987 commented Dec 3, 2019

/cc annp1987

@johnsonj
Copy link
Contributor

johnsonj commented Dec 3, 2019

Thanks @annp1987 ! Let me know if you have any questions/want an early review

@annp1987
Copy link
Contributor Author

annp1987 commented Dec 4, 2019

Thanks @johnsonj. Could you have a early review for kustomize integration at https://github.com/annp1987/kubebuilder-declarative-pattern/tree/intergrate_with_krusty?

@johnsonj
Copy link
Contributor

Hey @annp1987 - sorry for the delay. Your change looks right on track. I don't have any major structural comments. I'm excited to see this one land!

This likely goes without saying, but you will need to keep track of the original filesystem paths and use them when you write to the in memory filesystem (fSys.WriteFile)

@annp1987
Copy link
Contributor Author

Thanks @johnsonj. I've just create a PR. Could you take a look at it?

@johnsonj
Copy link
Contributor

#66 added the initial support for this feature. We still need tests, documentation, and potentially more feature work for this to be closed out.

@johnsonj
Copy link
Contributor

There's additional open issues highlighted in @atoato88's comment

@rajansandeep
Copy link
Contributor

Adding further to @atoato88's comment, if an operator has Kustomize enabled (for example CoreDNS-operator to include the configMapGenerator), we can just parse the final yaml built by the kustomization.yaml, instead of trying to parse all the files present in the version folder.

@johnsonj
Copy link
Contributor

johnsonj commented Mar 17, 2020

As it is today, the transformation process relies on being able to parse everything as a Kubernetes object. For example, we have a private registry transform that will go patch all of the image registries. That's something we would like to keep.

We could make the file loading code more flexible:

func ParseObjects(ctx context.Context, manifest string) (*Objects, error) {

For example, we could change Objects to hold onto parsable Kubernetes types as it does today and keep the rest as plaintext/blobs.

type Objects struct {
  Items []*Object
  Blobs [][]byte
}

@somtochiama
Copy link
Member

/assign

@somtochiama
Copy link
Member

@johnsonj how do we know when to change the Objects or when to keep as blobs?

@johnsonj
Copy link
Contributor

johnsonj commented Apr 2, 2020

@somtochiama If it can be parsed into an unstructured.Unstructured then it should be an Object. Otherwise, Blob

@somtochiama
Copy link
Member

somtochiama commented Apr 4, 2020

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 3, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 2, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants