docs/content/en/reference/meshery-operator-crds.md
Included in Meshery Operator are a couple of Kubernetes Custom Resource Definitions (CRDs) and a ConfigMap.
The CRD is used to configure Broker instances in a cluster.
The following section shows a summary of the structure of the Custom Resource and the required fields.
apiVersion: meshery.io/v1alpha1
kind: Broker
metadata:
name:
namespace:
labels:
app:
component:
version:
annotations:
meshery/component-type:
spec:
size:
The following section outlines the fields and their descriptions
The following section defines the usage for this Custom Resource.
apiVersion: meshery.io/v1alpha1
kind: Broker
metadata:
name: meshery-broker
namespace: meshery
labels:
app: meshery
component: controller
version: v0.1.15
annotations:
meshery/component-type: management-plane
spec:
size: 1
The MeshSync CRD is used as a configuration tool the MeshSync. The CRD is used to control the replica count for MeshSync instances, Broker configuration and the resources that MeshSync watches and listens to in a cluster.
The following section shows a summary of the structure of the Custom Resource and the required fields.
apiVersion: meshery.io/v1alpha1
kind: MeshSync
metadata:
name:
namespace:
labels:
app:
component:
version:
annotations:
meshery/component-type:
spec:
size: 1
broker:
native:
name:
namespace:
watch-list:
apiVersion:
data:
blacklist:
whitelist:
The following section outlines the fields and their descriptions
apiVersion – API version being used. Must be v1alpha1 as its the only version supported at the moment.
kind – Resource type. Must be set to MeshSync, also helps in quering for custom resources in the cluster using its plural form meshsyncs
metadata - The metadata section allows us to pass data that uniquely identifies a specific custom resource. For MeshSync, the following metadata is required
name : The name of this custom resource
namespace: The namespace that this custom resource will live in, usually meshery namespace
labels: labels are used to organize kubernetes objects and can be used to filter for objects either by kubectl or the Kubernetes API
annotations: Annotations are used to provide non-indentifying attributes of a resource i.e cannot be used in filtration, but are informational attributes of an object
spec The specification section defines the desired state of our custom resource that Kubernetes can then use to take corrective measures to bring the cluster to.
[
#Name of the resource eg replicasets.v1.apps in resource.version.group format
Resource string
#Events to track, Either ADDED, MODIFIED or DELETED
Events []string
]
'[{"Resource":"namespaces.v1.","Events":["ADDED","MODIFIED","DELETED"]}]'
'["namespaces.v1.","configmaps.v1."]'
The following section defines the usage for this Custom Resource
The Custom Resource is used to configure the Broker and Events to be tracked by MeshSync
apiVersion: meshery.io/v1alpha1
kind: MeshSync
metadata:
name: meshery-MeshSync
namespace: meshery
labels:
app: meshery
component: controller
version: v0.1.15
annotations:
meshery/component-type: management-plane
spec:
size: 1
broker:
native:
name: meshery-broker
namespace: meshery
watch-list:
apiVersion: v1
data:
whitelist: '[{"Resource":"namespaces.v1.","Events":["ADDED","MODIFIED","DELETED"]}]'