Fix logging about watches resources
This commit is contained in:
parent
0b03b85cf0
commit
037c1fa025
|
|
@ -1,5 +1,3 @@
|
|||
// NOTE: Boilerplate only. Ignore this file.
|
||||
|
||||
// Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=jenkins.io
|
||||
|
|
@ -26,6 +24,16 @@ var (
|
|||
// GetObjectKind returns Jenkins object kind
|
||||
func (in *Jenkins) GetObjectKind() schema.ObjectKind { return in }
|
||||
|
||||
func (in *Jenkins) SetGroupVersionKind(kind schema.GroupVersionKind) {}
|
||||
|
||||
func (in *Jenkins) GroupVersionKind() schema.GroupVersionKind {
|
||||
return schema.GroupVersionKind{
|
||||
Group: SchemeGroupVersion.Group,
|
||||
Version: SchemeGroupVersion.Version,
|
||||
Kind: Kind,
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&Jenkins{}, &JenkinsList{})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
|
|||
}
|
||||
|
||||
// Watch for changes to secondary resource Pods and requeue the owner Jenkins
|
||||
err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{
|
||||
err = c.Watch(&source.Kind{Type: &corev1.Pod{TypeMeta: metav1.TypeMeta{APIVersion: "core/v1", Kind: "Pod"}}}, &handler.EnqueueRequestForOwner{
|
||||
IsController: true,
|
||||
OwnerType: &v1alpha2.Jenkins{},
|
||||
})
|
||||
|
|
@ -94,12 +94,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
|
|||
}
|
||||
|
||||
jenkinsHandler := &enqueueRequestForJenkins{}
|
||||
err = c.Watch(&source.Kind{Type: &corev1.Secret{}}, jenkinsHandler)
|
||||
err = c.Watch(&source.Kind{Type: &corev1.Secret{TypeMeta: metav1.TypeMeta{APIVersion: "core/v1", Kind: "Secret"}}}, jenkinsHandler)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
err = c.Watch(&source.Kind{Type: &corev1.ConfigMap{}}, jenkinsHandler)
|
||||
err = c.Watch(&source.Kind{Type: &corev1.ConfigMap{TypeMeta: metav1.TypeMeta{APIVersion: "core/v1", Kind: "ConfigMap"}}}, jenkinsHandler)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue