Skip to content

Commit e446541

Browse files
authored
Merge branch 'main' into e2e/canary-weigth-50
2 parents 74c7ec1 + 8c41dbc commit e446541

File tree

125 files changed

+13428
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+13428
-615
lines changed

.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Feature Request
33
about: Suggest an idea for Higress
4+
title: ''
5+
labels: ''
6+
assignees: ''
47

58
---
69

@@ -13,4 +16,4 @@ A clear and concise description of what you want to happen. You can explain more
1316

1417

1518
## Other related information
16-
Add any other context or screenshots about the feature request here.
19+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask a question 💬
4+
url: https://github.com/alibaba/higress/discussions
5+
about: Ask a question or request support for using Higress.

.github/ISSUE_TEMPLATE/BUG_REPORT.md .github/ISSUE_TEMPLATE/non--crash-security--bug.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
---
2-
name: Bug Report
3-
about: If you would like to report an issue to Higress, please use this template.
4-
2+
name: Non-{crash,security} bug
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
57

68
---
79

10+
**If you are reporting *any* crash or *any* potential security issue, *do not*
11+
open an issue in this repo. Please report the issue via [ASRC](https://security.alibaba.com/)(Alibaba Security Response Center) where the issue will be triaged appropriately.**
12+
813
- [ ] I have searched the [issues](https://github.com/alibaba/higress/issues) of this repository and believe that this is not a duplicate.
914

1015
### Ⅰ. Issue Description
@@ -35,4 +40,4 @@ Just paste your stack trace here!
3540

3641
- Higress version:
3742
- OS :
38-
- Others:
43+
- Others:
File renamed without changes.
File renamed without changes.

.github/workflows/latest-release.yaml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Latest Release
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
latest-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Build hgctl latest multiarch binaries
15+
run: |
16+
GOPROXY="https://proxy.golang.org,direct" make build-hgctl-multiarch
17+
tar -zcvf hgctl_latest_linux_amd64.tar.gz out/linux_amd64/
18+
tar -zcvf hgctl_latest_linux_arm64.tar.gz out/linux_arm64/
19+
tar -zcvf hgctl_latest_darwin_amd64.tar.gz out/darwin_amd64/
20+
tar -zcvf hgctl_latest_darwin_arm64.tar.gz out/darwin_arm64/
21+
22+
# Ignore the error when we delete the latest release, it might not exist.
23+
24+
# GitHub APIs take sometime to make effect, we should make sure before Recreate the Latest Release and Tag,
25+
# tag and release all get deleted. So we sleep sometime after deleting tag and release to wait for it taking effect.
26+
27+
- name: Delete the Latest Release
28+
continue-on-error: true
29+
run: |
30+
gh release delete latest --repo $GITHUB_REPOSITORY
31+
sleep 4
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
GITHUB_REPOSITORY: ${{ github.repository_owner }}/${{ github.event.repository.name }}
35+
36+
# Ignore the error when we delete the latest tag, it might not exist.
37+
- name: Delete the Latest Tag
38+
continue-on-error: true
39+
run: |
40+
gh api --method DELETE /repos/$GITHUB_REPOSITORY/git/refs/tags/latest
41+
sleep 4
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
GITHUB_REPOSITORY: ${{ github.repository_owner }}/${{ github.event.repository.name }}
45+
46+
- name: Recreate the Latest Release and Tag
47+
uses: softprops/action-gh-release@v1
48+
with:
49+
draft: false
50+
prerelease: true
51+
tag_name: latest
52+
files: |
53+
hgctl_latest_linux_amd64.tar.gz
54+
hgctl_latest_linux_arm64.tar.gz
55+
hgctl_latest_darwin_amd64.tar.gz
56+
hgctl_latest_darwin_arm64.tar.gz
57+
body: |
58+
This is the "latest" release of **Higress**, which contains the most recent commits from the main branch.
59+
60+
This release **might not be stable**.
61+
62+
It is only intended for developers wishing to try out the latest features in Higress, some of which may not be fully implemented.
63+
64+
Try latest version of `hgctl` with:
65+
66+
``` shell
67+
curl -Ls https://raw.githubusercontent.com/alibaba/higress/main/tools/hack/get-hgctl.sh | VERSION=latest bash
68+
```

.licenserc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ header:
2626
- 'VERSION'
2727
- 'tools/'
2828
- 'test/README.md'
29+
- 'pkg/cmd/hgctl/testdata/config'
2930

3031
comment: on-failure
3132
dependency:

Makefile.core.mk

+39-15
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ export HUB ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
66

77
export CHARTS ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/charts
88

9+
VERSION_PACKAGE := github.com/alibaba/higress/pkg/cmd/version
10+
11+
GIT_COMMIT:=$(shell git rev-parse HEAD)
12+
13+
GO_LDFLAGS += -X $(VERSION_PACKAGE).higressVersion=$(shell cat VERSION) \
14+
-X $(VERSION_PACKAGE).gitCommitID=$(GIT_COMMIT)
15+
916
GO ?= go
1017

1118
export GOPROXY ?= https://proxy.golang.com.cn,direct
1219

1320
GOARCH_LOCAL := $(TARGET_ARCH)
1421
GOOS_LOCAL := $(TARGET_OS)
15-
RELEASE_LDFLAGS='-extldflags -static -s -w'
22+
RELEASE_LDFLAGS='$(GO_LDFLAGS) -extldflags -static -s -w'
1623

1724
export OUT:=$(TARGET_OUT)
1825
export OUT_LINUX:=$(TARGET_OUT_LINUX)
@@ -32,7 +39,9 @@ endif
3239

3340
HIGRESS_DOCKER_BUILD_TOP:=${OUT_LINUX}/docker_build
3441

35-
BINARIES:=./cmd/higress
42+
HIGRESS_BINARIES:=./cmd/higress
43+
44+
HGCTL_BINARIES:=./cmd/hgctl
3645

3746
$(OUT):
3847
@mkdir -p $@
@@ -52,11 +61,26 @@ go.test.coverage: prebuild
5261

5362
.PHONY: build
5463
build: prebuild $(OUT)
55-
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT)/ $(BINARIES)
64+
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT)/ $(HIGRESS_BINARIES)
5665

5766
.PHONY: build-linux
5867
build-linux: prebuild $(OUT)
59-
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(BINARIES)
68+
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(HIGRESS_BINARIES)
69+
70+
.PHONY: build-hgctl
71+
build-hgctl: $(OUT)
72+
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT)/ $(HGCTL_BINARIES)
73+
74+
.PHONY: build-linux-hgctl
75+
build-linux-hgctl: $(OUT)
76+
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(HGCTL_BINARIES)
77+
78+
.PHONY: build-hgctl-multiarch
79+
build-hgctl-multiarch: $(OUT)
80+
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_amd64/ $(HGCTL_BINARIES)
81+
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_arm64/ $(HGCTL_BINARIES)
82+
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/darwin_amd64/ $(HGCTL_BINARIES)
83+
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/darwin_arm64/ $(HGCTL_BINARIES)
6084

6185
# Create targets for OUT_LINUX/binary
6286
# There are two use cases here:
@@ -73,14 +97,14 @@ $(OUT_LINUX)/$(shell basename $(1)): $(OUT_LINUX)
7397
endif
7498
endef
7599

76-
$(foreach bin,$(BINARIES),$(eval $(call build-linux,$(bin),"")))
100+
$(foreach bin,$(HIGRESS_BINARIES),$(eval $(call build-linux,$(bin),"")))
77101

78102
# Create helper targets for each binary, like "pilot-discovery"
79103
# As an optimization, these still build everything
80-
$(foreach bin,$(BINARIES),$(shell basename $(bin))): build
104+
$(foreach bin,$(HIGRESS_BINARIES),$(shell basename $(bin))): build
81105
ifneq ($(OUT_LINUX),$(LOCAL_OUT))
82106
# if we are on linux already, then this rule is handled by build-linux above, which handles BUILD_ALL variable
83-
$(foreach bin,$(BINARIES),${LOCAL_OUT}/$(shell basename $(bin))): build
107+
$(foreach bin,$(HIGRESS_BINARIES),${LOCAL_OUT}/$(shell basename $(bin))): build
84108
endif
85109

86110
.PHONY: push
@@ -113,20 +137,20 @@ endef
113137

114138
install: pre-install
115139
cd helm/higress; helm dependency build
116-
helm install higress helm/higress -n higress-system --create-namespace --set 'global.kind=true'
140+
helm install higress helm/higress -n higress-system --create-namespace --set 'global.local=true'
117141

118-
ENVOY_LATEST_IMAGE_TAG ?= 0.7.0
119-
ISTIO_LATEST_IMAGE_TAG ?= 0.7.0
142+
ENVOY_LATEST_IMAGE_TAG ?= 1.0.0-rc
143+
ISTIO_LATEST_IMAGE_TAG ?= 1.0.0-rc
120144

121145
install-dev: pre-install
122-
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.kind=true'
146+
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true'
123147

124148
uninstall:
125149
helm uninstall higress -n higress-system
126150

127151
upgrade: pre-install
128152
cd helm/higress; helm dependency build
129-
helm upgrade higress helm/higress -n higress-system --set 'global.kind=true'
153+
helm upgrade higress helm/higress -n higress-system --set 'global.local=true'
130154

131155
helm-push:
132156
cp api/kubernetes/customresourcedefinitions.gen.yaml helm/core/crds
@@ -185,15 +209,15 @@ delete-cluster: $(tools/kind) ## Delete kind cluster.
185209

186210
# kube-load-image loads a local built docker image into kube cluster.
187211
.PHONY: kube-load-image
188-
kube-load-image: $(tools/kind) ## Install the EG image to a kind cluster using the provided $IMAGE and $TAG.
212+
kube-load-image: $(tools/kind) ## Install the Higress image to a kind cluster using the provided $IMAGE and $TAG.
189213
tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress $(TAG)
190214

191215
# run-ingress-e2e-test starts to run ingress e2e tests.
192216
.PHONY: run-ingress-e2e-test
193217
run-ingress-e2e-test:
194218
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
195219
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
196-
kubectl wait --timeout=5m -n higress-system deployment/higress-controller --for=condition=Available
220+
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
197221
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
198-
kubectl wait --timeout=5m -n higress-system deployment/higress-gateway --for=condition=Available
222+
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
199223
go test -v -tags conformance ./test/ingress/e2e_test.go --ingress-class=higress --debug=true

README.md

+39-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ Higress 是基于阿里内部两年多的 Envoy Gateway 实践沉淀,以开源
2323
![arch](https://img.alicdn.com/imgextra/i4/O1CN01OgGP1728t0xeRfRYJ_!!6000000007989-0-tps-1726-1366.jpg)
2424

2525
## Summary
26-
26+
27+
- [**功能展示**](#功能展示)
2728
- [**使用场景**](#使用场景)
2829
- [**核心优势**](#核心优势)
2930
- [**Quick Start**](https://higress.io/zh-cn/docs/user/quickstart)
3031
- [**社区**](#社区)
3132

33+
3234
## 使用场景
3335

3436
- **Kubernetes Ingress 网关**:
@@ -73,6 +75,42 @@ Higress 是基于阿里内部两年多的 Envoy Gateway 实践沉淀,以开源
7375

7476
插件支持热更新,变更插件逻辑和配置都对流量无损。
7577

78+
## 功能展示
79+
80+
- **丰富的可观测**
81+
82+
提供开箱即用的可观测,Grafana&Prometheus 可以使用内置的也可对接自建的
83+
84+
![](./docs/images/monitor.gif)
85+
86+
87+
- **插件扩展机制**
88+
89+
官方提供了多种插件,用户也可以[开发](./plugins/wasm-go)自己的插件,构建成 docker/oci 镜像后在控制台配置,可以实时变更插件逻辑,对流量完全无损。
90+
91+
![](./docs/images/plugin.gif)
92+
93+
94+
- **多种服务发现**
95+
96+
默认提供 K8s Service 服务发现,通过配置可以对接 Nacos/ZooKeeper 等注册中心实现服务发现,也可以基于静态 IP 或者 DNS 来发现
97+
98+
![](./docs/images/service-source.gif)
99+
100+
101+
- **域名和证书**
102+
103+
可以创建管理 TLS 证书,并配置域名的 HTTP/HTTPS 行为,域名策略里支持对特定域名生效插件
104+
105+
![](./docs/images/domain.gif)
106+
107+
108+
- **丰富的路由能力**
109+
110+
通过上面定义的服务发现机制,发现的服务会出现在服务列表中;创建路由时,选择域名,定义路由匹配机制,再选择目标服务进行路由;路由策略里支持对特定路由生效插件
111+
112+
![](./docs/images/route-service.gif)
113+
76114

77115
## 社区
78116

SECURITY.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.x.x | :white_check_mark: |
8+
| < 1.0.0 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
Please report any security issue or Higress crash report to [ASRC](https://security.alibaba.com/)(Alibaba Security Response Center) where the issue will be triaged appropriately.
13+
14+
Thank you in advance for helping to keep Higress secure.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.7.0
1+
v1.0.0-rc

cmd/hgctl/main.go

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright (c) 2022 Alibaba Group Holding Ltd.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package main
16+
17+
import (
18+
"fmt"
19+
"os"
20+
21+
"github.com/alibaba/higress/pkg/cmd/hgctl"
22+
)
23+
24+
func main() {
25+
if err := hgctl.GetRootCommand().Execute(); err != nil {
26+
_, _ = fmt.Fprintln(os.Stderr, err)
27+
os.Exit(1)
28+
}
29+
}

0 commit comments

Comments
 (0)