-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for adding magnum.openstack.org/role
role to nodes.
#164
Comments
There is neither a special label nor annotation. annotations:
cluster.x-k8s.io/cluster-name: kube-carvi
cluster.x-k8s.io/cluster-namespace: magnum-system
cluster.x-k8s.io/machine: kube-carvi-9tjnd-vvtlc
cluster.x-k8s.io/owner-kind: KubeadmControlPlane
cluster.x-k8s.io/owner-name: kube-carvi-9tjnd
csi.volume.kubernetes.io/nodeid: '{"cinder.csi.openstack.org":"1d08fcd0-a2bb-4b62-b237-c5409e8ed691","manila.csi.openstack.org":"kube-carvi-control-plane-dxsqm-kvzvm","nfs.csi.k8s.io":"kube-carvi-control-plane-dxsqm-kv>
kubeadm.alpha.kubernetes.io/cri-socket: unix:///var/run/containerd/containerd.sock
node.alpha.kubernetes.io/ttl: "0"
projectcalico.org/IPv4Address: 10.0.0.127/24
projectcalico.org/IPv4IPIPTunnelAddr: 10.100.93.192
volumes.kubernetes.io/controller-managed-attach-detach: "true"
labels:
beta.kubernetes.io/arch: amd64
beta.kubernetes.io/instance-type: m1.medium
beta.kubernetes.io/os: linux
failure-domain.beta.kubernetes.io/region: RegionOne
failure-domain.beta.kubernetes.io/zone: nova
kubernetes.io/arch: amd64
kubernetes.io/hostname: kube-carvi-control-plane-dxsqm-kvzvm
kubernetes.io/os: linux
node-role.kubernetes.io/control-plane: ""
node.kubernetes.io/exclude-from-external-load-balancers: ""
node.kubernetes.io/instance-type: m1.medium
topology.cinder.csi.openstack.org/zone: nova
topology.kubernetes.io/region: RegionOne
topology.kubernetes.io/zone: nova
worker node (node group without any specific role) annotations:
cluster.x-k8s.io/cluster-name: kube-carvi
cluster.x-k8s.io/cluster-namespace: magnum-system
cluster.x-k8s.io/machine: kube-carvi-default-worker-wrjbf-5b8588cb4f-tw765
cluster.x-k8s.io/owner-kind: MachineSet
cluster.x-k8s.io/owner-name: kube-carvi-default-worker-wrjbf-5b8588cb4f
csi.volume.kubernetes.io/nodeid: '{"cinder.csi.openstack.org":"3c648120-e4c0-4fc0-b974-c4658e437b01","manila.csi.openstack.org":"kube-carvi-default-worker-infra-t2f8r-kjl88","nfs.csi.k8s.io":"kube-carvi-default-worker->
kubeadm.alpha.kubernetes.io/cri-socket: unix:///var/run/containerd/containerd.sock
node.alpha.kubernetes.io/ttl: "0"
projectcalico.org/IPv4Address: 10.0.0.182/24
projectcalico.org/IPv4IPIPTunnelAddr: 10.100.161.128
volumes.kubernetes.io/controller-managed-attach-detach: "true"
labels:
beta.kubernetes.io/arch: amd64
beta.kubernetes.io/instance-type: m1.medium
beta.kubernetes.io/os: linux
failure-domain.beta.kubernetes.io/region: RegionOne
failure-domain.beta.kubernetes.io/zone: nova
kubernetes.io/arch: amd64
kubernetes.io/hostname: kube-carvi-default-worker-infra-t2f8r-kjl88
kubernetes.io/os: linux
node.kubernetes.io/instance-type: m1.medium
topology.cinder.csi.openstack.org/zone: nova
topology.kubernetes.io/region: RegionOne
topology.kubernetes.io/zone: nova
|
$ o coe nodegroup list 4e1910e1-35d1-4d99-913d-2ee5765156b2
+--------------------------------------+----------------+-----------+--------------------------------------+------------+-----------------+--------+
| uuid | name | flavor_id | image_id | node_count | status | role |
+--------------------------------------+----------------+-----------+--------------------------------------+------------+-----------------+--------+
| 81d69894-8696-4802-9ce9-04608582680d | default-master | m1.medium | ef107f29-8f26-474e-8f5f-80d269c7d2cd | 1 | CREATE_COMPLETE | master |
| c61acc4b-41f6-4ea9-834d-e0e04914a96b | default-worker | m1.medium | ef107f29-8f26-474e-8f5f-80d269c7d2cd | 1 | UPDATE_COMPLETE | worker |
+--------------------------------------+----------------+-----------+--------------------------------------+------------+-----------------+--------+ $ kubectl get nodes -L magnum.openstack.org/role
NAME STATUS ROLES AGE VERSION ROLE
kube-carvi-control-plane-dxsqm-kvzvm Ready control-plane 21d v1.25.3
kube-carvi-default-worker-infra-t2f8r-kjl88 Ready <none> 21d v1.25.3 |
So we cannot use CAPI metadata propogation for
i.e. Another option is to request node label names change to Magnum upstream, or use different labels in mcapi project and add in the doc? |
@okozachenko1203 I think we can diverge from the Magnum role and instead use the native Kubernetes one, so I would like for us to propose the following:
This is much more clean and native way of doing it than what Magnum was doing, we can document this in our documentation as well. It will have the added useful feature of being able to see the role when doing and it's very easy :) |
More information can be found here: https://docs.openstack.org/magnum/latest/user/index.html#roles
We should figure out the best way to attach this, if it's not available out of the box it might be good to know/see what labels that Cluster API adds by default.
The text was updated successfully, but these errors were encountered: