Skip to content

Commit e8b998e

Browse files
committed
lint
1 parent 1e02de5 commit e8b998e

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

deployment/kubernetes.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Change the name "test-api-platform" to your Google project ID (not the project n
2929
[Quickstart Google Cloud](https://cloud.google.com/sdk/docs/quickstart?hl=de)
3030
If you do not have gcloud yet, install it with these command.
3131

32-
```
32+
```console
3333
curl https://sdk.cloud.google.com | bash
3434
```
3535

@@ -38,7 +38,7 @@ curl https://sdk.cloud.google.com | bash
3838
Versioning: The 0.1.0 is the version. This value should be the same as the attribute `appVersion` in `Chart.yaml`.
3939
Infos for [Google Container pulling and pushing](https://cloud.google.com/container-registry/docs/pushing-and-pulling)
4040

41-
```
41+
```console
4242
docker build -t gcr.io/test-api-platform/php:0.1.0 -t gcr.io/test-api-platform/php:latest api --target api_platform_php
4343
docker build -t gcr.io/test-api-platform/caddy:0.1.0 -t gcr.io/test-api-platform/caddy:latest api --target api_platform_caddy
4444
docker build -t gcr.io/test-api-platform/pwa:0.1.0 -t gcr.io/test-api-platform/pwa:latest pwa --target api_platform_pwa_prod
@@ -55,7 +55,7 @@ docker push gcr.io/test-api-platform/pwa
5555

5656
Optional push the version images:
5757

58-
```
58+
```console
5959
docker push gcr.io/test-api-platform/php:0.1.0
6060
docker push gcr.io/test-api-platform/caddy:0.1.0
6161
docker push gcr.io/test-api-platform/pwa:0.1.0
@@ -70,15 +70,15 @@ The result should look similar to these images.
7070

7171
### 1. Check the Helm version
7272

73-
```
73+
```console
7474
helm version
7575
```
7676

7777
If you are using version 2.x follow this [guide to migrate Helm to v3](https://helm.sh/docs/topics/v2_v3_migration/#helm)
7878

7979
### 2. Firstly you need to update helm dependencies by running
8080

81-
```
81+
```console
8282
helm dependency update ./helm/api-platform
8383
```
8484

@@ -87,13 +87,13 @@ Actual this is [bitnami/postgresql](https://bitnami.com/stack/postgresql/helm),
8787

8888
### 3. Optional: If you made changes to the Helm chart, check if its format is correct
8989

90-
```
90+
```console
9191
helm lint ./helm/api-platform
9292
```
9393

9494
### 4. Deploy your API to the container
9595

96-
```
96+
```console
9797
helm upgrade main ./helm/api-platform --namespace=default --create-namespace --wait \
9898
--install \
9999
--set "php.image.repository=gcr.io/test-api-platform/php" \
@@ -125,7 +125,7 @@ get access on your local machine to the deploy. See image below.
125125
If you prefer to use a managed DBMS like [Heroku Postgres](https://www.heroku.com/postgres) or
126126
[Google Cloud SQL](https://cloud.google.com/sql/docs/postgres/) (recommended):
127127

128-
```
128+
```console
129129
helm upgrade api-platform ./helm/api-platform \
130130
# ...
131131
--set postgresql.enabled=false \
@@ -140,7 +140,7 @@ site hosting service](https://create-react-app.dev/docs/deployment/).
140140
You can access the php container of the pod with the following command.
141141
In this example the symfony console is called.
142142

143-
```
143+
```console
144144
CADDY_PHP_POD=$(kubectl --namespace=default get pods -l app.kubernetes.io/name=api-platform -o jsonpath="{.items[0].metadata.name}")
145145
kubectl --namespace=default exec -it $CADDY_PHP_POD -c api-platform-php -- bin/console
146146
```
@@ -171,7 +171,6 @@ You have to use the *.image.pullPolicy=Always see the last 3 parameters.
171171
```console
172172
PHP_POD=$(kubectl --namespace=bar get pods -l app=php -o jsonpath="{.items[0].metadata.name}")
173173
kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
174-
```
175174
helm upgrade api-platform ./helm/api-platform --namespace=default \
176175
--set "php.image.repository=gcr.io/test-api-platform/php" \
177176
--set php.image.tag=latest \
@@ -200,7 +199,7 @@ Start by creating a new template for the queue-worker-deployment. The `deploymen
200199

201200
Add the following lines under `containers` to overwrite the command.
202201

203-
```
202+
```yaml
204203
command:
205204
{{ range .Values.queue_worker.command }}
206205
- {{ . | quote }}
@@ -213,14 +212,14 @@ args:
213212

214213
Here is an example on how to use it from your `values.yaml`:
215214

216-
```
215+
```yaml
217216
command: ['bin/console']
218217
commandArgs: ['messenger:consume', 'async', '--memory-limit=100M']
219218
```
220219
221220
The `readinessProbe` and the `livenessProble` can not use the default `docker-healthcheck` but should test if the command is running.
222221

223-
```
222+
```yaml
224223
readinessProbe:
225224
exec:
226225
command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"]

0 commit comments

Comments
 (0)