-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Kubernetes as a Composite config source #1873
Kubernetes as a Composite config source #1873
Conversation
...rg/springframework/cloud/kubernetes/configserver/KubernetesEnvironmentRepositoryFactory.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/kubernetes/configserver/KubernetesEnvironmentRepositoryFactory.java
Outdated
Show resolved
Hide resolved
public EnvironmentRepository kubernetesEnvironmentRepository(CoreV1Api coreV1Api, | ||
List<KubernetesPropertySourceSupplier> kubernetesPropertySourceSuppliers, | ||
KubernetesNamespaceProvider kubernetesNamespaceProvider) { | ||
List<KubernetesPropertySourceSupplier> kubernetesPropertySourceSuppliers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.../java/org/springframework/cloud/kubernetes/configserver/KubernetesEnvironmentRepository.java
Show resolved
Hide resolved
e7c427b
to
690c236
Compare
...rg/springframework/cloud/kubernetes/configserver/KubernetesEnvironmentRepositoryFactory.java
Outdated
Show resolved
Hide resolved
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