How are kubernetes secrets labels combined in Spring Cloud Kubernetes?

7/26/2019

I'm looking to use Spring Cloud Kubernetes (1.0.2.RELEASE) to manage my Spring Boot app's configuration using ConfigMaps and Secrets.

I'm interested in specifying the Secrets available to my app using label selectors rather than explicit Secrets metadata names, and the Spring Cloud Kuberneters documentation has an example of this.

-Dspring.cloud.kubernetes.secrets.labels.broker=activemq
-Dspring.cloud.kubernetes.secrets.labels.db=postgresql

The docs don't appear to make this explicit, but am I correct in assuming that the above would result in a conjunction rather than a disjunction i.e.

broker=activemq,db=postgresql

(select everything that has broker=activemq and db=postgresql).

Also if I wanted to express the selector:

broker in (activemq,rabbitmq)

can that be expressed as:

-Dspring.cloud.kubernetes.secrets.labels.broker=activemq,rabbitmq
-- wabrit
cloud
kubernetes
kubernetes-secrets
spring

0 Answers