Skip to content

Commit b93cc16

Browse files
author
Matthew Fisher
committed
Merge pull request #255 from bacongobbler/rename-workflow-to-controller
fix(pkg): rename workflow to controller
2 parents 7e45e25 + 2846090 commit b93cc16

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Once this is done, SSH into a Kubernetes minion, and run the following:
5252
```
5353
$ curl -sSL http://deis.io/deis-cli/install.sh | sh
5454
$ sudo mv deis /bin
55-
$ kubectl get service deis-workflow
55+
$ kubectl get service deis-controller
5656
$ deis register 10.247.59.157 # or the appropriate CLUSTER_IP
5757
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
5858
$ eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa

pkg/conf/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func EnvConfig(appName string, conf interface{}) error {
1818
return nil
1919
}
2020

21-
// GetBuilderKey returns the key to be used as token to interact with deis-workflow
21+
// GetBuilderKey returns the key to be used as token to interact with deis-controller
2222
func GetBuilderKey() (string, error) {
2323
builderKeyBytes, err := ioutil.ReadFile(builderKeyLocation)
2424
if err != nil {

pkg/controller/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import (
1414
)
1515

1616
const (
17-
hostEnvName = "DEIS_WORKFLOW_SERVICE_HOST"
18-
portEnvName = "DEIS_WORKFLOW_SERVICE_PORT"
17+
hostEnvName = "DEIS_CONTROLLER_SERVICE_HOST"
18+
portEnvName = "DEIS_CONTROLLER_SERVICE_PORT"
1919
)
2020

21-
// UserInfo represent the required information from a user to make a push and interact with deis/workflow
21+
// UserInfo represent the required information from a user to make a push and interact with the controller
2222
type UserInfo struct {
2323
Username string
2424
Key string

pkg/gitreceive/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const (
1212

1313
type Config struct {
1414
// k8s service discovery env vars
15-
WorkflowHost string `envconfig:"DEIS_WORKFLOW_SERVICE_HOST" required:"true"`
16-
WorkflowPort string `envconfig:"DEIS_WORKFLOW_SERVICE_PORT" required:"true"`
15+
ControllerHost string `envconfig:"DEIS_CONTROLLER_SERVICE_HOST" required:"true"`
16+
ControllerPort string `envconfig:"DEIS_CONTROLLER_SERVICE_PORT" required:"true"`
1717
RegistryHost string `envconfig:"DEIS_REGISTRY_SERVICE_HOST" required:"true"`
1818
RegistryPort string `envconfig:"DEIS_REGISTRY_SERVICE_PORT" required:"true"`
1919

pkg/gitreceive/controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (u unexpectedControllerStatusCode) Error() string {
3333
}
3434

3535
func controllerURLStr(conf *Config, additionalPath ...string) string {
36-
return fmt.Sprintf("http://%s:%s/%s", conf.WorkflowHost, conf.WorkflowPort, strings.Join(additionalPath, "/"))
36+
return fmt.Sprintf("http://%s:%s/%s", conf.ControllerHost, conf.ControllerPort, strings.Join(additionalPath, "/"))
3737
}
3838

3939
func setReqHeaders(builderKey string, req *http.Request) {
@@ -61,7 +61,7 @@ func getAppConfig(conf *Config, builderKey, userName, appName string) (*pkg.Conf
6161

6262
setReqHeaders(builderKey, req)
6363

64-
log.Debug("Workflow request POST /v2/hooks/config\n%s", string(data))
64+
log.Debug("Controller request POST /v2/hooks/config\n%s", string(data))
6565
res, err := http.DefaultClient.Do(req)
6666
if err != nil {
6767
return nil, err
@@ -91,7 +91,7 @@ func publishRelease(conf *Config, builderKey string, buildHook *pkg.BuildHook) (
9191
}
9292

9393
url := controllerURLStr(conf, "v2", "hooks", "build")
94-
log.Debug("Workflow request POST /v2/hooks/build\n%s", postBody)
94+
log.Debug("Controller request POST /v2/hooks/build\n%s", postBody)
9595
req, err := http.NewRequest("POST", url, strings.NewReader(postBody))
9696
if err != nil {
9797
return nil, err
@@ -132,7 +132,7 @@ func receive(conf *Config, builderKey, gitSha string) error {
132132
return err
133133
}
134134

135-
log.Debug("Workflow request /v2/hooks/push (body elided)")
135+
log.Debug("Controller request /v2/hooks/push (body elided)")
136136
req, err := http.NewRequest("POST", urlStr, &body)
137137
if err != nil {
138138
return err

pkg/gitreceive/storage/slug_builder_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type SlugBuilderInfo struct {
2121
// NewSlugBuilderInfo creates and populates a new SlugBuilderInfo based on the given data
2222
func NewSlugBuilderInfo(s3Endpoint *Endpoint, bucket, appName, slugName string, gitSha *git.SHA) *SlugBuilderInfo {
2323
tarKey := fmt.Sprintf("home/%s/tar", slugName)
24-
// this is where workflow tells slugrunner to download the slug from, so we have to tell slugbuilder to upload it to here
24+
// this is where the controller tells slugrunner to download the slug from, so we have to tell slugbuilder to upload it to here
2525
pushKey := fmt.Sprintf("home/%s:git-%s/push", appName, gitSha.Short())
2626

2727
return &SlugBuilderInfo{

0 commit comments

Comments
 (0)