reconcile fail in case agent spec.IgnitionEndpointToken isn't empty due to null pointer dereference
use swag.StringValue when checking the value of string pointer
@@ -884,7 +884,7 @@ func (r *AgentReconciler) updateIfNeeded(ctx context.Context, log logrus.FieldLo
}
}
- if spec.IgnitionEndpointToken != "" && spec.IgnitionEndpointToken != *internalHost.IgnitionEndpointToken {
+ if spec.IgnitionEndpointToken != "" && spec.IgnitionEndpointToken != swag.StringValue(internalHost.IgnitionEndpointToken) {
hostUpdate = true
params.HostUpdateParams.IgnitionEndpointToken = &spec.IgnitionEndpointToken
}
