Skip to content

Commit 73f8555

Browse files
authored
docs: improve the k8s manifests about podAntiAffinity (#80)
1 parent 09b5860 commit 73f8555

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This is a API testing tool.
1414
* Validate the response body with [JSON schema](https://json-schema.org/)
1515
* Pre and post handle with the API request
1616
* Output reference between TestCase
17-
* Run in server mode, and provide the gRPC endpoint
17+
* Run in server mode, and provide the [gRPC endpoint](pkg/server/server.proto)
1818
* [VS Code extension](https://github.com/LinuxSuRen/vscode-api-testing) support
1919

2020
## Get started
@@ -25,6 +25,8 @@ Install it via [hd](https://github.com/LinuxSuRen/http-downloader) or download f
2525
hd install atest
2626
```
2727

28+
or, you can install it in Kubernetes. See also the [manifests](sample/manifest.yaml).
29+
2830
see the following usage:
2931

3032
```shell

sample/manifest.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,28 @@ metadata:
88
name: api-testing
99
spec:
1010
replicas: 1
11+
strategy:
12+
rollingUpdate:
13+
maxSurge: 1
14+
maxUnavailable: 1
1115
selector:
1216
matchLabels:
1317
app: api-testing
14-
strategy: {}
1518
template:
1619
metadata:
1720
creationTimestamp: null
1821
labels:
1922
app: api-testing
2023
spec:
24+
affinity:
25+
podAntiAffinity:
26+
preferredDuringSchedulingIgnoredDuringExecution:
27+
- podAffinityTerm:
28+
labelSelector:
29+
matchLabels:
30+
app: api-testing
31+
topologyKey: kubernetes.io/hostname
32+
weight: 5
2133
containers:
2234
- image: ghcr.io/linuxsuren/api-testing
2335
name: server
@@ -28,7 +40,6 @@ spec:
2840
requests:
2941
cpu: "100m"
3042
memory: 100m
31-
status: {}
3243
---
3344
apiVersion: v1
3445
kind: Service

0 commit comments

Comments
 (0)