Skip to content

Commit

Permalink
aeraki support specified namespace
Browse files Browse the repository at this point in the history
Signed-off-by: chentanjun <tanjunchen20@gmail.com>
  • Loading branch information
tanjunchen committed Apr 3, 2023
1 parent 94f9ed0 commit 1b79990
Show file tree
Hide file tree
Showing 43 changed files with 2,015 additions and 120 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/e2e-dubbo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]

env:
ISTIO_VERSION: 1.14.5
ISTIO_NAMESPACE: istio-system
SCRIPTS_DIR: test/e2e/scripts
COMMON_DIR: test/e2e/common
AERAKI_IMG_PULL_POLICY: Never
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -120,7 +121,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -149,7 +150,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-metaprotocol-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]

env:
ISTIO_VERSION: 1.14.5
ISTIO_NAMESPACE: istio-system
SCRIPTS_DIR: test/e2e/scripts
COMMON_DIR: test/e2e/common
AERAKI_IMG_PULL_POLICY: Never
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/e2e-metaprotocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]

env:
ISTIO_VERSION: 1.14.5
ISTIO_NAMESPACE: istio-system
SCRIPTS_DIR: test/e2e/scripts
COMMON_DIR: test/e2e/common
AERAKI_IMG_PULL_POLICY: Never
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -120,7 +121,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -149,7 +150,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -178,7 +179,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -207,7 +208,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -236,7 +237,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -265,7 +266,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]

env:
ISTIO_VERSION: 1.14.5
ISTIO_NAMESPACE: istio-system
SCRIPTS_DIR: test/e2e/scripts
COMMON_DIR: test/e2e/common
AERAKI_IMG_PULL_POLICY: Never
Expand Down Expand Up @@ -32,7 +33,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/e2e-thrift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]

env:
ISTIO_VERSION: 1.14.5
ISTIO_NAMESPACE: istio-system
SCRIPTS_DIR: test/e2e/scripts
COMMON_DIR: test/e2e/common
AERAKI_IMG_PULL_POLICY: Never
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
- name: Install Minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start
- name: Install Istio
run: bash ${SCRIPTS_DIR}/istio.sh -y -f ${COMMON_DIR}/istio-config.yaml
run: bash ${SCRIPTS_DIR}/istio.sh
- name: Install aeraki
run: bash ${SCRIPTS_DIR}/aeraki.sh
- name: test
Expand Down
10 changes: 5 additions & 5 deletions cmd/aeraki/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import (
"strings"
"syscall"

"github.com/aeraki-mesh/aeraki/pkg/config/constants"

"github.com/google/uuid"

"github.com/aeraki-mesh/aeraki/pkg/bootstrap"
Expand All @@ -39,7 +37,7 @@ import (

const (
defaultIstiodAddr = "istiod.istio-system:15010"
defaultRootNamespace = constants.DefaultRootNamespace
defaultRootNamespace = "istio-system"
defaultXdsAddr = ":15010"
defaultElectionID = "aeraki-controller"
defaultLogLevel = "all:info"
Expand Down Expand Up @@ -70,13 +68,15 @@ func main() {
if args.ServerID == "" {
args.ServerID = "Aeraki-" + uuid.New().String()
}
args.PodName = env.RegisterStringVar("POD_NAME", args.ServerID, "").Get()
args.RootNamespace = env.RegisterStringVar("AERAKI_NAMESPACE", args.RootNamespace, "").Get()
args.EnableEnvoyFilterNSScope = env.RegisterBoolVar("AERAKI_ENABLE_ENVOY_FILTER_NS_SCOPE",
args.EnableEnvoyFilterNSScope, "").Get()

flag.VisitAll(func(flag *flag.Flag) {
log.Infof("Aeraki parameter: %s: %v", flag.Name, flag.Value)
})

args.PodName = env.RegisterStringVar("POD_NAME", args.ServerID, "").Get()

setLogLevels(args.LogLevel)
// Create the stop channel for all of the servers.
stopChan := make(chan struct{}, 1)
Expand Down
Loading

0 comments on commit 1b79990

Please sign in to comment.