Skip to content

Commit 1f0ab35

Browse files
chore(ES-1457): mention readinessProbes config requirement in middleware changelog (#7373)
* chore: mention readinessProbes config requirement * docs: mention readinessProbes no longer required in createServer * chore: move file path outside code fence * chore: update readiness probes links in the documentation
1 parent 152c2fd commit 1f0ab35

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

packages/middleware/CHANGELOG.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@
66

77
- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts
88

9-
Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior)
9+
Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior). From now on, the `readinessProbes` is not required and can be removed from `./apps/storefront-middleware/src/index.ts`.
10+
11+
```diff
12+
import { createServer, type CreateServerOptions } from "@vue-storefront/middleware";
13+
14+
async function runApp() {
15+
const app = await createServer(config, {
16+
cors: process.env.NODE_ENV === "production" ? undefined : developmentCorsConfig,
17+
- readinessProbes: []
18+
});
19+
}
20+
```
1021

1122
## 5.3.1
1223

@@ -103,7 +114,19 @@ If you're using that older template, please change the `Express` type to `Server
103114
- async function runMiddleware(app: Express) {
104115
```
105116
106-
- [ADDED] New GET /readyz endpoint for middleware for using with Kubernetes readiness probes. Please see https://docs.alokai.com/middleware/guides/readiness-probes for more information
117+
- [ADDED] New GET /readyz endpoint for middleware for using with Kubernetes readiness probes. Please see our [documentation](https://docs.alokai.com/guides/kubernetes-probe/readiness-probes) for more information. For the endpoint to work correctly, it is required to pass `readinessProbes` configuration (at least an empty array) to `createServer()` in `./apps/storefront-middleware/src/index.ts`:
118+
119+
```diff
120+
import { createServer, type CreateServerOptions } from "@vue-storefront/middleware";
121+
122+
async function runApp() {
123+
const app = await createServer(config, {
124+
cors: process.env.NODE_ENV === "production" ? undefined : developmentCorsConfig,
125+
+ readinessProbes: []
126+
});
127+
}
128+
129+
```
107130
108131
## 4.3.1
109132

0 commit comments

Comments
 (0)