Skip to content

Commit

Permalink
chore(ES-1457): mention readinessProbes config requirement in middlew…
Browse files Browse the repository at this point in the history
…are 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
  • Loading branch information
lsliwaradioluz authored Jan 23, 2025
1 parent 152c2fd commit 1f0ab35
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions packages/middleware/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@

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

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)
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`.

```diff
import { createServer, type CreateServerOptions } from "@vue-storefront/middleware";

async function runApp() {
const app = await createServer(config, {
cors: process.env.NODE_ENV === "production" ? undefined : developmentCorsConfig,
- readinessProbes: []
});
}
```

## 5.3.1

Expand Down Expand Up @@ -103,7 +114,19 @@ If you're using that older template, please change the `Express` type to `Server
- async function runMiddleware(app: Express) {
```
- [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
- [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`:
```diff
import { createServer, type CreateServerOptions } from "@vue-storefront/middleware";

async function runApp() {
const app = await createServer(config, {
cors: process.env.NODE_ENV === "production" ? undefined : developmentCorsConfig,
+ readinessProbes: []
});
}

```
## 4.3.1
Expand Down

0 comments on commit 1f0ab35

Please sign in to comment.