Skip to content

Commit

Permalink
update replicas docs and example
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhu committed Jun 22, 2022
1 parent e890581 commit 331e6a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/replicas-recommendation.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ Kubernetes 用户在创建应用资源时常常是基于经验值来设置副本

```bash
kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/nginx-deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/analytics-hpa.yaml
kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/analytics-replicas.yaml
kubectl get analytics
```

=== "Mirror"

```bash
kubectl apply -f https://finops.coding.net/p/gocrane/d/crane/git/raw/main/examples/analytics/nginx-deployment.yaml?download=false
kubectl apply -f https://finops.coding.net/p/gocrane/d/crane/git/raw/main/examples/analytics/analytics-hpa.yaml?download=false
kubectl apply -f https://finops.coding.net/p/gocrane/d/crane/git/raw/main/examples/analytics/analytics-replicas.yaml?download=false
kubectl get analytics
```


```yaml title="analytics-hpa.yaml"
```yaml title="analytics-replicas.yaml"
apiVersion: analysis.crane.io/v1alpha1
kind: Analytics
metadata:
Expand Down
3 changes: 3 additions & 0 deletions examples/analytics/analytics-workload-replicas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ spec:
apiVersion: apps/v1
- kind: StatefulSet
apiVersion: apps/v1
config: # defines all the configuration for this analytics
replicas.fluctuation-threshold: "0"
replicas.min-cpu-usage-threshold: "0"
2 changes: 1 addition & 1 deletion examples/analytics/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: nginx
spec:
replicas: 1
replicas: 5
selector:
matchLabels:
app: nginx
Expand Down

0 comments on commit 331e6a9

Please sign in to comment.