Skip to content

Commit

Permalink
Add official cluster shorthands to region flags
Browse files Browse the repository at this point in the history
  • Loading branch information
assafad1 committed Sep 22, 2024
1 parent b8f0604 commit 3a4ca2d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the region and api-key as environment variables (or later as flags).

```sh
$ export CORALOGIX_API_KEY="xxx-xxx-xxx"
$ export CORALOGIX_REGION = "EUROPE2"
$ export CORALOGIX_REGION = "EU2"
```

Run the operator locally
Expand All @@ -43,7 +43,7 @@ $ go run main.go
```
Or with `regin` and `api-key` flags
```sh
$ go run main.go -region EUROPE2 -api-key xxx-xxx-xxx
$ go run main.go -region EU2 -api-key xxx-xxx-xxx
```
For not running the prometheusRule controller set the `prometheus-rule-controller` flag to `false`
```sh
Expand Down
2 changes: 1 addition & 1 deletion charts/coralogix-operator/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
{{ end }}

{{- if (eq .Values.coralogixOperator.region "") }}
{{ fail "[ERROR] 'coralogixOperator.region' must be set. Please select one of APAC1,APAC2,EUROPE1,EUROPE2,USA1,USA2 regions. See https://coralogix.com/docs/coralogix-domain/ for more information." }}
{{ fail "[ERROR] 'coralogixOperator.region' must be set. Please select one of AP1,AP2,EU1,EU2,US1,US2 regions. See https://coralogix.com/docs/coralogix-domain/ for more information." }}
{{ end }}
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ spec:
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--api-key=xxx"
- "--region=EUROPE2"
- "--region=EU2"
13 changes: 6 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ var (
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
regionToGrpcUrl = map[string]string{
"APAC1": "ng-api-grpc.app.coralogix.in:443",
"APAC2": "ng-api-grpc.coralogixsg.com:443",
"EUROPE1": "ng-api-grpc.coralogix.com:443",
"EUROPE2": "ng-api-grpc.eu2.coralogix.com:443",
"USA1": "ng-api-grpc.coralogix.us:443",
"STG": "ng-api-grpc.app.staging.coralogix.net:443",
"USA2": "ng-api-grpc.cx498.coralogix.com:443",
"AP1": "ng-api-grpc.app.coralogix.in:443",
"AP2": "ng-api-grpc.coralogixsg.com:443",
"EU1": "ng-api-grpc.coralogix.com:443",
"EU2": "ng-api-grpc.eu2.coralogix.com:443",
"US1": "ng-api-grpc.coralogix.us:443",
"US2": "ng-api-grpc.cx498.coralogix.com:443",
}
validRegions = utils.GetKeys(regionToGrpcUrl)
)
Expand Down

0 comments on commit 3a4ca2d

Please sign in to comment.