Skip to content

Commit b21f838

Browse files
authored
pkg/scaffold: Adjust log msg create -> created (#1076)
* pkg/scaffold/*: Adjust log msg create -> created To avoid the confusion that a user would need to take action. * doc/*: Adjust docs to new log msg
1 parent 7d5ccec commit b21f838

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

doc/helm/dev/developer_guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ time. To do this, initialize a new project:
3131
```sh
3232
$ operator-sdk new --type helm --kind Foo --api-version foo.example.com/v1alpha1 foo-operator
3333
INFO[0000] Creating new Helm operator 'foo-operator'.
34-
INFO[0000] Create build/Dockerfile
35-
INFO[0000] Create watches.yaml
36-
INFO[0000] Create deploy/service_account.yaml
37-
INFO[0000] Create deploy/role.yaml
38-
INFO[0000] Create deploy/role_binding.yaml
39-
INFO[0000] Create deploy/operator.yaml
40-
INFO[0000] Create deploy/crds/foo_v1alpha1_foo_crd.yaml
41-
INFO[0000] Create deploy/crds/foo_v1alpha1_foo_cr.yaml
42-
INFO[0000] Create helm-charts/foo/
34+
INFO[0000] Created build/Dockerfile
35+
INFO[0000] Created watches.yaml
36+
INFO[0000] Created deploy/service_account.yaml
37+
INFO[0000] Created deploy/role.yaml
38+
INFO[0000] Created deploy/role_binding.yaml
39+
INFO[0000] Created deploy/operator.yaml
40+
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_crd.yaml
41+
INFO[0000] Created deploy/crds/foo_v1alpha1_foo_cr.yaml
42+
INFO[0000] Created helm-charts/foo/
4343
INFO[0000] Run git init ...
4444
Initialized empty Git repository in /home/joe/go/src/github.com/operator-framework/foo-operator/.git/
4545
INFO[0000] Run git init done

doc/sdk-cli-reference.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pkg/apis/app/v1alpha1/
161161

162162
$ operator-sdk generate openapi
163163
INFO[0000] Running OpenAPI code-generation for Custom Resource group versions: [app:[v1alpha1], ]
164-
INFO[0001] Create deploy/crds/app_v1alpha1_appservice_crd.yaml
164+
INFO[0001] Created deploy/crds/app_v1alpha1_appservice_crd.yaml
165165
INFO[0001] Code-generation complete.
166166

167167
$ tree pkg/apis/app/v1alpha1/
@@ -195,8 +195,8 @@ INFO[0000] Fill in the following required fields in file deploy/olm-catalog/oper
195195
spec.maintainers
196196
spec.provider
197197
spec.labels
198-
INFO[0000] Create deploy/olm-catalog/operator-name.csv.yaml
199-
INFO[0000] Create deploy/olm-catalog/_generated.concat_crd.yaml
198+
INFO[0000] Created deploy/olm-catalog/operator-name.csv.yaml
199+
INFO[0000] Created deploy/olm-catalog/_generated.concat_crd.yaml
200200
```
201201

202202
## migrate
@@ -214,11 +214,11 @@ $ operator-sdk migrate
214214
2019/01/10 15:02:45 No playbook was found, so not including it in the new Dockerfile
215215
2019/01/10 15:02:45 renamed Dockerfile to build/Dockerfile.sdkold and replaced with newer version
216216
2019/01/10 15:02:45 Compare the new Dockerfile to your old one and manually migrate any customizations
217-
INFO[0000] Create cmd/manager/main.go
218-
INFO[0000] Create Gopkg.toml
219-
INFO[0000] Create build/Dockerfile
220-
INFO[0000] Create bin/entrypoint
221-
INFO[0000] Create bin/user_setup
217+
INFO[0000] Created cmd/manager/main.go
218+
INFO[0000] Created Gopkg.toml
219+
INFO[0000] Created build/Dockerfile
220+
INFO[0000] Created bin/entrypoint
221+
INFO[0000] Created bin/user_setup
222222
```
223223

224224
## new
@@ -277,16 +277,16 @@ Adds the API definition for a new custom resource under `pkg/apis` and generates
277277
```console
278278
$ operator-sdk add api --api-version app.example.com/v1alpha1 --kind AppService
279279
INFO[0000] Generating api version app.example.com/v1alpha1 for kind AppService.
280-
INFO[0000] Create pkg/apis/app/v1alpha1/appservice_types.go
281-
INFO[0000] Create pkg/apis/addtoscheme_app_v1alpha1.go
282-
INFO[0000] Create pkg/apis/app/v1alpha1/register.go
283-
INFO[0000] Create pkg/apis/app/v1alpha1/doc.go
284-
INFO[0000] Create deploy/crds/app_v1alpha1_appservice_cr.yaml
285-
INFO[0000] Create deploy/crds/app_v1alpha1_appservice_crd.yaml
280+
INFO[0000] Created pkg/apis/app/v1alpha1/appservice_types.go
281+
INFO[0000] Created pkg/apis/addtoscheme_app_v1alpha1.go
282+
INFO[0000] Created pkg/apis/app/v1alpha1/register.go
283+
INFO[0000] Created pkg/apis/app/v1alpha1/doc.go
284+
INFO[0000] Created deploy/crds/app_v1alpha1_appservice_cr.yaml
285+
INFO[0000] Created deploy/crds/app_v1alpha1_appservice_crd.yaml
286286
INFO[0001] Running deepcopy code-generation for Custom Resource group versions: [app:[v1alpha1], ]
287287
INFO[0002] Code-generation complete.
288288
INFO[0002] Running OpenAPI code-generation for Custom Resource group versions: [app:[v1alpha1], ]
289-
INFO[0004] Create deploy/crds/app_v1alpha1_appservice_crd.yaml
289+
INFO[0004] Created deploy/crds/app_v1alpha1_appservice_crd.yaml
290290
INFO[0004] Code-generation complete.
291291
INFO[0004] API generation complete.
292292
```
@@ -304,8 +304,8 @@ Adds a new controller under `pkg/controller/<kind>/...` that, by default, reconc
304304

305305
```console
306306
$ operator-sdk add controller --api-version app.example.com/v1alpha1 --kind AppService
307-
Create pkg/controller/appservice/appservice_controller.go
308-
Create pkg/controller/add_appservice.go
307+
Created pkg/controller/appservice/appservice_controller.go
308+
Created pkg/controller/add_appservice.go
309309
```
310310

311311
### crd
@@ -322,8 +322,8 @@ Generates the CRD and the CR files for the specified api-version and kind.
322322
```console
323323
$ operator-sdk add crd --api-version app.example.com/v1alpha1 --kind AppService
324324
Generating custom resource definition (CRD) files
325-
Create deploy/crds/app_v1alpha1_appservice_crd.yaml
326-
Create deploy/crds/app_v1alpha1_appservice_cr.yaml
325+
Created deploy/crds/app_v1alpha1_appservice_crd.yaml
326+
Created deploy/crds/app_v1alpha1_appservice_cr.yaml
327327
```
328328

329329
## run

pkg/scaffold/helm/chart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const HelmChartsDir string = "helm-charts"
3232
// CreateChartForResource creates a new helm chart in the SDK project for the
3333
// provided resource.
3434
func CreateChartForResource(r *scaffold.Resource, projectDir string) (*chart.Chart, error) {
35-
log.Infof("Create %s/%s/", HelmChartsDir, r.LowerKind)
35+
log.Infof("Created %s/%s/", HelmChartsDir, r.LowerKind)
3636

3737
chartfile := &chart.Metadata{
3838
Name: r.LowerKind,

pkg/scaffold/scaffold.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (s *Scaffold) doRender(i input.Input, e input.File, absPath string) error {
181181
}
182182
}
183183
_, err = f.Write(b)
184-
log.Infoln("Create", i.Path)
184+
log.Infoln("Created", i.Path)
185185
return err
186186
}
187187

0 commit comments

Comments
 (0)