Files
kubevela/docs/en/platform-engineers/component.md
Jianbo Sun d042c0c7ec add extend component definition in KubeVela (#1297)
* update docs

* refactor docs
2021-03-25 23:26:32 +08:00

1.7 KiB

Component Definition

In the following tutorial, you will learn about define your own Component Definition to extend KubeVela.

Before continue, make sure you have learned the basic concept of Definition Objects in KubeVela.

Usually, there are general two kinds of capability resources you can find in K8s ecosystem.

  1. Compose K8s built-in resources: in this case, you can easily use them by apply YAML files. This is widely used as helm charts. For example, wordpress helm chart, mysql helm chart.
  2. CRD(Custom Resource Definition) Operator: in this case, you need to install it and create CR(Custom Resource) instance for use. This is widely used such as Promethus Operator, TiDB Operator, etc.

For both cases, they can all be extended into KubeVela as Component type.

Extend helm chart as KubeVela Component

In this case, it's very straight forward to register a helm chart as KubeVela capabilities.

KubeVela will deploy the helm chart, and with the help of KubeVela, the extended helm charts can use all the KubeVela traits.

Refer to "Use Helm To Extend a Component type" to learn details in this case.

Extend CRD Operator as KubeVela Component

In this case, you're more likely to make a CUE template to do the abstraction and encapsulation. KubeVela will render the CUE template, and deploy the rendered resources. This is the most native and powerful way in KubeVela.

Refer to "Use CUE to extend Component type" to learn details in this case.