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

Deprecate KubernetesApplication #1595

Closed
negz opened this issue Jun 3, 2020 · 8 comments
Closed

Deprecate KubernetesApplication #1595

negz opened this issue Jun 3, 2020 · 8 comments

Comments

@negz
Copy link
Member

negz commented Jun 3, 2020

What problem are you facing?

Crossplane uses a KubernetesApplication to schedule and deploy arbitrary resources to a 'remote' Kubernetes cluster - specifically to a KubernetesTarget. KubernetesApplication is so named because we originally envisioned that it would be an application model, but it has since become more of a "behind the scenes" delivery mechanism used by higher level application models - it's a little like a ReplicaSet to a Kubernetes Deployment. The Application name is misleading.

How could Crossplane help solve your problem?

Crossplane should at least rename KubernetesApplication and the underlying KubernetesApplicationResource kind, which represents an individual component of a "Kubernetes application".

I suggest we consider going one step further and removing or rethinking KubernetesApplication altogether. A KubernetesApplication is basically an array of opaque Kubernetes resources. Each of these resources is rendered to a KubernetesApplicationResource, which must be updated when the KubernetesApplication is updated. This has proven problematic and confusing to maintain due to the quirks of Kubernetes update and patch or "apply" semantics.

The only real value a KubernetesApplication adds is that it acts as a logical grouping of Kubernetes resources that should all be scheduled to a particular cluster. We might consider removing KubernetesApplication altogether and instead scheduling higher level app concepts like OAM AppConfigs, or we might take the approach I proposed in my original design (#399) and make KubernetesApplication a simple scheduling target that matches a bunch of KARs by label, but does not actually template and render those KARs.

@negz negz transferred this issue from crossplane/crossplane-runtime Jun 6, 2020
@wonderflow
Copy link
Member

I think users will glad to see KubernetesApplication being OAM ContainerizedWorkload + ClusterScope.

OAM AppConfig is the Application layer of Crossplane, we can use OAM concepts to accomplish this target. Then users don't need to learn one more concept.

Besides automatically schedule cluster(cloud provider), we can do more on ClusterScope.

@negz
Copy link
Member Author

negz commented Jun 8, 2020

I think one consideration there @wonderflow is that we might want a lower level construct to schedule. For example if we ended up with multiple kinds of workload that could be scheduled to a remote cluster, we'd probably want a single type for the scheduler to work with.

@wonderflow
Copy link
Member

Yes, in my view, the scheduler can only work with the ClusterScope type. Do you mean that? @negz

@muvaf
Copy link
Member

muvaf commented Jul 9, 2020

I believe #1617 removes the need for workload scheduling API. @negz do you want to keep this issue open to track actual deprecation & removal?

@negz
Copy link
Member Author

negz commented Jul 9, 2020

@negz do you want to keep this issue open to track actual deprecation & removal?

Yes please. We should make sure to at least add comments to the CRDs letting folks know they'll be removed in a few releases.

@negz negz changed the title Rename, remove, or rethink KubernetesApplication Deprecate KubernetesApplication Aug 21, 2020
@negz
Copy link
Member Author

negz commented Aug 21, 2020

I just realised that we've effectively aligned on deprecating KubernetesApplication, but haven't actually communicated that yet. We should add a note to the types so that https://doc.crds.dev/github.com/crossplane/crossplane/workload.crossplane.io/KubernetesApplication/v1alpha1 indicates the deprecation.

@negz negz added this to To do - Proposed in v0.13 via automation Sep 9, 2020
@negz negz moved this from To do - Proposed to To do - Accepted in v0.13 Sep 9, 2020
@turkenh
Copy link
Member

turkenh commented Sep 14, 2020

I made a quick POC of provider-kubernetes which could provide the same functionality around new concepts, i.e. usable inside a composition.
This would be useful together with provider-helm in case it does not make sense to build a helm chart just to deploy some Kubernetes resources (e.g. just want to create a namespace but nothing else).

@negz negz moved this from To do - Accepted to PR open in v0.13 Sep 21, 2020
@negz
Copy link
Member Author

negz commented Sep 21, 2020

Fixed by #1720

@negz negz closed this as completed Sep 21, 2020
v0.13 automation moved this from PR open to Done Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v0.12
  
To do - Proposed
v0.13
  
Done
Development

No branches or pull requests

4 participants