Skip to content

Commit c5ba19f

Browse files
Update docs for metadata propagation
Signed-off-by: killianmuldoon <[email protected]>
1 parent 1ec0cd6 commit c5ba19f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

docs/book/src/developer/architecture/controllers/metadata-propagation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Metadata propagation
22
Cluster API controllers implement consistent metadata (labels & annotations) propagation across the core API resources.
3-
This behaviour tries to be consistent with kubernetes apps/v1 Deployment and ReplicaSet.
3+
This behaviour tries to be consistent with Kubernetes apps/v1 Deployment and ReplicaSet.
44
New providers should behave accordingly fitting within the following pattern:
55

66
## KubeadmControlPlane
@@ -30,4 +30,4 @@ Top-level labels and annotations do not propagate at all.
3030

3131
Template labels and annotations propagate to Machines, InfraMachines and BootstrapConfigs.
3232
- `.spec.template.metadata.labels` => `Machine.labels`, `InfraMachine.labels`, `BootstrapConfig.labels`
33-
- `.spec.template.metadata.annotations` => `Machine.annotations`, `InfraMachine.annotations`, `BootstrapConfig.labels`
33+
- `.spec.template.metadata.annotations` => `Machine.annotations`, `InfraMachine.annotations`, `BootstrapConfig.annotations`

docs/book/src/developer/providers/bootstrap.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ type PhippyBootstrapConfigTemplate struct {
5151
}
5252

5353
type PhippyBootstrapConfigTemplateResource struct {
54-
// Standard object's metadata.
55-
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
56-
// +optional
57-
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
5854
Spec PhippyBootstrapConfigSpec `json:"spec"`
5955
}
6056
```

docs/book/src/developer/providers/v0.4-to-v1.0.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ The `serving-cert` certificates now have organization set to `k8s-sig-cluster-li
5757
[machine][machine-contract] provider contract docs for more information. This is not required, but is recommended for
5858
consistency across the infrastructure providers as Cluster API graduates and opens up use cases where coordinating
5959
controllers can use labels and annotations from template infrastructure resources to do external provisioning or
60-
provide configuration information, e.g. [IPAM support for vSphere / bare-metal][capv-ipam].
60+
provide configuration information, e.g. [IPAM support for vSphere / bare-metal][capv-ipam].
61+
- 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.
6162

6263
## ⚠ LeaderElectionResourceLock change ⚠
6364

@@ -70,4 +71,5 @@ Otherwise, your controller might end up with multiple running instances that eac
7071

7172
[cluster-contract]: ./cluster-infrastructure.md
7273
[machine-contract]: ./machine-infrastructure.md
74+
[metadata-propagation]: ../../developer/architecture/controllers/metadata-propagation.md
7375
[capv-ipam]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/1210

0 commit comments

Comments
 (0)