Kubernetes as a Composite config source#1873
Kubernetes as a Composite config source#1873ryanjbaxter merged 21 commits intospring-cloud:3.1.xfrom
Conversation
| public EnvironmentRepository kubernetesEnvironmentRepository(CoreV1Api coreV1Api, | ||
| List<KubernetesPropertySourceSupplier> kubernetesPropertySourceSuppliers, | ||
| KubernetesNamespaceProvider kubernetesNamespaceProvider) { | ||
| List<KubernetesPropertySourceSupplier> kubernetesPropertySourceSuppliers, |
There was a problem hiding this comment.
this will fail checkstyle... before pushing a PR, you can do a mvn clean install -Dspring-boot.build-image.skip=true -DskipITs -DskipTests locally, just to see that at least it compiles OK.
|
I had an initial pass over it, but I do not know all the details of what is going on. I might look again towards the end of the week... and btw, you have no tests here :) |
31a4fc1 to
2bd0e48
Compare
Thanks! I'll add the tests. For context, please check this issue. |
dce3db4 to
066f0eb
Compare
|
It would be great to have some tests that actually test that the kubernetes environment repository works in a composite scenario. |
Hey @ryanjbaxter, |
80fcf04 to
aca106c
Compare
|
I am rethinking this a bit.... There are two ways to configure a composite environment repository The first way you would do But I don't think this would work with this PR because there is not The second way This should work fine I think |
Sure, Will check this out
spring:
profiles:
active: composite
cloud:
config:
server:
composite:
- type: kubernetes
- type: vault
defaultKey: application
- type: vault
defaultKey: infra
- type: git
kubernetes:
secrets:
enableApi: true
Do we have a specific reason to prefer the second approach over the composite model? |
Please add a test for this
I missed this in your tests but now I see it, sorry.
No but both are valid and wanted to make sure it is tested. |
|
Hey @ryanjbaxter While writing a test case for Scenario 2 of the composite configuration (comma-separated active profiles), I found that the composite environment repository sorts the repositories based on the Taking reference of similar profile types in Spring Cloud Config Server (e.g., Vault, Native, Git ), I found that there, we pass the I initially considered accepting
Let me know if you have any concerns or if you'd like to discuss alternative approaches! |
830a86c to
2199587
Compare
e7c427b to
690c236
Compare
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
…e composite setup KubernetesEnvironmentRepository as condition for KubernetesEnvironmentRepositoryFactory bean creation Signed-off-by: Arjav <[email protected]>
…e composite setup KubernetesEnvironmentRepository as condition for KubernetesEnvironmentRepositoryFactory bean creation Signed-off-by: Arjav <[email protected]>
…Repository and related tests Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
Signed-off-by: Arjav <[email protected]>
70ce5ae to
a53aae5
Compare
Enables Kubernets as a type in composite config source