@@ -21,6 +21,7 @@ import (
21
21
"fmt"
22
22
"os"
23
23
24
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
25
"k8s.io/apimachinery/pkg/runtime"
25
26
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
26
27
ctrl "sigs.k8s.io/controller-runtime"
@@ -44,9 +45,12 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
44
45
log := log .FromContext (ctx ).WithValues ("chaospod" , req .NamespacedName )
45
46
log .V (1 ).Info ("reconciling chaos pod" )
46
47
47
- log .Info (fmt .Sprintf ("%+v\n \n %+v\n " , ctx , req ))
48
+ fmt .Println ("***************************************" )
49
+ fmt .Println (req .ClusterName )
50
+ fmt .Println ("***************************************" )
51
+ // log.Info(fmt.Sprintf("%+v\n\n%+v\n", ctx, req))
48
52
49
- var chaospod api.ChaosPod
53
+ chaospod := api.ChaosPod { ObjectMeta : metav1. ObjectMeta { ClusterName : req . ClusterName }}
50
54
if err := r .Get (ctx , req .NamespacedName , & chaospod ); err != nil {
51
55
log .Error (err , "unable to get chaosctl" )
52
56
return ctrl.Result {}, err
@@ -56,6 +60,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
56
60
}
57
61
58
62
func main () {
63
+
59
64
ctrl .SetLogger (zap .New ())
60
65
61
66
cfg := ctrl .GetConfigOrDie ()
0 commit comments