Skip to content

Commit

Permalink
address minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvindthiru committed Dec 5, 2023
1 parent de29572 commit e0cd421
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/concepts/ClusterResourcePlacement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ Events:
## Envelope Object

`ClusterResourcePlacement` uses the fleet hub cluster as a staging environment where customer resources are expected to be created and then propagated to the member clusters that have joined fleet based on the ClusterResourcePlacement's spec.
To achieve this many native kubernetes controllers are blocked from reconciling native kubernetes resources since the plan is not apply the resources on the hub cluster but to propagate the resources to other member clusters in the fleet.
In essence, the plan is not apply/create the resources on the hub cluster to be used on the hub cluster but to propagate the resources to other member clusters in the fleet.

There are some resources which cause **unintended side effects** when created/applied on the hub cluster.
- Validating Webhook Configurations
- Validating/Mutating Webhook Configurations
- Cluster Role Bindings
- Resource Quotas
- Storage Classes
Expand All @@ -355,4 +355,4 @@ There are some resources which cause **unintended side effects** when created/ap
- Ingresses
- Network policies

So we introduced `Envelope Objects` which allows users to embed resources that may have side effects on the hub cluster within it. We only `configmaps` as an envelope object at the moment.
So we support using `ConfigMap` with a fleet reserved annotation to allow users to embed resources that may have side effects on the hub cluster within it. For more details please refer to this [document](https://github.com/Azure/fleet/tree/main/docs/howtos/envelope-object.md).
6 changes: 6 additions & 0 deletions docs/howtos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ domains:
This how-to guide explains in depth the status Fleet reports in `ClusterResourcePlacement`
API objects, which you can read about to track which clusters Fleet has picked for a
resource placement and whether a placement has been successfully completed.

* [Using Enveloped Objects to propagate resources using `ClusterResourcePlacement` API](envelope-object.md)

This how-to guide explains in depth the concept, usage and examples of enveloped objects with
`ClusterResourcePlacement`API objects, which you can leverage to propagate resources without
unintended side effects on the hub clusters.
6 changes: 3 additions & 3 deletions docs/howtos/envelope-object.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# How-to Guide: To propagate envelope objects using ClusterResourcePlacement API
# How-to Guide: To propagate resources using ClusterResourcePlacement API without unintended side effects on the hub clusters

This guide discusses how to propagate a set of resources from the hub cluster to joined member clusters within an envelope object.

Currently, we allow `configmaps` to act as an envelope object, and since `ClusterResourcePlacement` can be used to propagate a normal configmap and a confimap which acts as an envelope object we needed a way to differentiate so that the `ClusterResourcePlacement` controller knows how to handle the envelope object appropriately.
Currently, we allow `ConfigMap` to act as an envelope object by using a fleet reserved annotation.

So any configmap that is an envelope object must have this annotation on it `kubernetes-fleet.io/envelope-configmap` which would be set to **true**

Expand Down Expand Up @@ -64,7 +64,7 @@ data:

## Propagating a envelope configmap from hub cluster to member cluster:

We will now apply the example envelope object above on our hub cluster, the envelope object belongs to a namespace called app hence make sure the namespace app exists on the hub cluster. Then we use a `ClusterResourcePlacement` object to propagate the resource from hub to a member cluster named `kind-cluster-1`
We will now apply the example envelope object above on our hub cluster, the envelope object belongs to a namespace called app hence make sure the namespace app exists on the hub cluster. Then we use a `ClusterResourcePlacement` object to propagate the resource from hub to a member cluster named `kind-cluster-1`.

### CRP spec:
```
Expand Down

0 comments on commit e0cd421

Please sign in to comment.