Skip to content

Commit 032f0c4

Browse files
authored
Merge pull request #1910 from camilamacedo86/fix-checks
✨ rename probes endpoints (go/v3)
2 parents c577244 + 887d714 commit 032f0c4

File tree

7 files changed

+14
-14
lines changed
  • docs/book/src
    • cronjob-tutorial/testdata/project
    • multiversion-tutorial/testdata/project
  • pkg/plugins/golang/v3/scaffolds/internal/templates
  • testdata

7 files changed

+14
-14
lines changed

docs/book/src/cronjob-tutorial/testdata/project/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ func main() {
124124
}
125125
//+kubebuilder:scaffold:builder
126126

127-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
127+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
128128
setupLog.Error(err, "unable to set up health check")
129129
os.Exit(1)
130130
}
131-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
131+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
132132
setupLog.Error(err, "unable to set up ready check")
133133
os.Exit(1)
134134
}

docs/book/src/multiversion-tutorial/testdata/project/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ func main() {
119119
/*
120120
*/
121121

122-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
122+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
123123
setupLog.Error(err, "unable to set up health check")
124124
os.Exit(1)
125125
}
126-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
126+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
127127
setupLog.Error(err, "unable to set up ready check")
128128
os.Exit(1)
129129
}

pkg/plugins/golang/v3/scaffolds/internal/templates/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ func main() {
268268
269269
%s
270270
271-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
271+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
272272
setupLog.Error(err, "unable to set up health check")
273273
os.Exit(1)
274274
}
275-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
275+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
276276
setupLog.Error(err, "unable to set up ready check")
277277
os.Exit(1)
278278
}

testdata/project-v3-addon/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ func main() {
104104
}
105105
//+kubebuilder:scaffold:builder
106106

107-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
107+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
108108
setupLog.Error(err, "unable to set up health check")
109109
os.Exit(1)
110110
}
111-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
111+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
112112
setupLog.Error(err, "unable to set up ready check")
113113
os.Exit(1)
114114
}

testdata/project-v3-config/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ func main() {
132132
}
133133
//+kubebuilder:scaffold:builder
134134

135-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
135+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
136136
setupLog.Error(err, "unable to set up health check")
137137
os.Exit(1)
138138
}
139-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
139+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
140140
setupLog.Error(err, "unable to set up ready check")
141141
os.Exit(1)
142142
}

testdata/project-v3-multigroup/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ func main() {
191191
}
192192
//+kubebuilder:scaffold:builder
193193

194-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
194+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
195195
setupLog.Error(err, "unable to set up health check")
196196
os.Exit(1)
197197
}
198-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
198+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
199199
setupLog.Error(err, "unable to set up ready check")
200200
os.Exit(1)
201201
}

testdata/project-v3/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ func main() {
136136
}
137137
//+kubebuilder:scaffold:builder
138138

139-
if err := mgr.AddHealthzCheck("health", healthz.Ping); err != nil {
139+
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
140140
setupLog.Error(err, "unable to set up health check")
141141
os.Exit(1)
142142
}
143-
if err := mgr.AddReadyzCheck("check", healthz.Ping); err != nil {
143+
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
144144
setupLog.Error(err, "unable to set up ready check")
145145
os.Exit(1)
146146
}

0 commit comments

Comments
 (0)