Skip to content

Commit

Permalink
Remove namespace env var (#146)
Browse files Browse the repository at this point in the history
issue #141 - Remove namespace env var from service api including source code, dockerfile and deployment.
  • Loading branch information
Lucy911 authored Mar 18, 2019
1 parent eb60279 commit dbb5f9f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions deploy/katlas-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ spec:
spec:
containers:
- env:
- name: ENV_NAMESPACE
value: default
- name: SERVER_TYPE
value: http
- name: DGRAPH_HOST
Expand Down
1 change: 0 additions & 1 deletion service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ RUN chmod 755 ./katlas
EXPOSE 8011

CMD ./katlas \
-envNamespace=$ENV_NAMESPACE \
-serverType=$SERVER_TYPE \
-dgraphHost=$DGRAPH_HOST
6 changes: 2 additions & 4 deletions service/cfg/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import "flag"

type (
serverCfg struct {
ServerType string
EnvNamespace string
DgraphHost string
ServerType string
DgraphHost string
}
)

Expand All @@ -18,7 +17,6 @@ var (

func init() {

flag.StringVar(&ServerCfg.EnvNamespace, "envNamespace", "", "EnvNamespace for the cluster service is deployed in")
flag.StringVar(&ServerCfg.ServerType, "serverType", "http", "Mode the Rest Service runs in - Secure/Insecure")
flag.StringVar(&ServerCfg.DgraphHost, "dgraphHost", "127.0.0.1:9080", "Mode the Rest Service runs in - Secure/Insecure")
}
4 changes: 2 additions & 2 deletions service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"net/http"
"strings"

"io/ioutil"

log "github.com/Sirupsen/logrus"
"github.com/gorilla/mux"
"github.com/hashicorp/golang-lru"
Expand All @@ -15,7 +17,6 @@ import (
"github.com/intuit/katlas/service/resources"
"github.com/intuit/katlas/service/util"
"github.com/prometheus/client_golang/prometheus/promhttp"
"io/ioutil"
)

const cacheSize = 10
Expand Down Expand Up @@ -130,7 +131,6 @@ func main() {
log.SetLevel(log.DebugLevel)
// parse and print command line flags
flag.Parse()
log.Infof("EnvNamespace=%s", cfg.ServerCfg.EnvNamespace)
log.Infof("ServerType=%s", cfg.ServerCfg.ServerType)
log.Infof("DgraphHost=%s", cfg.ServerCfg.DgraphHost)

Expand Down

0 comments on commit dbb5f9f

Please sign in to comment.