Add label to namespaces
This patch set adds the ability to add a label to the following namespaces: - kube-public - kube-system - default This was previously done in kubeadm in patch [0] but appears to be removed as the script moved around. Also, this PS adds this to the minikube deployment. [0] https://review.opendev.org/#/c/540131/ Change-Id: I0f06e8ae0cd7742313b447dc2d563c7d92318fb0 Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
73fb780d9e
commit
1d903948ae
@ -74,3 +74,10 @@
|
|||||||
docker_container:
|
docker_container:
|
||||||
name: "kubeadm-{{ kubeadm_aio_action }}"
|
name: "kubeadm-{{ kubeadm_aio_action }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
- name: add labels to namespaces
|
||||||
|
command: kubectl label --overwrite namespace {{ item }} name={{ item }}
|
||||||
|
with_items:
|
||||||
|
- default
|
||||||
|
- kube-system
|
||||||
|
- kube-public
|
||||||
|
ignore_errors: True
|
||||||
|
@ -235,3 +235,8 @@ kubectl label nodes --all ceph-osd=enabled
|
|||||||
kubectl label nodes --all ceph-mds=enabled
|
kubectl label nodes --all ceph-mds=enabled
|
||||||
kubectl label nodes --all ceph-rgw=enabled
|
kubectl label nodes --all ceph-rgw=enabled
|
||||||
kubectl label nodes --all ceph-mgr=enabled
|
kubectl label nodes --all ceph-mgr=enabled
|
||||||
|
|
||||||
|
# Add labels to the core namespaces
|
||||||
|
kubectl label --overwrite namespace default name=default
|
||||||
|
kubectl label --overwrite namespace kube-system name=kube-system
|
||||||
|
kubectl label --overwrite namespace kube-public name=kube-public
|
||||||
|
Loading…
Reference in New Issue
Block a user