Skip to content

Commit

Permalink
chore: update makefile for installing telepresence and fix the "make …
Browse files Browse the repository at this point in the history
…dev" doesn't work for EMQX5.0
  • Loading branch information
logo306142054 authored Jun 26, 2023
1 parent e0a9b17 commit f8d04d1
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
CRD_REF_DOCS = $(LOCALBIN)/crd-ref-docs
TELEPRESENCE_GEN ?= $(LOCALBIN)/telepresence

## Tool Versions
KUSTOMIZE_VERSION ?= v4
Expand Down Expand Up @@ -151,5 +152,12 @@ endef

.PHONY: local-webhook
local-webhook: $(CERT_PATH)
$(CERT_PATH): $(CERT_PATH)
test -s $(CERT_PATH)/tls.crt && test -s $(CERT_PATH)/tls.key || mkdir -p $(CERT_PATH) && cp config/dev/cert/* $(CERT_PATH)


.PHONY: telepresence
telepresence: $(TELEPRESENCE_GEN)
$(TELEPRESENCE_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/telepresence || curl -fL https://app.getambassador.io/download/tel2/$(shell go env GOOS)/$(shell go env GOARCH)/latest/telepresence -o $(TELEPRESENCE_GEN)
chmod +x $(TELEPRESENCE_GEN)
$(TELEPRESENCE_GEN) helm install
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ For more information on getting started, see the [getting started](docs/en_US/ge
- Golang environment
- docker (used for creating container images, etc.)
- Kubernetes cluster
- teleperence

### Install Teleperence for once
```shell
make telepresence
```

### Connect to cluster
```shell
./bin/telepresence connect
```

## Contributing
Many files (API, config, controller, hack,...) in this repository are auto-generated.
Expand Down
40 changes: 37 additions & 3 deletions config/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resources:
- ../crd
- ../rbac
- ../manager
- namespace.yaml
- ../webhook

patches:
Expand Down Expand Up @@ -112,7 +112,7 @@ patches:
- op: "add"
path: "/webhooks/3/clientConfig/url"
value: "https://host.docker.internal:9443/mutate-apps-emqx-io-v2alpha1-emqx"
value: "https://host.docker.internal:9443/mutate-apps-emqx-io-v2alpha2-emqx"
- op: "remove"
path: "/webhooks/3/clientConfig/service"
- op: "add"
Expand Down Expand Up @@ -252,7 +252,7 @@ patches:
- op: "add"
path: "/webhooks/3/clientConfig/url"
value: "https://host.docker.internal:9443/validate-apps-emqx-io-v2alpha1-emqx"
value: "https://host.docker.internal:9443/validate-apps-emqx-io-v1beta4-rebalance"
- op: "remove"
path: "/webhooks/3/clientConfig/service"
- op: "add"
Expand Down Expand Up @@ -283,3 +283,37 @@ patches:
NWgwUCtOM2wKYXluOG9mcDBFdFJaTHlRSlZQdTNWYTJWaFE0QVdaMklVZ2UvRWExNlpPUjREL3pa
MW5ZMG9wb3RiRzdTNFE2VApDV0g3eGljRVlGdmhsVFREVlFGU1JMdz0KLS0tLS1FTkQgQ0VSVElG
SUNBVEUtLS0tLQo=
- op: "add"
path: "/webhooks/4/clientConfig/url"
value: "https://host.docker.internal:9443/validate-apps-emqx-io-v2alpha2-emqx"
- op: "remove"
path: "/webhooks/4/clientConfig/service"
- op: "add"
path: "/webhooks/4/clientConfig/caBundle"
value: |
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR6VENDQXJXZ0F3SUJBZ0lVTlJCMHZNZlVz
bVJGMlJITktIZWYvalN4WXJ3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd2RqRUxNQWtHQTFVRUJoTUNR
MDR4Q3pBSkJnTlZCQWdNQWxORE1Rc3dDUVlEVlFRSERBSkRSREVMTUFrRwpBMVVFQ2d3Q1dWa3hD
ekFKQmdOVkJBc01BbGxaTVJJd0VBWURWUVFEREFreE1qY3VNQzR3TGpFeEh6QWRCZ2txCmhraUc5
dzBCQ1FFV0V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pFSEtDNExWVExHajdHQXdkTnJ6VERYNStqcjFwVENoeEZ0dFZVZGYKVHFlVjkzeDF6KysxUHAz
L2JibTRWOWhMTjZWUDBtYi81QTh4dGU4dVB0NmtEZkM0VEc2TkYxK2JSMnFRQnlnYgoydEdhakVC
SDlWaGcvZVlrRmRwOE1mY3dONm1SRWdPTHR2RXk5RldtZW16VUVqSnFqc0dzbnZYa29XSHFxSUdu
CnZsNU1GRjlaR24rSy9VMW1GUGNLNHNNS3VMeEZMcmNKeDduMk1VRlVSQmcvNmM1SWMzWStDRkxx
NWgwUCtOM2wKYXluOG9mcDBFdFJaTHlRSlZQdTNWYTJWaFE0QVdaMklVZ2UvRWExNlpPUjREL3pa
MW5ZMG9wb3RiRzdTNFE2VApDV0g3eGljRVlGdmhsVFREVlFGU1JMdz0KLS0tLS1FTkQgQ0VSVElG
SUNBVEUtLS0tLQo=
6 changes: 6 additions & 0 deletions config/dev/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system

0 comments on commit f8d04d1

Please sign in to comment.