Skip to content

Commit

Permalink
docs: improve the k8s manifests about podAntiAffinity
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed May 31, 2023
1 parent 09b5860 commit da9cf7c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is a API testing tool.
* Validate the response body with [JSON schema](https://json-schema.org/)
* Pre and post handle with the API request
* Output reference between TestCase
* Run in server mode, and provide the gRPC endpoint
* Run in server mode, and provide the [gRPC endpoint](pkg/server/server.proto)
* [VS Code extension](https://github.com/LinuxSuRen/vscode-api-testing) support

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

or, you can install it in Kubernetes. See also the [manifests](sample/manifest.yaml).

see the following usage:

```shell
Expand Down
15 changes: 13 additions & 2 deletions sample/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,28 @@ metadata:
name: api-testing
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: api-testing
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: api-testing
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: api-testing
topologyKey: kubernetes.io/hostname
weight: 5
containers:
- image: ghcr.io/linuxsuren/api-testing
name: server
Expand All @@ -28,7 +40,6 @@ spec:
requests:
cpu: "100m"
memory: 100m
status: {}
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit da9cf7c

Please sign in to comment.