Skip to content

Commit c2fade1

Browse files
author
valtaroth
committed
Updated documentation with new label functionality
1 parent 744eb77 commit c2fade1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ $ kubectl -n kube-system apply -f https://github.com/emberstack/kubernetes-refle
7575

7676
- Add `reflector.v1.k8s.emberstack.com/reflection-allowed: "true"` to the resource annotations to permit reflection to mirrors.
7777
- Add `reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "<list>"` to the resource annotations to permit reflection from only the list of comma separated namespaces or regular expressions. Note: If this annotation is omitted or is empty, all namespaces are allowed.
78+
- Add `reflector.v1.k8s.emberstack.com/reflection-labels: "true"` to the resource annotations to permit reflection of labels to mirrors. Note: If this annotation is ommitted or empty no labels are mirrored.
79+
- Add `reflector.v1.k8s.emberstack.com/reflection-labels-included: "<list>"` to the resource annotations to permit reflection of only the list of comma separated labels or regular expressions. Note: If this annotation is ommitted or empty all labels are reflected.
7880

7981
#### Automatic mirror creation:
8082
Reflector can create mirrors with the same name in other namespaces automatically. The following annotations control if and how the mirrors are created:
@@ -110,6 +112,24 @@ $ kubectl -n kube-system apply -f https://github.com/emberstack/kubernetes-refle
110112
data:
111113
...
112114
```
115+
116+
Example source configmap with labels:
117+
```yaml
118+
apiVersion: v1
119+
kind: ConfigMap
120+
metadata:
121+
name: source-config-map
122+
labels:
123+
emberstack.com/included-label: to-be-included
124+
example.com/excluded-label: to-be-excluded
125+
annotations:
126+
reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
127+
reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "namespace-1,namespace-2,namespace-[0-9]*"
128+
reflector.v1.k8s.emberstack.com/reflection-labels: "true"
129+
reflector.v1.k8s.emberstack.com/reflection-labels-included: "emberstack\\.com/.*"
130+
data:
131+
...
132+
```
113133
114134
### 2. Annotate the mirror secret or configmap
115135

0 commit comments

Comments
 (0)