-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update user.toml path and example images #172
Changes from all commits
fa18258
b0dfc91
b54e72b
0130809
89c1da3
66f5cc1
a2f36b9
b3b1b98
0b7b529
ef8756d
09f16b5
26c37c2
9d2293e
4c528d7
bb8593a
98a0160
4e36d97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: user-toml-secret | ||
name: user-toml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for explaining what "stutter" is but i don't see any repetition here in the name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Or a Secret whose name ends in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with the change. I was just being nitpicky about it not fitting the "stutter" title. |
||
type: Opaque | ||
data: | ||
# Each item needs to be encoded in base64, as Kubernetes expects that encoding. | ||
# Each item needs to be base64-encoded. | ||
# This overrides the port set in the Redis Habitat service. | ||
# Plain text content of the secret: "port = 4444" | ||
# This overrides the port set in the postgresql Habitat service. | ||
user.toml: cG9ydCA9IDQ0NDQ= | ||
--- | ||
apiVersion: habitat.sh/v1beta1 | ||
kind: Habitat | ||
kind: Habitat | ||
metadata: | ||
name: example-bind-configured-db-service | ||
name: example-bind-configured-db | ||
spec: | ||
image: kinvolk/postgresql-hab | ||
image: kinvolk/redis-hab | ||
count: 1 | ||
service: | ||
name: postgresql | ||
name: redis | ||
# Name of the secret. | ||
# This is mounted inside of the pod as a user.toml file. | ||
configSecretName: user-toml-secret | ||
configSecretName: user-toml | ||
topology: standalone | ||
--- | ||
apiVersion: habitat.sh/v1beta1 | ||
kind: Habitat | ||
metadata: | ||
name: example-bind-configured-web-app-service | ||
name: example-bind-configured-web-app | ||
spec: | ||
image: kinvolk/bindgo-hab | ||
count: 1 | ||
|
@@ -35,16 +35,16 @@ spec: | |
topology: standalone | ||
bind: | ||
- name: db | ||
service: postgresql | ||
service: redis | ||
group: default | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web-app-service | ||
name: web-app | ||
spec: | ||
selector: | ||
habitat-name: example-bind-configured-web-app-service | ||
habitat-name: example-bind-configured-web-app | ||
type: NodePort | ||
ports: | ||
- name: web | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ After the Habitat operator is up and running, execute the following command from | |
kubectl create -f examples/bind/habitat.yml | ||
``` | ||
|
||
This will deploy two `Habitat`s, a simple HTTP server written in Go that will be bound to a PostgreSQL database. The Go server will display the port number the database listens on. | ||
This will deploy two `Habitat`s, a simple HTTP server written in Go that will be bound to a Redis database. The Go server will display the port number the database listens on. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really call the services or apps as "habitats"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the naming is a bit weird. In Habitat they're services, but the CRD is Habitat, so same as we say ConfigMaps, I think we're justified to say Habitats. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I agree and it sounds strange but OK. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
When running on minikube, it can be accessed under port `30001` of the minikube VM. `minikube ip` can be used to retrieve the IP. | ||
The web app is listening on port `30001`. When running on minikube, its IP can | ||
be retrieved with `minikube ip`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: habitat.sh/v1beta1 | ||
kind: Habitat | ||
metadata: | ||
name: test-redis | ||
spec: | ||
image: kinvolk/redis-hab | ||
count: 1 | ||
service: | ||
name: redis | ||
configSecretName: user-toml | ||
topology: standalone |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: user-toml-secret | ||
name: user-toml | ||
type: Opaque | ||
data: | ||
# Each item needs to be encoded in base64, as Kubernetes expects that encoding. | ||
# Plain text content of the secret: "port = 4444" | ||
# This overrides the port set in the postgresql Habitat service. | ||
# This overrides the port set in the Redis Habitat service. | ||
user.toml: cG9ydCA9IDQ0NDQ= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the commit log it's "user.toml", but here it's with a dash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's with a dash because what I'm pointing at here is the Kubernetes Secret named
user-toml
, rather than the filename under which the Secret is mounted in the Pod.