Skip to content
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

Support user provided annotations #103

tamalsaha opened this issue May 19, 2017 · 2 comments


None yet
2 participants
Copy link

commented May 19, 2017

As #100 notes, it will be useful for users to be able to apply annotations on HAproxy service and/or Deployment. Users can give a configmap with their custom annotations that we can use. Users can apply the following annotation to ingress: <user-provided-cfgmap-name>

  svc: |
    "a/s1": "v1",
    "b/s2": "v2",
  pods: |
    "u/up1": "v1",
    "w/p2": "v2",
kind: ConfigMap
  name: <user-provided-cfgmap-name>
  namespace: <same-as-ingress>

The json object under svc key will be applied to service running in front of HAproxy. The json object under pods key will be applied to pods (Deployment/ DaemonSet) running HAproxy. This will allow users to use full spectrum of keys in annotations.

The keys will be filtered to remove any keys, since those should be applied to ingress directly.

We should watch these configmaps so that they are dynamically updated. This can be done using a UpdateAnnotations mode.

I think the configmaps should be the vector for user annotations. Using secrets does not make sense, since annotations will be ultimately visible to users.


This comment has been minimized.

Copy link
Member Author

commented May 19, 2017

I also wonder, if we should create a new TPR type to avoid the restrictions on key in configmaps. For example, configmaps do not allow / in their keys. That is why I proposed the json style format. But if we use our own TPR, we can define the annotation maps directly without an extra json format.


This comment has been minimized.

Copy link

commented May 19, 2017

This feature was implemented in #105 via ingress annotation. and can be added in Ingress annotations. The values for those are json encoded annotation data, that will be applied into service and pods' annotations respectively.

Example: '{"foo": "bar"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.