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

aeraki support specified namespace #326

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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