Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support nacos storage #796

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bd58388
feat: support nacos storage
sjcsjc123 Jan 22, 2024
625c61d
recover something
sjcsjc123 Jan 22, 2024
d848bb8
recover something
sjcsjc123 Jan 22, 2024
e8888cb
recover something
sjcsjc123 Jan 22, 2024
d01a220
simple
sjcsjc123 Jan 22, 2024
d8bb8d3
fix bug
sjcsjc123 Jan 23, 2024
5aed7f4
modify nacos image
sjcsjc123 Jan 23, 2024
0ffcc30
update nacos image in Makefile
sjcsjc123 Jan 23, 2024
c0c4e38
add nacos client
sjcsjc123 Jan 23, 2024
8eb8f5b
add ci for nacos storage
sjcsjc123 Jan 23, 2024
9bb4920
delete something
sjcsjc123 Jan 23, 2024
31ca385
fix bug with start fail
sjcsjc123 Jan 23, 2024
b5fd8a7
rename make
sjcsjc123 Jan 23, 2024
85b8274
opt import
sjcsjc123 Jan 23, 2024
370d386
update e2e
sjcsjc123 Jan 24, 2024
01c08fe
opt import
sjcsjc123 Jan 24, 2024
06651de
recover something
sjcsjc123 Jan 24, 2024
35c5db1
modify default falg value
sjcsjc123 Jan 24, 2024
9449862
make ci print simple
sjcsjc123 Jan 24, 2024
ecb2672
update apply
sjcsjc123 Jan 24, 2024
62c421a
update apply
sjcsjc123 Jan 24, 2024
2e72259
add wasm+nacos ci
sjcsjc123 Jan 24, 2024
0c83d5f
update wasm+nacos ci
sjcsjc123 Jan 24, 2024
0715626
fix ci
sjcsjc123 Jan 24, 2024
62cb1dd
fix bug with wasm plugin
sjcsjc123 Jan 24, 2024
8ce8df9
Merge branch 'main' into helm/nacos-storage
sjcsjc123 Jan 27, 2024
cd3527e
Merge branch 'main' into helm/nacos-storage
sjcsjc123 Jan 31, 2024
4b5cd88
fix ci
sjcsjc123 Feb 1, 2024
a3ecec7
Merge branch 'main' into helm/nacos-storage
sjcsjc123 Feb 1, 2024
9349772
fix ci
sjcsjc123 Feb 1, 2024
a3b114b
fix ci
sjcsjc123 Feb 1, 2024
41bd16a
Merge branch 'main' into helm/nacos-storage
johnlanni Feb 3, 2024
598aaf0
Merge branch 'main' into helm/nacos-storage
johnlanni Feb 20, 2024
a8af197
Merge branch 'main' into helm/nacos-storage
sjcsjc123 Feb 28, 2024
6cd64b4
update nacos image
sjcsjc123 Feb 29, 2024
5575512
update nacos image
sjcsjc123 Feb 29, 2024
81810c0
fix ci
sjcsjc123 Feb 29, 2024
daba6c7
fix ci
sjcsjc123 Feb 29, 2024
32a6786
fix ci
sjcsjc123 Mar 1, 2024
0a425dd
fix ci
sjcsjc123 Mar 1, 2024
0f270ce
Merge branch 'main' into helm/nacos-storage
sjcsjc123 Mar 27, 2024
b306f61
Merge branch 'main' into helm/nacos-storage
johnlanni Apr 1, 2024
688442b
Merge branch 'main' into helm/nacos-storage
johnlanni Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ install-dev-wasmplugin: build-wasmplugins pre-install
install-dev-nacos: pre-install
kubectl apply -f tools/hack/conf/nacos.yaml
tools/hack/gen-keys.sh
helm install higress helm/core -n higress-system --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'pilot.tag=$(ISTIO_LATEST_IMAGE_TAG)' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true' --set 'apiserver.enabled=true' --set 'apiserver.serverAddr="http://nacos-service.higress-system.svc.cluster.local:8848"'

create-nacos:
kubectl apply -f tools/hack/conf/nacos.yaml
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'pilot.tag=$(ISTIO_LATEST_IMAGE_TAG)' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true' --set 'apiserver.enabled=true' --set 'apiserver.serverAddr="http://nacos-service.higress-system.svc.cluster.local:8848"'

uninstall:
helm uninstall higress -n higress-system
Expand Down Expand Up @@ -265,18 +262,18 @@ delete-cluster: $(tools/kind) ## Delete kind cluster.
.PHONY: kube-load-image
kube-load-image: $(tools/kind) ## Install the Higress image to a kind cluster using the provided $IMAGE and $TAG.
tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress $(TAG)
#tools/hack/docker-pull-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
#tools/hack/docker-pull-image.sh docker.io/alihigress/nacos-standlone-rc3 1.0.0-RC3
#tools/hack/docker-pull-image.sh docker.io/hashicorp/consul 1.16.0
#tools/hack/docker-pull-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
#tools/hack/docker-pull-image.sh docker.io/bitinit/eureka latest
#tools/hack/docker-pull-image.sh docker.io/alihigress/httpbin 1.0.2
#tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
#tools/hack/kind-load-image.sh docker.io/alihigress/nacos-standlone-rc3 1.0.0-RC3
#tools/hack/kind-load-image.sh docker.io/hashicorp/consul 1.16.0
#tools/hack/kind-load-image.sh docker.io/alihigress/httpbin 1.0.2
#tools/hack/kind-load-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
#tools/hack/kind-load-image.sh docker.io/bitinit/eureka latest
tools/hack/docker-pull-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
tools/hack/docker-pull-image.sh docker.io/swsk33/nacos-standalone 2.2.3
tools/hack/docker-pull-image.sh docker.io/hashicorp/consul 1.16.0
tools/hack/docker-pull-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
tools/hack/docker-pull-image.sh docker.io/bitinit/eureka latest
tools/hack/docker-pull-image.sh docker.io/alihigress/httpbin 1.0.2
tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
tools/hack/kind-load-image.sh docker.io/swsk33/nacos-standalone 2.2.3
tools/hack/kind-load-image.sh docker.io/hashicorp/consul 1.16.0
tools/hack/kind-load-image.sh docker.io/alihigress/httpbin 1.0.2
tools/hack/kind-load-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
tools/hack/kind-load-image.sh docker.io/bitinit/eureka latest
# run-higress-e2e-test starts to run ingress e2e tests.
.PHONY: run-higress-e2e-test
run-higress-e2e-test:
Expand Down
3 changes: 1 addition & 2 deletions docker/Dockerfile.higress
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ COPY ${TARGETARCH:-amd64}/higress /usr/local/bin/higress
COPY wait-for-apiserver.sh /usr/local/bin/wait-for-apiserver.sh
COPY run-higress.sh /usr/local/bin/run-higress.sh

RUN chmod +x /usr/local/bin/wait-for-apiserver.sh
RUN chmod +x /usr/local/bin/run-higress.sh
RUN chmod +x /usr/local/bin/*.sh

USER 1337:1337

Expand Down
2 changes: 1 addition & 1 deletion helm/core/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ data:
apiVersion: v1
kind: Config
clusters:
- name: {{ .Release.Namespace }}
- name: {{ .Values.clusterName | default "higress" }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句的目的是啥,为什么不能用 Namespace 呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里指的是k8s cluster的name,在make create-cluster中会创建名为higress的k8s集群,这里用higress-system会无法访问apiserver

cluster:
server: https://{{ .Values.apiserver.addr }}:{{ .Values.apiserver.securePort }}
insecure-skip-tls-verify: true
Expand Down
2 changes: 1 addition & 1 deletion helm/core/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
protocol: TCP
{{- if .Values.apiserver.enabled }}
- port: {{ .Values.apiserver.securePort }}
name: https-apiserver # mTLS with k8s-signed cert
name: https-apiserver
protocol: TCP
targetPort: {{ .Values.apiserver.securePort }}
{{- end }}
Expand Down
1 change: 0 additions & 1 deletion helm/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ apiserver:
password: ""
namespaceID: ""
rsaKeyLength: 4096
serviceName: "higress-controller"

# Skywalking config settings
skywalking:
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/conformance/base/nacos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ metadata:
spec:
containers:
- name: nacos-standlone-rc3
image: registry.cn-hangzhou.aliyuncs.com/hinsteny/nacos-standlone-rc3:1.0.0-RC3
image: swsk33/nacos-standalone:2.2.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以考虑用官方镜像吗?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

官方镜像依赖于数据源,registry.cn-hangzhou.aliyuncs.com是否有2.x版本的nacos

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的意思是,是否可以可以用 nacos 发布的官方镜像

ports:
- containerPort: 8848
- containerPort: 9848
---
apiVersion: v1
kind: Service
Expand All @@ -47,3 +48,5 @@ spec:
ports:
- name: foo # name is not required for single-port Services
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在已经不是单端口服务了,name 还是好好取一个吧

port: 8848
- name: bar
port: 9848
Loading