Skip to content

Commit

Permalink
Merge pull request #840 from qmhu/release-0.11
Browse files Browse the repository at this point in the history
Release v0.11.0
  • Loading branch information
qmhu committed Jul 26, 2023
2 parents 1219eb3 + 7e61220 commit 7455bed
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 69 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/evanphx/json-patch v4.11.0+incompatible
github.com/go-echarts/go-echarts/v2 v2.2.4
github.com/gocrane/api v0.10.0
github.com/gocrane/api v0.11.0
github.com/google/cadvisor v0.39.2
github.com/jaypipes/ghw v0.9.0
github.com/mjibson/go-dsp v0.0.0-20180508042940-11479a337f12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.1.0-rc.5 h1:QOAag7FoBaBYYHRqzqkhhd8fq5RTubvI4v3Ft/gDVVQ=
github.com/gobwas/ws v1.1.0-rc.5/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0=
github.com/gocrane/api v0.10.0 h1:qzYFg9I2NNuvkZ7PZKCOmz4oEnRa+hvl68rEW12ZGdI=
github.com/gocrane/api v0.10.0/go.mod h1:GxI+t9AW8+NsHkz2JkPBIJN//9eLUjTZl1ScYAbXMbk=
github.com/gocrane/api v0.11.0 h1:cS7653Q/V2StBeQJzIxF2oqz/9iDktfiX6qYVSMCWMg=
github.com/gocrane/api v0.11.0/go.mod h1:GxI+t9AW8+NsHkz2JkPBIJN//9eLUjTZl1ScYAbXMbk=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ weight: 11
- Kubernetes 1.18+
- Helm 3.1.0

{{% alert color="warning" %}}
If your Kubernetes version >= 1.26, please referring to [PR](https://github.com/gocrane/crane/pull/839)
{{% /alert %}}

## Steps

### Helm Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Please referring to [Installation](/docs/getting-started/installation/installati
- Helm 3.1.0
- Kind 0.16+

{{% alert color="warning" %}}
If your Kubernetes version >= 1.26, please referring to [PR](https://github.com/gocrane/crane/pull/839)
{{% /alert %}}

## Installation

Following command will install Crane with dependencies applications(Prometheus/Grafana).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,44 +57,22 @@ kubectl apply -f workload-rules.yaml

This example will analysis Resource and Replicas for Deployments and StatefulSets in all namespace.。

2. Check the RecommendationRule recommendation progress. Observe the progress of recommendation tasks through `Status.recommendations`. Recommendation tasks are executed sequentially. If lastStartTime of all tasks is the latest time and message has value, it indicates that this recommendation is completed.
2. Check the RecommendationRule recommendation progress. Through the annotations of the Recommendation, the start time of the last run of the job and the results can be observed.

```shell
kubectl get rr workloads-rule
kubectl get recommend workloads-rule-replicas-7djlk -o yaml
```

```yaml
status:
lastUpdateTime: "2022-09-28T10:36:02Z"
recommendations:
- apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
lastStartTime: "2022-09-28T10:36:02Z"
message: Success
name: workloads-rule-replicas-rckvb
namespace: default
recommenderRef:
name: Replicas
targetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
namespace: default
uid: b15cbcd7-6fe2-4ace-9ae8-11cc0a6e69c2
- apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
lastStartTime: "2022-09-28T10:36:02Z"
message: Success
name: workloads-rule-resource-pnnxn
namespace: default
recommenderRef:
name: Resource
targetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
namespace: default
uid: 8472013a-bda2-4025-b0df-3fdc69c1c910
apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
metadata:
annotations:
analysis.crane.io/last-start-time: "2023-07-24 11:43:58"
analysis.crane.io/message: 'Failed to run recommendation flow in recommender Replicas:
Replicas CalculatePodTemplateRequests cpu failed: missing request for cpu'
analysis.crane.io/run-number: "59"
creationTimestamp: "2023-06-01T11:37:16Z"
```

3. Check `Recommendation`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Crane 安装时间在10分钟左右,具体时间也依赖集群规模以及硬
- Kubernetes 1.18+
- Helm 3.1.0

{{% alert color="warning" %}}
如果你的 Kubernetes 版本 >= 1.26, 请参考 [PR](https://github.com/gocrane/crane/pull/839)
{{% /alert %}}

## 安装流程

### 安装 Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ weight: 10
- Helm 3.1.0
- Kind 0.16+

{{% alert color="warning" %}}
如果你的 Kubernetes 版本 >= 1.26, 请参考 [PR](https://github.com/gocrane/crane/pull/839)
{{% /alert %}}

## 安装

以下命令将安装 Crane 以及其依赖 (Prometheus/Grafana).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,44 +57,22 @@ kubectl apply -f workload-rules.yaml

这个例子会对所有 namespace 中的 Deployments 和 StatefulSets 做资源推荐和副本数推荐。

2. 检查 RecommendationRule 的推荐进度。通过 Status.recommendations 观察推荐任务的进度,推荐任务是顺序执行,如果所有任务的 lastStartTime 为最近时间且 message 有值,则表示这一次推荐完成
2. 检查 RecommendationRule 的推荐进度。通过 Recommendation 的 Annotation 可观察到任务的上次开始时间和运行的结果。

```shell
kubectl get rr workloads-rule
kubectl get recommend workloads-rule-replicas-7djlk -o yaml
```

```yaml
status:
lastUpdateTime: "2022-09-28T10:36:02Z"
recommendations:
- apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
lastStartTime: "2022-09-28T10:36:02Z"
message: Success
name: workloads-rule-replicas-rckvb
namespace: default
recommenderRef:
name: Replicas
targetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
namespace: default
uid: b15cbcd7-6fe2-4ace-9ae8-11cc0a6e69c2
- apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
lastStartTime: "2022-09-28T10:36:02Z"
message: Success
name: workloads-rule-resource-pnnxn
namespace: default
recommenderRef:
name: Resource
targetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
namespace: default
uid: 8472013a-bda2-4025-b0df-3fdc69c1c910
apiVersion: analysis.crane.io/v1alpha1
kind: Recommendation
metadata:
annotations:
analysis.crane.io/last-start-time: "2023-07-24 11:43:58"
analysis.crane.io/message: 'Failed to run recommendation flow in recommender Replicas:
Replicas CalculatePodTemplateRequests cpu failed: missing request for cpu'
analysis.crane.io/run-number: "59"
creationTimestamp: "2023-06-01T11:37:16Z"
```

3. 查看优化建议 `Recommendation`
Expand Down

0 comments on commit 7455bed

Please sign in to comment.