You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "vortegatorres (via GitHub)" <gi...@apache.org> on 2023/09/26 21:12:30 UTC

[GitHub] [apisix-ingress-controller] vortegatorres opened a new issue, #1987: bug: namespace_selector does not support having multiple values for the same label

vortegatorres opened a new issue, #1987:
URL: https://github.com/apache/apisix-ingress-controller/issues/1987

   ### Current Behavior
   
   In the `namespace_selector` configuration, when there are multiple values for the same label, only the last one is taken into account. This happens because the label key serves as the unique identifier [in this map](https://github.com/apache/apisix-ingress-controller/blob/bca0d1da5e0d721ff7c94555821db55dd2659504/pkg/providers/k8s/namespace/namespace_provider.go#L70), and the most recent value will replace any previous ones.
   
   For instance, if you have the following values, only "app3" would be considered in the list of watched namespaces:
   ```
   namespace_selector:
           - "kubernetes.io/metadata.name=app1"
           - "kubernetes.io/metadata.name=app2"
           - "kubernetes.io/metadata.name=app3" 
   ```
   
   ### Expected Behavior
   
   Apply all the labels, even if the label key is the same.
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   Configure several namespace labels with the same key:
   
   ```
   namespace_selector:
           - "kubernetes.io/metadata.name=app1"
           - "kubernetes.io/metadata.name=app2"
           - "kubernetes.io/metadata.name=app3" 
   ```
   
   ### Environment
   
   APISIX install with helm chart version: 1.3.1
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1987: feature request: namespace_selector support having multiple values for the same label

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on issue #1987:
URL: https://github.com/apache/apisix-ingress-controller/issues/1987#issuecomment-1736758746

   The current version indeed does not support this feature. You are welcome to submit a PR to improve it.
   
   The earliest use case for it was to add tags like "should-apisix-watch=true" to namespaces that were waiting to be used.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] vortegatorres commented on issue #1987: feature request: namespace_selector support for having multiple values for the same label

Posted by "vortegatorres (via GitHub)" <gi...@apache.org>.
vortegatorres commented on issue #1987:
URL: https://github.com/apache/apisix-ingress-controller/issues/1987#issuecomment-1741780976

   @tao12345666333 I've gone ahead and opened a pull request to introduce support for this feature. Please take a moment to review it and share your thoughts. Your feedback is much appreciated! https://github.com/apache/apisix-ingress-controller/pull/1994


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feature request: namespace_selector support for having multiple values for the same label [apisix-ingress-controller]

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup closed issue #1987: feature request: namespace_selector support for having multiple values for the same label
URL: https://github.com/apache/apisix-ingress-controller/issues/1987


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org