fix webhook initialization error
@@ -172,6 +172,11 @@ func main() {
// only run webhook if explicitly declared
if os.Getenv("ENABLE_WEBHOOKS") == "true" {
+ if err = (&corev1alpha1.AccessToken{}).SetupWebhookWithManager(mgr); err != nil {
+ setupLog.Error(err, "unable to create webhook", "webhook", "AccessToken")
+ os.Exit(1)
+ }
+
if err = (&corev1alpha1.Component{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "Component")
os.Exit(1)
@@ -182,11 +187,6 @@ func main() {
os.Exit(1)
}
- if err = (&corev1alpha1.DeployKey{}).SetupWebhookWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create webhook", "webhook", "DeployKey")
- os.Exit(1)
- }
-
if err = (&corev1alpha1.DockerRegistry{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "DockerRegistry")
os.Exit(1)
