Comments (9)
Glad it’s clear now!
from spring-cloud-kubernetes.
Duplicate of this one. The entire history and what to do with it is there. Please take a look. @ryanjbaxter safe to close as duplicate
from spring-cloud-kubernetes.
Is this really a duplicate? That linked bug seems to be mostly focused on earlier versions of SB/SC.
This is about SB 3.2.x / SC 2300.0.0.
And I may be missing something, but its not at all clear to me that the resolution (which seems to be "closed due to lack of feedback") to that issue sheds any light on this one.
from spring-cloud-kubernetes.
Is this really a duplicate? That linked bug seems to be mostly focused on earlier versions of SB/SC.
I assume you would get the same error using SB 3.1.x and SC 2022.0.x
Are your tests expected to pass even when not running on a K8S cluster?
from spring-cloud-kubernetes.
Yes that's right - the tests expect to pass with no dependency on k8s being present, and this is how they operated in SB 2.x. To this end, spring cloud kubernetes was disabled via a system property.
Under SB 3.2 it appears that this property no longer prevents spring cloud from attempting to locate e.g. ConfigMap property sources if it detects the presence of k8s (as is the case when running unit tests in BitBucket).
I have found an alternative approach as mentioned in the issue text above; whether this is a "bug" is moot - I'm more concerned that I understand whether this apparent change in behaviour is expected, and whether there is a better way of achieving what I need.
from spring-cloud-kubernetes.
Yes this was a breaking change in 2022.0.x
https://docs.spring.io/spring-cloud-kubernetes/docs/3.0.4/reference/html/#breaking-changes-in-3-0-x
Are you loading ConfigMap using Bootstrap or using spring.config.import
?
from spring-cloud-kubernetes.
Ah thanks!
I'm using Bootstrap (setting spring.cloud.kubernetes.config.sources
in src/main/resources/bootstrap.yml
).
Previously I was disabling Spring Cloud kubernetes for unit tests using this configuration of the maven surefire plugin:
<systemPropertyVariables>
<spring.cloud.kubernetes.enabled>false</spring.cloud.kubernetes.enabled>
</systemPropertyVariables>
That breaking change explains why this no longer works, so I guess I need to replace it with:
<systemPropertyVariables>
<spring.main.cloud-platform>NONE</spring.main.cloud-platform>
</systemPropertyVariables>
from spring-cloud-kubernetes.
Exactly :) I thought that is explained in the linked issue I posted above
from spring-cloud-kubernetes.
I've looked again in the linked issue, but it's not leaping out at me :-)
But in any case I'm happy that I now understand what changed and how to adjust to that change - thank you both for your help.
from spring-cloud-kubernetes.
Related Issues (20)
- Caused by: io.kubernetes.client.openapi.ApiException HOT 11
- No qualifying bean of type 'io.kubernetes.client.informer.SharedInformerFactory' HOT 3
- KubernetesReactiveDiscoveryClient cache configuration issues HOT 7
- Cannot connect to remote service - SERVICE_UNAVAILABLE HOT 18
- Migrate @RibbonClient for spring-cloud-starter-kubernetes-discoveryclient HOT 3
- [QUESTION] Different behaviour kubernetes-client-config / kubernetes-client-all HOT 9
- How to disable the `kubernetes` profile? HOT 3
- Allow using Watcher when ConfigMaps and Secrets are maintained by external team HOT 15
- Fabric8 LeaderProperties.getNamespace(defaultValue) no longer falls back to given default when namespace is undefined HOT 2
- Defining namespace explicitly is required after Spring Boot upgrade for leader election HOT 2
- Live update is not working with Spring Cloud Kubernetes Configuration Watcher HOT 14
- Questions about reload properties HOT 8
- gateway+kubernetes配置自动发现服务正常,但服务内部请求时携带服务id不一致
- Spring cloud config watcher with Spring boot 3.x. Pods are not getting refreshed.Please help. HOT 12
- Native compilation fails with "New Method or Constructor found as reachable after static analysis" HOT 1
- Cross-Namespace Service Discovery issue HOT 6
- pods are created per Leadership status check HOT 6
- how can use options `renewTime` and `leaseDuration` ? HOT 1
- Change the configuration to use property 'spring.config.import' for mounting configmaps and secrets HOT 6
- CPU Spike is observed in the SpringBoot App when a Kubernetes configmap property is changed. The Springboot app is using the io.fabric8.kubernetes-client for reading the k8s configmap updates. Any help/ suggestions to fix the CPU spike HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-kubernetes.