-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Labels
featurekind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
When working with operators building controller is one of the first operations, however there are also some other concerns like adding extra metadata to CRD, creating bundle and deploying to operatorhub with OLM
One of the key tools used in operator SDK is kustomize.
Tool operates on YAML files and it is language independent. Would Java SDK use kustomizehttps://kustomize.io/ at some point? This will allow quite nice reuse of the existing tools for deployment of operators and automation.
I seen also dekorate that generates YAML from pojos, but it seems to be organized around some top level use cases rather than generic config tool.
https://github.com/dekorateio/dekorate
Ideally dekorate and kustomize would work nicely together
Metadata
Metadata
Assignees
Labels
featurekind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Usage of Kustoimize[/-][+]Usage of Kustomize[/+]metacosm commentedon Jan 5, 2021
Hi, @wtrocki
Could you elaborate on the use case you have in mind? How would things work for you, ideally?
wtrocki commentedon Jan 5, 2021
@metacosm Since there is no documentation for java operator at the moment and CLI is in the progress I was curious if I can simply use exiting infrastructure from operator SDK and reuse some bits from the existing ecosystem to prove that you can get things done end to end and help java operator SDK with documentation, examples and making it usable for early adopters.
There are couple of things there: Operator-SDK, Kubebuilder (golang specific) template engine and kustoimize (generic) that can decorate CRDs.
So I was curious if I could use part of the existing infrastructure for operators and successfully deploy java operator to operatorhub as for today reusing already proven scripts/tools from Operator SDK that are not golang specific.
I created issue to get feedback if this is the way team is going to approach it in the future or there will be some java equivalent etc.
TL;DR - I really want to prove that you can use Java Operator SDK to deploy operator to production today and it can be used for some new projects. This way we can build some early community of adopters and get things tested much faster.
iocanel commentedon Jan 5, 2021
I think that
dekorate
andkustomize
can play nicely together.dekorate
is taking an app centric approach and is meant to generate the initial set of resources for the app, operator etc. It's goal is to extract as much information as possible from the code itself and align the generated manifests. Additionally it does provide a rich set of configuration options for further customization.kustomize
is mostly used for patching / customizing existing resources. So, it can be used to modify resources generated bydekorate
in cases where changes are needed after the intial generation phase, or for users that prefer an alternative customization interface than the one thatdekorate
provides.Currently, there is no direct integration available, so users that need to use
kustomize
have to manually apply it after the generation phase. But shouldn't be that hard to implement if we need to.Personally I feel that both the
pojo to crd
functionality and thekustomize
integration should be made part of thekubernetes-client
.maxandersen commentedon Jan 21, 2021
@iocanel isn't users tha tuse kustomize used to apply manual anyways ?
i'm wondering when operator-java-sdk is used in quarkus context how much the existing kustomize integration in osdkcli does that wouldn't just be handled by current quarkus/dekorate/openshift integration?
jmrodri commentedon Jul 29, 2021
@jmrodri consider this issue for https://github.com/operator-framework/java-operator-plugins/
andreaTP commentedon Jan 14, 2022
I started collecting ideas about how to make the structure in
target
more easily integrated with a kustomize workflow, so far:src/main/kubernetes
totarget/kubernetes
target/kubernetes
, such astarget/kubernetes/crds
,target/kubernetes/deployment
,target/kubernetes/rbac
etc.those will already make using kustomize much easier and with a better granularity.