Skip to content

Commit

Permalink
Rename cluster to f8cluster (fabric8-services#1)
Browse files Browse the repository at this point in the history
* Rename cluster to f8cluster

* Format

* Rename OS templates
  • Loading branch information
alexeykazakov authored Aug 17, 2018
1 parent 354fac2 commit fa5ad21
Show file tree
Hide file tree
Showing 19 changed files with 96 additions and 122 deletions.
6 changes: 3 additions & 3 deletions .make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ else
-t \
$(DOCKER_RUN_INTERACTIVE_SWITCH) \
--name="$(DOCKER_CONTAINER_NAME)" \
-e CLUSTER_POSTGRES_PORT=5432 \
-e F8CLUSTER_POSTGRES_PORT=5432 \
-v $(CUR_DIR):$(PACKAGE_PATH):Z \
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
-e GOPATH=$(GOPATH_IN_CONTAINER) \
Expand Down Expand Up @@ -114,8 +114,8 @@ endif
ifeq ($(strip $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' make_postgres_integration_test_1 2>/dev/null)),)
$(error Failed to find PostgreSQL container. Try running "make integration-test-env-prepare")
endif
$(eval CLUSTER_POSTGRES_HOST := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' make_postgres_integration_test_1 2>/dev/null))
docker exec -t $(DOCKER_RUN_INTERACTIVE_SWITCH) "$(DOCKER_CONTAINER_NAME)" bash -ec 'export CLUSTER_POSTGRES_HOST=$(CLUSTER_POSTGRES_HOST); make $(makecommand)'
$(eval F8CLUSTER_POSTGRES_HOST := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' make_postgres_integration_test_1 2>/dev/null))
docker exec -t $(DOCKER_RUN_INTERACTIVE_SWITCH) "$(DOCKER_CONTAINER_NAME)" bash -ec 'export F8CLUSTER_POSTGRES_HOST=$(F8CLUSTER_POSTGRES_HOST); make $(makecommand)'

# This is a wildcard target to let you call any make target from the normal makefile
# but it will run inside the docker container. This target will only get executed if
Expand Down
18 changes: 9 additions & 9 deletions .make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ GO_TEST_VERBOSITY_FLAG ?=

# By default use the "localhost" or specify manually during make invocation:
#
# CLUSTER_POSTGRES_HOST=somehost make test-integration
# F8CLUSTER_POSTGRES_HOST=somehost make test-integration
#
CLUSTER_POSTGRES_HOST ?= localhost
F8CLUSTER_POSTGRES_HOST ?= localhost

# By default reduce the amount of log output from tests
F8_LOG_LEVEL ?= error
Expand Down Expand Up @@ -147,7 +147,7 @@ test-unit-with-coverage: prebuild-check clean-coverage-unit $(COV_PATH_UNIT)
test-unit: prebuild-check $(SOURCES)
$(call log-info,"Running test: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
CLUSTER_DEVELOPER_MODE_ENABLED=1 CLUSTER_RESOURCE_UNIT_TEST=1 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)
F8CLUSTER_DEVELOPER_MODE_ENABLED=1 F8CLUSTER_RESOURCE_UNIT_TEST=1 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)

.PHONY: test-unit-junit
test-unit-junit: prebuild-check ${GO_JUNIT_BIN} ${TMP_PATH}
Expand All @@ -164,12 +164,12 @@ test-integration-with-coverage: prebuild-check clean-coverage-integration migrat
test-integration: prebuild-check migrate-database $(SOURCES)
$(call log-info,"Running test: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
CLUSTER_DEVELOPER_MODE_ENABLED=1 CLUSTER_RESOURCE_DATABASE=1 CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)
F8CLUSTER_DEVELOPER_MODE_ENABLED=1 F8CLUSTER_RESOURCE_DATABASE=1 F8CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)

test-integration-benchmark: prebuild-check migrate-database $(SOURCES)
$(call log-info,"Running benchmarks: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
CLUSTER_DEVELOPER_MODE_ENABLED=1 CLUSTER_LOG_LEVEL=error CLUSTER_RESOURCE_DATABASE=1 CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test -run=^$$ -bench=. -cpu 1,2,4 -test.benchmem $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)
F8CLUSTER_DEVELOPER_MODE_ENABLED=1 F8CLUSTER_LOG_LEVEL=error F8CLUSTER_RESOURCE_DATABASE=1 F8CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test -run=^$$ -bench=. -cpu 1,2,4 -test.benchmem $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)

.PHONY: test-remote-with-coverage
## Runs the remote tests and produces coverage files for each package.
Expand All @@ -180,13 +180,13 @@ test-remote-with-coverage: prebuild-check clean-coverage-remote $(COV_PATH_REMOT
test-remote: prebuild-check $(SOURCES)
$(call log-info,"Running test: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
CLUSTER_DEVELOPER_MODE_ENABLED=1 CLUSTER_RESOURCE_REMOTE=1 CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)
F8CLUSTER_DEVELOPER_MODE_ENABLED=1 F8CLUSTER_RESOURCE_REMOTE=1 F8CLUSTER_RESOURCE_UNIT_TEST=0 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)

.PHONY: test-migration
## Runs the migration tests and should be executed before running the integration tests
## in order to have a clean database
test-migration: prebuild-check
CLUSTER_RESOURCE_DATABASE=1 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) github.com/fabric8-services/fabric8-cluster/migration
F8CLUSTER_RESOURCE_DATABASE=1 F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) github.com/fabric8-services/fabric8-cluster/migration

# Downloads docker-compose to tmp/docker-compose if it does not already exist.
define download-docker-compose
Expand Down Expand Up @@ -422,7 +422,7 @@ $(eval ENV_VAR := $(5))
$(eval ALL_PKGS_COMMA_SEPARATED := $(6))
@mkdir -p $(COV_DIR)/$(PACKAGE_NAME);
$(eval COV_OUT_FILE := $(COV_DIR)/$(PACKAGE_NAME)/coverage.$(TEST_NAME).mode-$(COVERAGE_MODE))
@$(ENV_VAR) CLUSTER_DEVELOPER_MODE_ENABLED=1 CLUSTER_POSTGRES_HOST=$(CLUSTER_POSTGRES_HOST) F8_LOG_LEVEL=$(F8_LOG_LEVEL) \
@$(ENV_VAR) F8CLUSTER_DEVELOPER_MODE_ENABLED=1 F8CLUSTER_POSTGRES_HOST=$(F8CLUSTER_POSTGRES_HOST) F8_LOG_LEVEL=$(F8_LOG_LEVEL) \
go test $(PACKAGE_NAME) \
$(GO_TEST_VERBOSITY_FLAG) \
-coverprofile $(COV_OUT_FILE) \
Expand Down Expand Up @@ -482,7 +482,7 @@ $(COV_PATH_INTEGRATION): $(SOURCES) $(GOCOVMERGE_BIN)
@-rm -f $(ERRORS_FILE)
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
$(eval ALL_PKGS_COMMA_SEPARATED:=$(shell echo $(TEST_PACKAGES) | tr ' ' ,))
$(foreach package, $(TEST_PACKAGES), $(call test-package,$(TEST_NAME),$(package),$(COV_PATH_INTEGRATION),$(ERRORS_FILE),CLUSTER_RESOURCE_DATABASE=1 CLUSTER_RESOURCE_UNIT_TEST=0,$(ALL_PKGS_COMMA_SEPARATED)))
$(foreach package, $(TEST_PACKAGES), $(call test-package,$(TEST_NAME),$(package),$(COV_PATH_INTEGRATION),$(ERRORS_FILE),F8CLUSTER_RESOURCE_DATABASE=1 F8CLUSTER_RESOURCE_UNIT_TEST=0,$(ALL_PKGS_COMMA_SEPARATED)))
$(call check-test-results,$(ERRORS_FILE))

# NOTE: We don't have prebuild-check as a dependency here because it would cause
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM centos:7
LABEL maintainer "Devtools <devtools@redhat.com>"
LABEL author "Konrad Kleine <kkleine@redhat.com>"
ENV LANG=en_US.utf8
ENV CLUSTER_INSTALL_PREFIX=/usr/local/cluster
ENV F8CLUSTER_INSTALL_PREFIX=/usr/local/cluster

# Create a non-root user and a group with the same name: "cluster"
ENV CLUSTER_USER_NAME=cluster
RUN useradd --no-create-home -s /bin/bash ${CLUSTER_USER_NAME}
ENV F8CLUSTER_USER_NAME=cluster
RUN useradd --no-create-home -s /bin/bash ${F8CLUSTER_USER_NAME}

COPY bin/cluster ${CLUSTER_INSTALL_PREFIX}/bin/cluster
COPY config.yaml ${CLUSTER_INSTALL_PREFIX}/etc/config.yaml
COPY bin/cluster ${F8CLUSTER_INSTALL_PREFIX}/bin/cluster
COPY config.yaml ${F8CLUSTER_INSTALL_PREFIX}/etc/config.yaml

# Install little pcp pmcd server for metrics collection
# would prefer only pmcd, and not the /bin/pm*tools etc.
Expand All @@ -23,9 +23,9 @@ EXPOSE 44321


# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${CLUSTER_USER_NAME}
USER ${F8CLUSTER_USER_NAME}

WORKDIR ${CLUSTER_INSTALL_PREFIX}
WORKDIR ${F8CLUSTER_INSTALL_PREFIX}
ENTRYPOINT [ "/cluster+pmcd.sh" ]

EXPOSE 8087
14 changes: 7 additions & 7 deletions Dockerfile.deploy.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ FROM quay.io/openshiftio/rhel-base-golang:latest
LABEL maintainer "Devtools <devtools@redhat.com>"
LABEL author "Devtools <devtools@redhat.com>"
ENV LANG=en_US.utf8
ENV CLUSTER_INSTALL_PREFIX=/usr/local/cluster
ENV F8CLUSTER_INSTALL_PREFIX=/usr/local/cluster

# Create a non-root user and a group with the same name: "cluster"
ENV CLUSTER_USER_NAME=cluster
RUN useradd --no-create-home -s /bin/bash ${CLUSTER_USER_NAME}
ENV F8CLUSTER_USER_NAME=cluster
RUN useradd --no-create-home -s /bin/bash ${F8CLUSTER_USER_NAME}

COPY bin/cluster ${CLUSTER_INSTALL_PREFIX}/bin/cluster
COPY config.yaml ${CLUSTER_INSTALL_PREFIX}/etc/config.yaml
COPY bin/cluster ${F8CLUSTER_INSTALL_PREFIX}/bin/cluster
COPY config.yaml ${F8CLUSTER_INSTALL_PREFIX}/etc/config.yaml

COPY ./cluster+pmcd.sh /cluster+pmcd.sh
EXPOSE 44321

# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${CLUSTER_USER_NAME}
USER ${F8CLUSTER_USER_NAME}

WORKDIR ${CLUSTER_INSTALL_PREFIX}
WORKDIR ${F8CLUSTER_INSTALL_PREFIX}
ENTRYPOINT [ "/cluster+pmcd.sh" ]

EXPOSE 8087
28 changes: 2 additions & 26 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ regenerate: clean-generated generate
.PHONY: dev
dev: prebuild-check deps generate $(FRESH_BIN)
docker-compose up -d db
CLUSTER_DEVELOPER_MODE_ENABLED=true $(FRESH_BIN)
F8CLUSTER_DEVELOPER_MODE_ENABLED=true $(FRESH_BIN)

include ./.make/test.mk

Expand Down
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ $ cd $GOPATH/src/github.com/fabric8-services/fabric8-cluster
$ make test-all
----

By default, test data is removed from the database after each test, unless the `CLUSTER_CLEAN_TEST_DATA` environment variable is set to `false`. This can be particularily useful to run queries on the test data after a test failure, in order to understand why the result did not match the expectations.
By default, test data is removed from the database after each test, unless the `F8CLUSTER_CLEAN_TEST_DATA` environment variable is set to `false`. This can be particularily useful to run queries on the test data after a test failure, in order to understand why the result did not match the expectations.

Also, all SQL queries can be displayed in the output if the `CLUSTER_ENABLE_DB_LOGS` environment variable is set to `true. Beware that this can be very verbose, though ;)
Also, all SQL queries can be displayed in the output if the `F8CLUSTER_ENABLE_DB_LOGS` environment variable is set to `true. Beware that this can be very verbose, though ;)

===== Coverage [[coverage]]

Expand Down Expand Up @@ -272,7 +272,7 @@ The database are kept in a docker container that gets reused between restarts. T
To clear out the database kill the database like this:

----
$ docker kill fabric8CLUSTER_db_1 && docker rm fabric8CLUSTER_db_1
$ docker kill fabric8F8CLUSTER_db_1 && docker rm fabric8F8CLUSTER_db_1
----

In case you have mulitple `fabric8*` running use `docker ps` to locate the container name.
Expand Down
2 changes: 0 additions & 2 deletions application/repository/repositories.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package repository

import ()

//Repositories stands for a particular implementation of the business logic of our application
type Repositories interface {
//Identities() account.IdentityRepository
Expand Down
8 changes: 4 additions & 4 deletions configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func NewConfigurationData(mainConfigFile string, osoClusterConfigFile string) (*
}

// Set up the main configuration
c.v.SetEnvPrefix("CLUSTER")
c.v.SetEnvPrefix("F8CLUSTER")
c.v.AutomaticEnv()
c.v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
c.v.SetTypeByDefaultValue(true)
Expand Down Expand Up @@ -326,12 +326,12 @@ func pathExists(pathToCheck string) (string, error) {

func getMainConfigFile() string {
// This was either passed as a env var or set inside main.go from --config
envConfigPath, _ := os.LookupEnv("CLUSTER_CONFIG_FILE_PATH")
envConfigPath, _ := os.LookupEnv("F8CLUSTER_CONFIG_FILE_PATH")
return envConfigPath
}

func getOSOClusterConfigFile() string {
envOSOClusterConfigFile, _ := os.LookupEnv("CLUSTER_OSO_CLUSTER_CONFIG_FILE")
envOSOClusterConfigFile, _ := os.LookupEnv("F8CLUSTER_OSO_CLUSTER_CONFIG_FILE")
return envOSOClusterConfigFile
}

Expand Down Expand Up @@ -665,7 +665,7 @@ func (c *ConfigurationData) IsLogJSON() bool {

// GetEnvironment returns the current environment application is deployed in
// like 'production', 'prod-preview', 'local', etc as the value of environment variable
// `CLUSTER_ENVIRONMENT` is set.
// `F8CLUSTER_ENVIRONMENT` is set.
func (c *ConfigurationData) GetEnvironment() string {
return c.v.GetString(varEnvironment)
}
Expand Down
14 changes: 7 additions & 7 deletions configuration/configuration_blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func resetConfiguration() {
func TestGetEnvironmentOK(t *testing.T) {
resource.Require(t, resource.UnitTest)

constAuthEnvironment := "CLUSTER_ENVIRONMENT"
constAuthSentryDSN := "CLUSTER_SENTRY_DSN"
constAuthEnvironment := "F8CLUSTER_ENVIRONMENT"
constAuthSentryDSN := "F8CLUSTER_SENTRY_DSN"
constLocalEnv := "local"

existingEnvironmentName := os.Getenv(constAuthEnvironment)
Expand Down Expand Up @@ -95,14 +95,14 @@ func TestGetEnvironmentOK(t *testing.T) {
}

func TestAuthServiceURL(t *testing.T) {
existingEnvironment := os.Getenv("CLUSTER_DEVELOPER_MODE_ENABLED")
existingEnvironment := os.Getenv("F8CLUSTER_DEVELOPER_MODE_ENABLED")
defer func() {
os.Setenv("CLUSTER_DEVELOPER_MODE_ENABLED", existingEnvironment)
os.Setenv("F8CLUSTER_DEVELOPER_MODE_ENABLED", existingEnvironment)
resetConfiguration()
}()
os.Unsetenv("CLUSTER_DEVELOPER_MODE_ENABLED")
os.Unsetenv("F8CLUSTER_DEVELOPER_MODE_ENABLED")

checkURLValidation(t, "CLUSTER_AUTH_URL", "Auth service")
checkURLValidation(t, "F8CLUSTER_AUTH_URL", "Auth service")
}

func checkURLValidation(t *testing.T, envName, serviceName string) {
Expand Down Expand Up @@ -135,7 +135,7 @@ func checkURLValidation(t *testing.T, envName, serviceName string) {

func TestGetSentryDSNOK(t *testing.T) {
resource.Require(t, resource.UnitTest)
constSentryDSN := "CLUSTER_SENTRY_DSN"
constSentryDSN := "F8CLUSTER_SENTRY_DSN"
existingDSN := os.Getenv(constSentryDSN)
defer func() {
os.Setenv(constSentryDSN, existingDSN)
Expand Down
4 changes: 2 additions & 2 deletions configuration/configuration_whitebox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func resetConfiguration() {
func TestGetLogLevelOK(t *testing.T) {
resource.Require(t, resource.UnitTest)

key := "CLUSTER_LOG_LEVEL"
key := "F8CLUSTER_LOG_LEVEL"
realEnvValue := os.Getenv(key)

os.Unsetenv(key)
Expand All @@ -60,7 +60,7 @@ func TestGetLogLevelOK(t *testing.T) {
func TestGetTransactionTimeoutOK(t *testing.T) {
resource.Require(t, resource.UnitTest)

key := "CLUSTER_POSTGRES_TRANSACTION_TIMEOUT"
key := "F8CLUSTER_POSTGRES_TRANSACTION_TIMEOUT"
realEnvValue := os.Getenv(key)

os.Unsetenv(key)
Expand Down
6 changes: 3 additions & 3 deletions controller/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ func (rest *TestStatusREST) TestShowStatusWithoutDBFails() {
}

func (rest *TestStatusREST) TestShowStatusWithDefaultConfigInProdModeFails() {
existingDevMode := os.Getenv("CLUSTER_DEVELOPER_MODE_ENABLED")
existingDevMode := os.Getenv("F8CLUSTER_DEVELOPER_MODE_ENABLED")
defer func() {
os.Setenv("CLUSTER_DEVELOPER_MODE_ENABLED", existingDevMode)
os.Setenv("F8CLUSTER_DEVELOPER_MODE_ENABLED", existingDevMode)
rest.resetConfiguration()
}()

os.Setenv("CLUSTER_DEVELOPER_MODE_ENABLED", "false")
os.Setenv("F8CLUSTER_DEVELOPER_MODE_ENABLED", "false")
rest.resetConfiguration()
svc, ctrl := rest.UnSecuredController()
_, res := test.ShowStatusServiceUnavailable(rest.T(), svc.Context, svc, ctrl)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
image: fabric8-services/fabric8-cluster:latest
command: -config /usr/local/cluster/etc/config.yaml
environment:
CLUSTER_POSTGRES_HOST: db
F8CLUSTER_POSTGRES_HOST: db
ports:
- "8087:8087"
networks:
Expand Down
4 changes: 2 additions & 2 deletions gormtestsupport/db_test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (s *DBTestSuite) SetupTest() {
// TearDownTest implements suite.TearDownTest
func (s *DBTestSuite) TearDownTest() {
// in some cases, we might need to keep the test data in the DB for inspecting/reproducing
// the SQL queries. In that case, the `CLUSTER_CLEAN_TEST_DATA` env variable should be set to `false`.
// the SQL queries. In that case, the `F8CLUSTER_CLEAN_TEST_DATA` env variable should be set to `false`.
// By default, test data will be removed from the DB after each test
if s.Configuration.IsCleanTestDataEnabled() {
s.cleanTest()
Expand All @@ -91,7 +91,7 @@ func (s *DBTestSuite) PopulateDBTestSuite(ctx context.Context) {
// TearDownSuite implements suite.TearDownAllSuite
func (s *DBTestSuite) TearDownSuite() {
// in some cases, we might need to keep the test data in the DB for inspecting/reproducing
// the SQL queries. In that case, the `CLUSTER_CLEAN_TEST_DATA` env variable should be set to `false`.
// the SQL queries. In that case, the `F8CLUSTER_CLEAN_TEST_DATA` env variable should be set to `false`.
// By default, test data will be removed from the DB after each test
if s.Configuration.IsCleanTestDataEnabled() {
s.cleanSuite()
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func main() {

// Override default -config switch with environment variable only if -config switch was
// not explicitly given via the command line.
configFile = configFileFromFlags("config", "CLUSTER_CONFIG_FILE_PATH")
osoClusterConfigFile = configFileFromFlags("osoClusterConfigFile", "CLUSTER_OSO_CLUSTER_CONFIG_FILE")
configFile = configFileFromFlags("config", "F8CLUSTER_CONFIG_FILE_PATH")
osoClusterConfigFile = configFileFromFlags("osoClusterConfigFile", "F8CLUSTER_OSO_CLUSTER_CONFIG_FILE")

config, err := configuration.NewConfigurationData(configFile, osoClusterConfigFile)
if err != nil {
Expand Down
Loading

0 comments on commit fa5ad21

Please sign in to comment.