fix for failure to make khstate when it does not exist
@@ -252,7 +252,8 @@ func (ext *Checker) setUUID(uuid string) error {
details.AuthoritativePod = ext.hostname
details.OK = true
newState := khstatecrd.NewKuberhealthyState(ext.CheckName, details)
- ext.log("Creating khstate", checkState.Name, checkState.Namespace, "because it did not exist")
+ newState.Namespace = ext.Namespace
+ ext.log("Creating khstate", newState.Name, newState.Namespace, "because it did not exist")
_, err = ext.KHStateClient.Create(&newState, stateCRDResource, ext.CheckNamespace())
if err != nil {
ext.log("failed to create a khstate after finding that it did not exist:", err)
