Skip to content

Commit f076213

Browse files
committed
readme_0.0.2: fix shell script formatting
1 parent 9d2c0cc commit f076213

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

doc/milestone/readme_0.0.2.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@ At a high level an operator using the SDK processes events for watched resources
3030

3131
First, checkout and install the operator-sdk CLI:
3232

33-
```
33+
```sh
3434
$ git checkout tags/v0.0.2
3535
$ go install github.com/coreos/operator-sdk/commands/operator-sdk
3636
```
3737

3838
Create and deploy an app-operator using the SDK CLI:
3939

40-
```
40+
```sh
4141
# Create an app-operator project that defines the App CR.
4242
$ cd $GOPATH/src/github.com/example-inc/
4343
$ operator-sdk new app-operator --api-version=app.example.com/v1alpha1 --kind=App
44+
$ cd app-operator
4445

4546
# Build and push the app-operator image to a public registry such as quay.io
4647
$ operator-sdk build quay.io/example/app-operator

doc/milestone/user_guide.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ This guide walks through an example of building a simple memcached-operator usin
1717
The Operator SDK has a CLI tool that helps the developer to create, build, and deploy a new operator project.
1818

1919
Checkout the desired release tag and install the SDK CLI tool:
20-
```
20+
21+
```sh
2122
$ git checkout tags/v0.0.2
2223
$ go install github.com/coreos/operator-sdk/commands/operator-sdk
2324
```
@@ -28,7 +29,7 @@ This installs the CLI binary `operator-sdk` at `$GOPATH/bin`.
2829

2930
Use the CLI to create a new memcached-operator project:
3031

31-
```
32+
```sh
3233
$ cd $GOPATH/src/github.com/example-inc/
3334
$ operator-sdk new memcached-operator --api-version=cache.example.com/v1alpha1 --kind=Memcached
3435
$ cd memcached-operator
@@ -73,7 +74,7 @@ type MemcachedStatus struct {
7374
```
7475
Update the generated code for the CR:
7576

76-
```
77+
```sh
7778
$ operator-sdk generate k8s
7879
```
7980

@@ -97,14 +98,14 @@ Kubernetes deployment manifests are generated in `deploy/operator.yaml`. The dep
9798

9899
Deploy the memcached-operator:
99100

100-
```
101-
kubectl create -f deploy/rbac.yaml
102-
kubectl create -f deploy/operator.yaml
101+
```sh
102+
$ kubectl create -f deploy/rbac.yaml
103+
$ kubectl create -f deploy/operator.yaml
103104
```
104105

105106
Verify that the memcached-operator is up and running:
106107

107-
```
108+
```sh
108109
$ kubectl get deployment
109110
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
110111
memcached-operator 1 1 1 1 1m
@@ -127,7 +128,7 @@ EOF
127128

128129
Ensure that the memcached-operator creates the deployment for the CR:
129130

130-
```
131+
```sh
131132
$ kubectl get deployment
132133
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
133134
memcached-operator 1 1 1 1 2m
@@ -136,7 +137,7 @@ example-memcached 3 3 3 3 1m
136137

137138
Check the pods and CR status to confirm the status is updated with the memcached pod names:
138139

139-
```
140+
```sh
140141
$ kubectl get pods
141142
NAME READY STATUS RESTARTS AGE
142143
example-memcached-6fd7c98d8-7dqdr 1/1 Running 0 1m
@@ -145,7 +146,7 @@ example-memcached-6fd7c98d8-m7vn7 1/1 Running 0 1m
145146
memcached-operator-7cc7cfdf86-vvjqk 1/1 Running 0 2m
146147
```
147148

148-
```
149+
```sh
149150
$ kubectl get memcached/example-memcached -o yaml
150151
apiVersion: cache.example.com/v1alpha1
151152
kind: Memcached
@@ -170,12 +171,14 @@ status:
170171
### Update the size
171172

172173
Change the `spec.size` field in the memcached CR from 3 to 4:
173-
```
174+
175+
```sh
174176
$ kubectl get memcached/example-memcached -o yaml | sed 's|size: 3|size: 4|g' | kubectl apply -f -
175177
```
176178

177179
Confirm that the operator changes the deployment size:
178-
```
180+
181+
```sh
179182
$ kubectl get deployment
180183
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
181184
example-memcached 4 4 4 4 5m
@@ -185,9 +188,9 @@ example-memcached 4 4 4 4 5m
185188

186189
Clean up the resources:
187190

188-
```
189-
kubectl delete memcached example-memcached
190-
kubectl delete -f deploy/operator.yaml
191+
```sh
192+
$ kubectl delete memcached example-memcached
193+
$ kubectl delete -f deploy/operator.yaml
191194
```
192195

193196
[memcached_handler]: ../../example/memcached-operator/handler.go

0 commit comments

Comments
 (0)