diff --git a/pkg/api.go b/pkg/api.go index dc1d58201..a5ac9f73f 100644 --- a/pkg/api.go +++ b/pkg/api.go @@ -141,6 +141,9 @@ func (c Canary) GetCheckID(checkName string) string { func (c Canary) ToV1() (*v1.Canary, error) { annotations := c.Annotations + if annotations == nil { + annotations = make(types.JSONStringMap) + } annotations["source"] = c.Source canary := v1.Canary{ ObjectMeta: metav1.ObjectMeta{