@@ -52,6 +52,8 @@ func NewCR(chopClient chopClientSet.Interface, kubeClient kube.Interface) *CR {
5252}
5353
5454func (c * CR ) Get (ctx context.Context , namespace , name string ) (api.ICustomResource , error ) {
55+ ctx = k8sCtx (ctx )
56+
5557 chi , err := c .getCR (ctx , namespace , name )
5658 if err != nil {
5759 return nil , err
@@ -65,10 +67,12 @@ func (c *CR) Get(ctx context.Context, namespace, name string) (api.ICustomResour
6567}
6668
6769func (c * CR ) getCR (ctx context.Context , namespace , name string ) (* api.ClickHouseInstallation , error ) {
70+ ctx = k8sCtx (ctx )
6871 return c .chopClient .ClickhouseV1 ().ClickHouseInstallations (namespace ).Get (ctx , name , controller .NewGetOptions ())
6972}
7073
7174func (c * CR ) getCM (ctx context.Context , chi api.ICustomResource ) (* core.ConfigMap , error ) {
75+ ctx = k8sCtx (ctx )
7276 return NewConfigMap (c .kubeClient ).Get (ctx , c .buildCMNamespace (chi ), c .buildCMName (chi ))
7377}
7478
@@ -99,7 +103,7 @@ func (c *CR) buildCR(chi *api.ClickHouseInstallation, cm *core.ConfigMap) *api.C
99103// StatusUpdate updates CR object's Status
100104func (c * CR ) StatusUpdate (ctx context.Context , cr api.ICustomResource , opts commonTypes.UpdateStatusOptions ) error {
101105 if util .IsContextDone (ctx ) {
102- log .V (2 ).Info ("task is done" )
106+ log .V (1 ).Info ("Reconcile is aborted. cr: %s " , cr . GetName () )
103107 return nil
104108 }
105109
@@ -130,7 +134,7 @@ func (c *CR) statusUpdateRetry(ctx context.Context, cr api.ICustomResource, opts
130134// statusUpdateProcess updates CR object's Status
131135func (c * CR ) statusUpdateProcess (ctx context.Context , icr api.ICustomResource , opts commonTypes.UpdateStatusOptions ) error {
132136 if util .IsContextDone (ctx ) {
133- log .V (2 ).Info ("task is done" )
137+ log .V (1 ).Info ("Reconcile is aborted. cr: %s " , icr . GetName () )
134138 return nil
135139 }
136140
0 commit comments