update stateCRDResource const
@@ -60,11 +60,10 @@ var defaultRunInterval = time.Minute * 10
const checkCRDGroup = "comcast.github.io"
const checkCRDVersion = "v1"
const checkCRDResource = "khchecks"
-const stateCRDResource = "khstate"
+const stateCRDResource = "khstates"
const stateCRDGroup = "comcast.github.io"
const stateCRDVersion = "v1"
-
// Checker implements a KuberhealthyCheck for external
// check execution and lifecycle management.
type Checker struct {
@@ -391,7 +390,6 @@ func (ext *Checker) sanityCheck() error {
return nil
}
-
// NewKHStateClient creates a new client for khstate resources
func (ext *Checker) NewKHStateClient(namespace string) (*khstatecrd.KuberhealthyStateClient, error) {
// make a new crd check client
@@ -435,7 +433,6 @@ func (ext *Checker) waitForPodStatusUpdate(lastUpdateTime time.Time, ctx context
time.Sleep(time.Second / 2)
log.Debugln("Waiting for external checker pod to report in...")
-
// if the context is canceled, we stop
select {
case <-ctx.Done():
@@ -616,7 +613,6 @@ func (ext *Checker) waitForPodRunning() chan error {
// has all the default configuration required
func (ext *Checker) validatePodSpec() error {
-
// if containers are not set, then we return an error
if len(ext.PodSpec.Containers) == 0 && len(ext.PodSpec.InitContainers) == 0 {
return errors.New("no containers found in checks PodSpec")
