Skip to content

Commit

Permalink
Adopt latest proxy core (#26)
Browse files Browse the repository at this point in the history
* Pin k8s incubator/service catalog version

* Use latest core proxy

* Update dependencies

* Update service-broker-proxy to master

* Adjust config names
  • Loading branch information
pankrator authored Aug 28, 2018
1 parent 5671b26 commit 63294e5
Show file tree
Hide file tree
Showing 1,137 changed files with 100,325 additions and 94,640 deletions.
344 changes: 105 additions & 239 deletions Gopkg.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

[[constraint]]
name = "github.com/kubernetes-incubator/service-catalog"
version = "0.1.27"
version = "=0.1.27"

[[constraint]]
name = "github.com/Peripli/service-broker-proxy"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Docker Images are available on quay.io/service-manager/sb-proxy
The service-broker-proxy-k8s is installed via a helm chart.

```bash
helm install charts/service-broker-proxy --name service-broker-proxy --namespace service-broker-proxy --set config.sm.host=<SM_HOST> --set sm.user=<USER> --set sm.password=<PASSWORD>
helm install charts/service-broker-proxy --name service-broker-proxy --namespace service-broker-proxy --set config.sm.url=<SM_URL> --set sm.user=<USER> --set sm.password=<PASSWORD>
```

**Note:** Make sure you substitute <SM_HOST> with the Service Manager url, <USER> and <PASSWORD> with the credentials for the Service Manager. The credentials can be obtained when registering the cluster in Service Manager.
**Note:** Make sure you substitute <SM_URL> with the Service Manager url, <USER> and <PASSWORD> with the credentials for the Service Manager. The credentials can be obtained when registering the cluster in Service Manager.

To use your own images you can set `image.repository`, `image.tag` and `image.pullPolicy` to the helm install command.
16 changes: 10 additions & 6 deletions application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@

server:
port: 8081
logLevel: debug
logFormat: text
timeout: 5000ms
request_timeout: 4000ms
shutdown_timeout: 4000ms
log:
level: debug
format: text
sm:
user: admin
password: admin
host: http://service-manager.local.pcfdev.io
osbApi: /v1/osb
requestTimeout: 6000ms
url: http://service-manager.local.pcfdev.io
osb_api_path: /v1/osb
request_timeout: 6000ms
skip_ssl_validation: true
resync_period: 1m
k8s:
client:
timeout: 6000ms
Expand Down
2 changes: 1 addition & 1 deletion charts/service-broker-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
mountPath: {{ .Values.file.location }}
readOnly: true
env:
- name: SERVER_HOST
- name: SELF_URL
value: http://{{ template "service-broker-proxy.name" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}
- name: SM_USER
valueFrom:
Expand Down
19 changes: 11 additions & 8 deletions charts/service-broker-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ reg:
config:
server:
port: 8081
logLevel: debug
logFormat: text
timeout: 5000ms
# resyncPeriod: 10s
request_timeout: 4000ms
shutdown_timeout: 4000ms
log:
level: debug
format: text
sm:
host: http://service-manager.local.pcfdev.io
osbApi: /v1/osb
requestTimeout: 6000ms
url: http://service-manager.local.pcfdev.io
osb_api_path: /v1/osb
request_timeout: 6000ms
skip_ssl_validation: false
resync_period: 1m
k8s:
client:
timeout: 6000ms
timeout: 30000ms
Binary file added main
Binary file not shown.
10 changes: 6 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ import (
"github.com/Peripli/service-broker-proxy-k8s/k8s"
"github.com/Peripli/service-broker-proxy/pkg/middleware"
"github.com/Peripli/service-broker-proxy/pkg/sbproxy"
"github.com/Peripli/service-manager/pkg/util"

"github.com/spf13/pflag"
)

func main() {
ctx, cancel := util.HandleInterrupts()
defer cancel()

env := sbproxy.DefaultEnv(func(set *pflag.FlagSet) {
k8s.CreatePFlagsForK8SClient(set)
})
Expand All @@ -25,10 +29,8 @@ func main() {
panic(fmt.Errorf("error creating K8S client: %s", err))
}

proxy, err := sbproxy.New(env, platformClient)
if err != nil {
panic(fmt.Errorf("error creating proxy: %s", err))
}
proxyBuilder := sbproxy.New(ctx, env, platformClient)
proxy := proxyBuilder.Build()

proxy.Server.Use(middleware.BasicAuth(platformConfig.Reg.User, platformConfig.Reg.Password))

Expand Down

This file was deleted.

31 changes: 0 additions & 31 deletions vendor/github.com/Azure/go-autorest/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions vendor/github.com/Azure/go-autorest/.travis.yml

This file was deleted.

Loading

0 comments on commit 63294e5

Please sign in to comment.