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

Add support for GKE #134

Merged
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
2 changes: 1 addition & 1 deletion docker-compose-mode-files/docker-compose-df-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ services:
image: influxdb:1.8-alpine
container_name: cb-dragonfly-influxdb
ports:
- 28083:8083
- 28086:8086
- 28088:8088
environment:
- PRE_CREATE_DB=cbmon
- INFLUXDB_DB=cbmon
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-mode-files/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
image: influxdb:1.8.4
container_name: cb-restapigw-influxdb
ports:
- "0.0.0.0:8083:8083"
- "0.0.0.0:8086:8086"
- "0.0.0.0:8088:8088"
env_file:
- './conf/env.influxdb'
volumes:
Expand Down Expand Up @@ -223,8 +223,8 @@ services:
image: influxdb:1.8-alpine
container_name: cb-dragonfly-influxdb
ports:
- 0.0.0.0:28083:8083
- 0.0.0.0:28086:8086
- 0.0.0.0:28088:8088
environment:
- PRE_CREATE_DB=cbmon
- INFLUXDB_DB=cbmon
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/charts/cb-dragonfly/files/conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
influxdb:
endpoint_url: http://cb-dragonfly-influxdb # endpoint for influxDB
internal_port: 8086
external_port: 28086
external_port: 8086
database: cbmon
user_name: cbmon
password: password
Expand Down
11 changes: 9 additions & 2 deletions src/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package cmd

import (
"fmt"
"strings"

"github.com/cloud-barista/cb-operator/src/common"
"github.com/spf13/cobra"
)

var csp string

// runCmd represents the run command
var runCmd = &cobra.Command{
Use: "run",
Expand Down Expand Up @@ -42,12 +45,15 @@ var runCmd = &cobra.Command{
//fmt.Println(cmdStr)
common.SysCall(cmdStr)
case common.ModeKubernetes:
// For Kubernetes 1.19 and above (included)
// For Kubernetes 1.19 and above
cmdStr = "sudo kubectl create ns " + common.CBK8sNamespace + " --dry-run=client -o yaml | kubectl apply -f -"
// For Kubernetes 1.18 and below (included)
// For Kubernetes 1.18 and below
//cmdStr = "sudo kubectl create ns " + common.CBK8sNamespace + " --dry-run -o yaml | kubectl apply -f -"
common.SysCall(cmdStr)
cmdStr = "sudo helm install --namespace " + common.CBK8sNamespace + " " + common.CBHelmReleaseName + " -f " + common.FileStr + " ../helm-chart --debug"
if strings.ToLower(csp) == "gcp" || strings.ToLower(csp) == "gke" {
cmdStr += " --set metricServer.enabled=false"
}
//fmt.Println(cmdStr)
common.SysCall(cmdStr)
default:
Expand All @@ -64,6 +70,7 @@ func init() {

pf := runCmd.PersistentFlags()
pf.StringVarP(&common.FileStr, "file", "f", common.NotDefined, "User-defined configuration file")
pf.StringVarP(&csp, "csp", "", common.NotDefined, "Cloud Service Provider / Kind of Managed K8s services")

/*
switch common.CBOperatorMode {
Expand Down