Skip to content

Commit 266a038

Browse files
🌱 logs info updated (#3512)
logs info updated
1 parent 136aac6 commit 266a038

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

hack/docs/internal/component-config-tutorial/generate_component_config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func newSampleContext(binaryPath string, samplePath string, env ...string) utils
5656

5757
// Prepare the Context for the sample project
5858
func (sp *Sample) Prepare() {
59-
log.Infof("destroying directory for sample project")
59+
log.Infof("destroying directory for component_config sample project")
6060
sp.ctx.Destroy()
6161

6262
log.Infof("refreshing tools and creating directory...")
@@ -66,7 +66,7 @@ func (sp *Sample) Prepare() {
6666
}
6767

6868
func (sp *Sample) GenerateSampleProject() {
69-
log.Infof("Initializing the project")
69+
log.Infof("Initializing the component config project")
7070
err := sp.ctx.Init(
7171
"--domain", "tutorial.kubebuilder.io",
7272
"--repo", "tutorial.kubebuilder.io/project",
@@ -75,7 +75,7 @@ func (sp *Sample) GenerateSampleProject() {
7575
"--plugins=go/v4",
7676
"--component-config",
7777
)
78-
CheckError("Initializing the project", err)
78+
CheckError("Initializing the component config project", err)
7979

8080
log.Infof("Adding a new config type")
8181
err = sp.ctx.CreateAPI(

hack/docs/internal/cronjob-tutorial/generate_cronjob.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func newSampleContext(binaryPath string, samplePath string, env ...string) utils
5656

5757
// Prepare the Context for the sample project
5858
func (sp *Sample) Prepare() {
59-
log.Infof("destroying directory for sample project")
59+
log.Infof("destroying directory for cronjob sample project")
6060
sp.ctx.Destroy()
6161

6262
log.Infof("refreshing tools and creating directory...")
@@ -66,7 +66,7 @@ func (sp *Sample) Prepare() {
6666
}
6767

6868
func (sp *Sample) GenerateSampleProject() {
69-
log.Infof("Initializing the project")
69+
log.Infof("Initializing the cronjob project")
7070

7171
err := sp.ctx.Init(
7272
"--plugins", "go/v4",
@@ -75,7 +75,7 @@ func (sp *Sample) GenerateSampleProject() {
7575
"--license", "apache2",
7676
"--owner", "The Kubernetes authors",
7777
)
78-
CheckError("Initializing the project", err)
78+
CheckError("Initializing the cronjob project", err)
7979

8080
log.Infof("Adding a new config type")
8181
err = sp.ctx.CreateAPI(
@@ -466,13 +466,13 @@ func updateSuiteTest(sp *Sample) {
466466
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
467467
`limitations under the License.
468468
*/`, SuiteTestIntro)
469-
CheckError("fixing suite_test.go", err)
469+
CheckError("updating suite_test.go to add license intro", err)
470470

471471
err = pluginutil.InsertCode(
472472
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
473473
`import (`, `
474474
"context"`)
475-
CheckError("fixing suite_test.go", err)
475+
CheckError("updating suite_test.go to add context", err)
476476

477477
err = pluginutil.InsertCode(
478478
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -481,7 +481,7 @@ func updateSuiteTest(sp *Sample) {
481481
`, `
482482
ctrl "sigs.k8s.io/controller-runtime"
483483
`)
484-
CheckError("fixing suite_test.go", err)
484+
CheckError("updating suite_test.go to add ctrl import", err)
485485

486486
err = pluginutil.ReplaceInFile(
487487
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -490,14 +490,14 @@ var cfg *rest.Config
490490
var k8sClient client.Client
491491
var testEnv *envtest.Environment
492492
`, SuiteTestEnv)
493-
CheckError("fixing suite_test.go", err)
493+
CheckError("updating suite_test.go to add more variables", err)
494494

495495
err = pluginutil.InsertCode(
496496
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
497497
`
498498
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
499499
`, SuiteTestReadCRD)
500-
CheckError("fixing suite_test.go", err)
500+
CheckError("updating suite_test.go to add text about CRD", err)
501501

502502
err = pluginutil.InsertCode(
503503
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -507,7 +507,7 @@ var testEnv *envtest.Environment
507507
/*
508508
Then, we start the envtest cluster.
509509
*/`)
510-
CheckError("fixing suite_test.go", err)
510+
CheckError("updating suite_test.go to add text to show where envtest cluster start", err)
511511

512512
err = pluginutil.ReplaceInFile(
513513
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -517,7 +517,7 @@ var testEnv *envtest.Environment
517517
518518
//+kubebuilder:scaffold:scheme
519519
`, SuiteTestAddSchema)
520-
CheckError("fixing suite_test.go", err)
520+
CheckError("updating suite_test.go to add schema", err)
521521

522522
err = pluginutil.InsertCode(
523523
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -526,7 +526,7 @@ var testEnv *envtest.Environment
526526
Expect(err).NotTo(HaveOccurred())
527527
Expect(k8sClient).NotTo(BeNil())
528528
`, SuiteTestDescription)
529-
CheckError("fixing suite_test.go", err)
529+
CheckError("updating suite_test.go for test description", err)
530530

531531
err = pluginutil.ReplaceInFile(
532532
filepath.Join(sp.ctx.Dir, "internal/controller/suite_test.go"),
@@ -537,7 +537,7 @@ var _ = AfterSuite(func() {
537537
Expect(err).NotTo(HaveOccurred())
538538
})
539539
`, SuiteTestCleanup)
540-
CheckError("fixing suite_test.go", err)
540+
CheckError("updating suite_test.go to cleanup tests", err)
541541
}
542542

543543
func updateKustomization(sp *Sample) {

0 commit comments

Comments
 (0)