Commit 66a2ee5a authored by Harry Zhang's avatar Harry Zhang

Fix crd delete nil pointer

parent de71cc50
...@@ -57,7 +57,10 @@ func main() { ...@@ -57,7 +57,10 @@ func main() {
if err != nil && !apierrors.IsAlreadyExists(err) { if err != nil && !apierrors.IsAlreadyExists(err) {
panic(err) panic(err)
} }
defer apiextensionsclientset.ApiextensionsV1beta1().CustomResourceDefinitions().Delete(crd.Name, nil)
if crd != nil {
defer apiextensionsclientset.ApiextensionsV1beta1().CustomResourceDefinitions().Delete(crd.Name, nil)
}
// make a new config for our extension's API group, using the first config as a baseline // make a new config for our extension's API group, using the first config as a baseline
exampleClient, exampleScheme, err := exampleclient.NewClient(config) exampleClient, exampleScheme, err := exampleclient.NewClient(config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment