@@ -366,7 +366,15 @@ can use any of the following annotations:
366
366
367
367
* ** ` propagate.hnc.x-k8s.io/none ` ** : Setting ` none ` to ` true ` (case insensitive)
368
368
will result in the object not propagating to _ any_ descendant namespace. Any
369
- other value will be rejected.
369
+ other value will be rejected. The behavior would be the same as setting
370
+ [ synchronization mode] ( #modify-the-resources-propagated-by-hnc ) to
371
+ ` AllowPropagate ` with no selectors at all.
372
+
373
+ * ** ` propagate.hnc.x-k8s.io/all ` ** : Setting ` all ` to ` true ` (case insensitive)
374
+ will result in the object propagating to _ any_ descendant namespace. Any
375
+ other value will be rejected. The behavior would be the same as setting
376
+ [ synchronization mode] ( #modify-the-resources-propagated-by-hnc ) to
377
+ ` Propagate ` with no selectors at all.
370
378
371
379
For example, consider a case with a parent namespace with three child
372
380
namespaces, and the parent namespace has a secret called ` my-secret ` . To set
@@ -388,6 +396,12 @@ To set `my-secret` not to propagate to any namespace, you can use:
388
396
kubectl annotate secret my-secret -n parent propagate.hnc.x-k8s.io/none=true
389
397
```
390
398
399
+ To set ` my-secret ` to propagate to any namespace, you can use:
400
+
401
+ ``` bash
402
+ kubectl annotate secret my-secret -n parent propagate.hnc.x-k8s.io/all=true
403
+ ```
404
+
391
405
All these are equivalent to creating the object with the selector annotations:
392
406
393
407
``` bash
@@ -677,6 +691,10 @@ The most important type of configuration is the way each object type
677
691
678
692
* ** Propagate:** propagates objects from ancestors to descendants and deletes
679
693
obsolete descendants.
694
+ * ** AllowPropagate:** inclusive propagation - only propagates objects from ancestors
695
+ to descendants and deletes obsolete descendants when
696
+ [ selectors] ( #limit-the-propagation-of-an-object-to-descendant-namespaces ) are set
697
+ on the object.
680
698
* ** Remove:** deletes all existing propagated copies, but does not touch source
681
699
objects.
682
700
* ** Ignore:** stops modifying this resource. New or changed objects will not be
@@ -700,7 +718,7 @@ To configure an object resource using the kubectl plugin:
700
718
701
719
```
702
720
# "--group" can be omitted if the resource is a core K8s resource
703
- kubectl hns config set-resource [resource] --group [group ] --mode [ Propagate|Remove|Ignore]
721
+ kubectl- hns config set-resource RESOURCE [ --group GROUP] [--force ] --mode < Propagate|Remove|Ignore|AllowPropagate>
704
722
```
705
723
706
724
For example:
@@ -737,20 +755,20 @@ spec:
737
755
mode : Propagate <<<
738
756
` ` `
739
757
740
- Adding a new resource in the ` Propagate` mode is potentially dangerous, since
741
- there could be existing objects of that resource type that would be overwritten
742
- by objects of the same name from ancestor namespaces. As a result, the HNS
743
- plugin will not allow you to add a new resource directly in the `Propagate`
744
- mode. Instead, to do so safely :
758
+ Adding a new resource in the ` Propagate` mode or `AllowPropagate` mode is potentially
759
+ dangerous, since there could be existing objects of that resource type that
760
+ would be overwritten by objects of the same name from ancestor namespaces.
761
+ As a result, the HNS plugin will not allow you to add a new resource directly
762
+ in the `Propagate` mode or `AlowPropagate` . Instead, to do so safely :
745
763
746
764
* Add the new resource in the `Remove` mode. This will remove any propagated
747
765
copies (of which there should be none) but will force HNC to start
748
766
synchronizing all known source objects.
749
767
* Wait until `kubectl hns config describe` looks like it's identified the
750
768
correct number of objects of the newly added resource in its status.
751
- * Change the propagation mode from `Remove` to `Propagate`. HNC will then check
752
- to see if any objects will be overwritten, and will not allow you to change
753
- the propagation mode until all such conflicts are resolved.
769
+ * Change the propagation mode from `Remove` to `Propagate` or `AllowPropagate`.
770
+ HNC will then check to see if any objects will be overwritten, and will not
771
+ allow you to change the propagation mode until all such conflicts are resolved.
754
772
755
773
Alternatively, if you're certain you want to start propagating objects
756
774
immediately, you can use the `--force` flag with `kubectl hns config
0 commit comments