Skip to content

Commit

Permalink
Merge branch 'main' into fix-1176-drop-deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
wind57 committed Nov 25, 2024
2 parents 3cdb76f + bf0cc39 commit 1a1c8da
Show file tree
Hide file tree
Showing 45 changed files with 3,480 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# if: github.repository_owner == 'spring-cloud'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: docs-build
fetch-depth: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: ./.github/workflows/composites/cache

- name: Show caches
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const caches = await github.rest.actions.getActionsCacheList({
Expand All @@ -63,7 +63,7 @@ jobs:

- name: check test times cache exists
id: check_files
uses: andstor/file-existence-action@v2
uses: andstor/file-existence-action@v3
with:
files: /tmp/sorted.txt

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/discovery-client.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[discoveryclient-for-kubernetes]]
= DiscoveryClient for Kubernetes

This project provides an implementation of https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java[Discovery Client]
This project provides an implementation of https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java[Discovery Client]
for https://kubernetes.io[Kubernetes].
This client lets you query Kubernetes endpoints (see https://kubernetes.io/docs/user-guide/services/[services]) by name.
A service is typically exposed by the Kubernetes API server as a collection of endpoints that represent `http` and `https` addresses and that a client can
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The same applies for `PropertySourceLocator`, where you need to add to the class

The following projects highlight the usage of these dependencies and demonstrate how you can use these libraries from any Spring Boot application:

* https://github.com/spring-cloud/spring-cloud-kubernetes/tree/master/spring-cloud-kubernetes-examples[Spring Cloud Kubernetes Examples]: the ones located inside this repository.
* https://github.com/spring-cloud/spring-cloud-kubernetes/tree/main/spring-cloud-kubernetes-examples[Spring Cloud Kubernetes Examples]: the ones located inside this repository.
* Spring Cloud Kubernetes Full Example: Minions and Boss
** https://github.com/salaboy/spring-cloud-k8s-minion[Minion]
** https://github.com/salaboy/spring-cloud-k8s-boss[Boss]
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/pod-health-indicator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
= Pod Health Indicator
:page-section-summary-toc: 1

Spring Boot uses https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java[`HealthIndicator`] to expose info about the health of an application.
Spring Boot uses https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java[`HealthIndicator`] to expose info about the health of an application.
That makes it really useful for exposing health-related information to the user and makes it a good fit for use as https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/[readiness probes].

The Kubernetes health indicator (which is part of the core module) exposes the following info:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Kubernetes provides a resource named https://kubernetes.io/docs/user-guide/configmap/[`ConfigMap`] to externalize the
parameters to pass to your application in the form of key-value pairs or embedded `application.properties` or `application.yaml` files.
The link:https://github.com/spring-cloud/spring-cloud-kubernetes/tree/master/spring-cloud-kubernetes-fabric8-config[Spring Cloud Kubernetes Config] project makes Kubernetes `ConfigMap` instances available
The link:https://github.com/spring-cloud/spring-cloud-kubernetes/tree/main/spring-cloud-kubernetes-fabric8-config[Spring Cloud Kubernetes Config] project makes Kubernetes `ConfigMap` instances available
during application startup and triggers hot reloading of beans or Spring context when changes are detected on
observed `ConfigMap` instances.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ change to a ConfigMap or Secret occurs then the HTTP implementation will use the
instances of the application which match the name of the ConfigMap or Secret and send an HTTP POST request to the application's actuator
`/refresh` endpoint. By default, it will send the post request to `/actuator/refresh` using the port registered in the discovery client.

You can also configure the configuration watcher to call the instances `shutdown` actuator endpoint. To do this you can set
`spring.cloud.kubernetes.configuration.watcher.refresh-strategy=shutdown`.

### Non-Default Management Port and Actuator Path

If the application is using a non-default actuator path and/or using a different port for the management endpoints, the Kubernetes service for the application
Expand Down Expand Up @@ -224,7 +227,13 @@ Another way you can choose to configure the actuator path and/or management port
## Messaging Implementation

The messaging implementation can be enabled by setting profile to either `bus-amqp` (RabbitMQ) or `bus-kafka` (Kafka) when the Spring Cloud Kubernetes Configuration Watcher
application is deployed to Kubernetes.
application is deployed to Kubernetes. By default, when using the messaging implementation the configuration watcher will send a `RefreshRemoteApplicationEvent` using
Spring Cloud Bus to all application instances. This will cause the application instances to refresh the application's configuration properties without
restarting the instance.

You can also configure the configuration to shut down the application instances in order to refresh the application's configuration properties.
When the application shuts down, Kubernetes will restart the application instance and the new configuration properties will be loaded. To use
this strategy set `spring.cloud.kubernetes.configuration.watcher.refresh-strategy=shutdown`.

## Configuring RabbitMQ

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/spring-cloud-kubernetes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This reference guide covers how to use Spring Cloud Kubernetes.
[[why-do-you-need-spring-cloud-kubernetes]]
== Why do you need Spring Cloud Kubernetes?

Spring Cloud Kubernetes provides implementations of well known Spring Cloud interfaces allowing developers to build and run Spring Cloud applications on Kubernetes. While this project may be useful to you when building a cloud native application, it is also not a requirement in order to deploy a Spring Boot app on Kubernetes. If you are just getting started in your journey to running your Spring Boot app on Kubernetes you can accomplish a lot with nothing more than a basic Spring Boot app and Kubernetes itself. To learn more, you can get started by reading the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#cloud-deployment-kubernetes[Spring Boot reference documentation for deploying to Kubernetes ] and also working through the workshop material https://hackmd.io/@ryanjbaxter/spring-on-k8s-workshop[Spring and Kubernetes].
Spring Cloud Kubernetes provides implementations of well known Spring Cloud interfaces allowing developers to build and run Spring Cloud applications on Kubernetes. While this project may be useful to you when building a cloud native application, it is also not a requirement in order to deploy a Spring Boot app on Kubernetes. If you are just getting started in your journey to running your Spring Boot app on Kubernetes you can accomplish a lot with nothing more than a basic Spring Boot app and Kubernetes itself. To learn more, you can get started by reading the https://docs.spring.io/spring-boot/how-to/deployment/cloud.html#howto.deployment.cloud.kubernetes[Spring Boot reference documentation for deploying to Kubernetes ] and also working through the workshop material https://hackmd.io/@ryanjbaxter/spring-on-k8s-workshop[Spring and Kubernetes].



Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/partials/_configprops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
|spring.cloud.kubernetes.config.retry | |
|spring.cloud.kubernetes.config.sources | |
|spring.cloud.kubernetes.config.use-name-as-prefix | `+++false+++` |
|spring.cloud.kubernetes.discovery.all-namespaces | `+++false+++` | if discover is enabled for all namespaces
|spring.cloud.kubernetes.discovery.all-namespaces | `+++false+++` | if discovery is enabled for all namespaces
|spring.cloud.kubernetes.discovery.cache-loading-timeout-seconds | `+++60+++` | timeout for initializing discovery cache, will abort the application if exceeded.
|spring.cloud.kubernetes.discovery.discovery-server-url | |
|spring.cloud.kubernetes.discovery.enabled | `+++true+++` | if kubernetes discovery is enabled
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"dependencies": {
"antora": "3.2.0-alpha.4",
"antora": "3.2.0-alpha.6",
"@antora/atlas-extension": "1.0.0-alpha.2",
"@antora/collector-extension": "1.0.0-beta.4",
"@antora/collector-extension": "1.0.0-beta.5",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.11.1",
"@springio/antora-extensions": "1.14.2",
"@springio/asciidoctor-extensions": "1.0.0-alpha.14"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.springframework.cloud.kubernetes.commons.config.ConfigMapConfigProperties;
import org.springframework.cloud.kubernetes.commons.config.KubernetesBootstrapConfiguration;
import org.springframework.cloud.kubernetes.commons.config.SecretsConfigProperties;
import org.springframework.cloud.util.ConditionalOnBootstrapEnabled;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand All @@ -41,6 +42,7 @@
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter(KubernetesBootstrapConfiguration.class)
@Import({ KubernetesCommonsAutoConfiguration.class, KubernetesClientAutoConfiguration.class })
@ConditionalOnBootstrapEnabled
@ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES)
public class KubernetesClientBootstrapConfiguration {

Expand Down
Loading

0 comments on commit 1a1c8da

Please sign in to comment.