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

Fix some imports and added some changes to K8S deployment #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ojhughes
Copy link
Contributor

No description provided.

@@ -16,7 +16,7 @@ spec:
run: bookstore-broker
spec:
containers:
- image: sample/bookstore-service-broker:0.0.1.BUILD-SNAPSHOT
- image: eu.gcr.io/cf-sandbox-ohughes/bookstore-service-broker:0.0.1.BUILD-SNAPSHOT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should not be committed

To test the Service Instance API, the URL can be constructed from the binding credentials;

---
export SI_URI=$(kubectl get secret bookstore-binding -n test -o json | jq -r '.data.uri' | base64 --decode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to suggest this command, we'll need to add jq as an additional pre-requisite at the top of the document. We shouldn't assume everyone will have that installed.

@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: bookstore-broker
namespace: bookstore-broker
namespace: service-catalog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the namespace change? That ripples thru a lot of files and doc references. The namespace service-catalog might be confused with the namespace that the actual Service Catalog extension is deployed to, or potentially clash with other service broker sample deployments. It would be better if the name were specific to bookstore.

@@ -5,10 +5,10 @@ metadata:
labels:
run: bookstore-broker
spec:
url: http://bookstore-broker.bookstore-broker.svc.cluster.local
url: http://35.197.249.208
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the DNS name not work with LoadBalanced? This IP address won't be valid for all deployments, will it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes using the internal DNS works for me

@@ -227,7 +213,7 @@ Now that the application has been deployed and verified, it can be registered to
The Open Service Broker API endpoints in the service broker application are secured with a basic auth username and password. Create a Kubernetes secret to store these credentials:

----
$ kubectl create -f deploy/kubernetes/service-broker-secret.yml
$ kubectl create secret generic -n bookstore-broker bookstore-broker-secret --from-literal=username='admin' --from-literal=password='supersecret'
Copy link
Contributor

@scottfrederick scottfrederick Feb 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the consistency of creating all artifacts from files, but I'm OK with creating with CLI options instead. This commit should remove deploy/kubernetes/service-broker-secret.yml if it's not going to be used though.


Construct a URL using the IP address of the node and the port of the service, and use the this URL to access the `/v2/catalog` endpoint of the service broker application:

----
$ curl http://192.168.1.235:32248/v2/catalog -u admin:supersecret
$ curl http://35.197.249.208/v2/catalog -u admin:supersecret
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this IP address be valid for all deployments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No but I can't see a way of making an IP deterministic without creating and external DNS record

----

Note the value in the `EXTERNAL-IP` column of the node whose `NAME` matches the node for the `bookstore-broker` pod.
Note the value in the `LoadBalancer Ingress` column and the `Port` column below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no output below this with the specified columns.

@@ -128,18 +135,18 @@ service "bookstore-broker" created
Show the details of the created service:

----
$ kubectl describe service bookstore-broker -n bookstore-broker
Name: bookstore-broker
$ kubectl describe service bookstore-broker -n bookstore-brokerName: bookstore-broker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a line break before Name: bookstore-broker

@scottfrederick
Copy link
Contributor

@ojhughes I had to fix the imports to get another change in. You should be able to rebase and remove those changes.

Ollie Hughes added 2 commits March 1, 2018 15:50
Ensure internal DNS and correct NS used
Use substituted external IP
Advise on JQ prerequisite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants