diff --git a/docs/book/src/developer/architecture/controllers/metadata-propagation.md b/docs/book/src/developer/architecture/controllers/metadata-propagation.md index 09a388de287c..5bf4f8b3b615 100644 --- a/docs/book/src/developer/architecture/controllers/metadata-propagation.md +++ b/docs/book/src/developer/architecture/controllers/metadata-propagation.md @@ -1,6 +1,6 @@ # Metadata propagation Cluster API controllers implement consistent metadata (labels & annotations) propagation across the core API resources. -This behaviour tries to be consistent with kubernetes apps/v1 Deployment and ReplicaSet. +This behaviour tries to be consistent with Kubernetes apps/v1 Deployment and ReplicaSet. New providers should behave accordingly fitting within the following pattern: ## KubeadmControlPlane @@ -30,4 +30,4 @@ Top-level labels and annotations do not propagate at all. Template labels and annotations propagate to Machines, InfraMachines and BootstrapConfigs. - `.spec.template.metadata.labels` => `Machine.labels`, `InfraMachine.labels`, `BootstrapConfig.labels` -- `.spec.template.metadata.annotations` => `Machine.annotations`, `InfraMachine.annotations`, `BootstrapConfig.labels` +- `.spec.template.metadata.annotations` => `Machine.annotations`, `InfraMachine.annotations`, `BootstrapConfig.annotations` diff --git a/docs/book/src/developer/providers/bootstrap.md b/docs/book/src/developer/providers/bootstrap.md index b2bb6109d44e..4eaa87101393 100644 --- a/docs/book/src/developer/providers/bootstrap.md +++ b/docs/book/src/developer/providers/bootstrap.md @@ -51,10 +51,6 @@ type PhippyBootstrapConfigTemplate struct { } type PhippyBootstrapConfigTemplateResource struct { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` Spec PhippyBootstrapConfigSpec `json:"spec"` } ``` diff --git a/docs/book/src/developer/providers/v0.4-to-v1.0.md b/docs/book/src/developer/providers/v0.4-to-v1.0.md index 32f560fd508e..2e430d3a413e 100644 --- a/docs/book/src/developer/providers/v0.4-to-v1.0.md +++ b/docs/book/src/developer/providers/v0.4-to-v1.0.md @@ -57,7 +57,8 @@ The `serving-cert` certificates now have organization set to `k8s-sig-cluster-li [machine][machine-contract] provider contract docs for more information. This is not required, but is recommended for consistency across the infrastructure providers as Cluster API graduates and opens up use cases where coordinating controllers can use labels and annotations from template infrastructure resources to do external provisioning or - provide configuration information, e.g. [IPAM support for vSphere / bare-metal][capv-ipam]. + provide configuration information, e.g. [IPAM support for vSphere / bare-metal][capv-ipam]. +- Labels and annotations from KubeadmControlPlane, MachineDeployment and MachineSet and their `.spec.template.metadata` fields are now selectively propagated to objects controlled by their respective controllers. Refer to [metadata-propagation] for more information. ## ⚠ LeaderElectionResourceLock change ⚠ @@ -70,4 +71,5 @@ Otherwise, your controller might end up with multiple running instances that eac [cluster-contract]: ./cluster-infrastructure.md [machine-contract]: ./machine-infrastructure.md +[metadata-propagation]: ../../developer/architecture/controllers/metadata-propagation.md [capv-ipam]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/1210