MultiClusterConfigMap Custom Resource Definition
The MultiClusterConfigMap custom resource is an envelope used to distribute Kubernetes ConfigMap resources in a multicluster environment.
NOTE: Starting with Verrazzano v1.1.0, it is preferred that the MultiClusterConfigMap custom resource not be used; instead
directly use core.oam.dev/v1alpha2/Component
to define ConfigMap resources in your application.
See the example application, Multicluster ToDo List, which uses core.oam.dev/v1alpha2/Component
resources to define ConfigMaps.
Here is a sample MultiClusterConfigMap that specifies a Kubernetes ConfigMap to create on the cluster named managed1
.
apiVersion: clusters.verrazzano.io/v1alpha1
kind: MultiClusterConfigMap
metadata:
name: mymcconfigmap
namespace: multiclustertest
spec:
template:
metadata:
name: myconfigmap
namespace: myns
data:
simple.key: "simplevalue"
placement:
clusters:
- name: managed1
MultiClusterConfigMap
A MultiClusterConfigMap is an envelope to create Kubernetes ConfigMap resources on the clusters specified in the placement
section.
Field | Type | Description | Required |
---|---|---|---|
apiVersion |
string | clusters.verrazzano.io/v1alpha1 |
Yes |
kind |
string | MultiClusterConfigMap | Yes |
metadata |
ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | Yes |
spec |
MultiClusterConfigMapSpec | The desired state of a Kubernetes ConfigMap. | Yes |
status |
MultiClusterResourceStatus | The runtime status of a multicluster resource. | No |
MultiClusterConfigMapSpec
MultiClusterConfigMapSpec specifies the desired state of a Kubernetes ConfigMap.
Field | Type | Description | Required |
---|---|---|---|
template |
ConfigMapTemplate | The embedded Kubernetes ConfigMap. | Yes |
placement |
Placement | Clusters in which the ConfigMap is to be placed. | Yes |
ConfigMapTemplate
ConfigMapTemplate has the metadata and spec of the Kubernetes ConfigMap.
Field | Type | Description | Required |
---|---|---|---|
metadata |
ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | No |
immutable |
*bool | Corresponds to the immutable field of the struct ConfigMap defined in types.go. |
No |
data |
map[string]string | Corresponds to the data field of the struct ConfigMap defined in types.go. |
No |
binaryData |
map[string][]byte | Corresponds to the binaryData field of the struct ConfigMap defined in types.go. |
No |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.