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

modules.kubernetes / states.kubernetes support managing node labels #44819

Open
SEJeff opened this Issue Dec 4, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@SEJeff
Member

SEJeff commented Dec 4, 2017

My kubernetes clusters use kube-router + BGP to do our container networking. The node specific bgp configuration is managed via annotations. We currently manually annotate new nodes, but I'd like to manage this via salt.

This issue is to discuss the best way to add support for this to modules.kubernetes and then states.kubernetes before I take a stab at actually implementing it.

I'm considering adding to the state module functions such as:

def node_annotation_present(name, value, node):
    pass

def node_annotation_absent(name, value, node):
    pass

And to the execution module:

def node_add_annotation(name, value, node):
    ... set or update node annotations ...

def node_remove_annotation(name, node):
    ... remove an existing node annotation ...

def node_annotations(node):
    ... return a dict of all existing node annotations ...

usage would be something along the lines of:

kube-router.io/peer.asns:
  kubernetes.node_annotation_present:
    - value: "65000,65000"
    - node: kubelet1

Then the execution module would be used vaguely like:

salt-call kubernetes.node_add_annotation name=kube-router.io/peer.asns value=65000,65000 node=kubelet1
@SEJeff

This comment has been minimized.

Show comment
Hide comment
@SEJeff

SEJeff Dec 4, 2017

Member

cc: @flavio and @mcalmer to see if you have any objections. I'll be @ KubeCon this week and will probably work on this there in Austin. If you want to chat reach out to me (I'll be SEJeff on k8s slack).

Member

SEJeff commented Dec 4, 2017

cc: @flavio and @mcalmer to see if you have any objections. I'll be @ KubeCon this week and will probably work on this there in Austin. If you want to chat reach out to me (I'll be SEJeff on k8s slack).

@gtmanfred gtmanfred added this to the Blocked milestone Dec 4, 2017

@gtmanfred

This comment has been minimized.

Show comment
Hide comment
@gtmanfred

gtmanfred Dec 4, 2017

Member

@SEJeff looks like you are trying to get in touch with the correct people, let me know if you want me to update the labels on this issue

Thanks!
Daniel

Member

gtmanfred commented Dec 4, 2017

@SEJeff looks like you are trying to get in touch with the correct people, let me know if you want me to update the labels on this issue

Thanks!
Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment