@@ -61,7 +61,7 @@ func NewExtensionHandlers(client client.Client) *ExtensionHandlers {
61
61
// control the hook behaviour during a test.
62
62
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
63
63
func (m * ExtensionHandlers ) DoBeforeClusterCreate (ctx context.Context , request * runtimehooksv1.BeforeClusterCreateRequest , response * runtimehooksv1.BeforeClusterCreateResponse ) {
64
- log := ctrl .LoggerFrom (ctx )
64
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
65
65
log .Info ("BeforeClusterCreate is called" )
66
66
67
67
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .BeforeClusterCreate , request .GetSettings (), response ); err != nil {
@@ -80,7 +80,7 @@ func (m *ExtensionHandlers) DoBeforeClusterCreate(ctx context.Context, request *
80
80
// control the hook behaviour during a test.
81
81
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
82
82
func (m * ExtensionHandlers ) DoBeforeClusterUpgrade (ctx context.Context , request * runtimehooksv1.BeforeClusterUpgradeRequest , response * runtimehooksv1.BeforeClusterUpgradeResponse ) {
83
- log := ctrl .LoggerFrom (ctx )
83
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
84
84
log .Info ("BeforeClusterUpgrade is called" )
85
85
86
86
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .BeforeClusterUpgrade , request .GetSettings (), response ); err != nil {
@@ -100,7 +100,7 @@ func (m *ExtensionHandlers) DoBeforeClusterUpgrade(ctx context.Context, request
100
100
// control the hook behaviour during a test.
101
101
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
102
102
func (m * ExtensionHandlers ) DoAfterControlPlaneInitialized (ctx context.Context , request * runtimehooksv1.AfterControlPlaneInitializedRequest , response * runtimehooksv1.AfterControlPlaneInitializedResponse ) {
103
- log := ctrl .LoggerFrom (ctx )
103
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
104
104
log .Info ("AfterControlPlaneInitialized is called" )
105
105
106
106
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .AfterControlPlaneInitialized , request .GetSettings (), response ); err != nil {
@@ -120,7 +120,7 @@ func (m *ExtensionHandlers) DoAfterControlPlaneInitialized(ctx context.Context,
120
120
// control the hook behaviour during a test.
121
121
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
122
122
func (m * ExtensionHandlers ) DoAfterControlPlaneUpgrade (ctx context.Context , request * runtimehooksv1.AfterControlPlaneUpgradeRequest , response * runtimehooksv1.AfterControlPlaneUpgradeResponse ) {
123
- log := ctrl .LoggerFrom (ctx )
123
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
124
124
log .Info ("AfterControlPlaneUpgrade is called" )
125
125
126
126
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .AfterControlPlaneUpgrade , request .GetSettings (), response ); err != nil {
@@ -140,7 +140,7 @@ func (m *ExtensionHandlers) DoAfterControlPlaneUpgrade(ctx context.Context, requ
140
140
// control the hook behaviour during a test.
141
141
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
142
142
func (m * ExtensionHandlers ) DoAfterClusterUpgrade (ctx context.Context , request * runtimehooksv1.AfterClusterUpgradeRequest , response * runtimehooksv1.AfterClusterUpgradeResponse ) {
143
- log := ctrl .LoggerFrom (ctx )
143
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
144
144
log .Info ("AfterClusterUpgrade is called" )
145
145
146
146
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .AfterClusterUpgrade , request .GetSettings (), response ); err != nil {
@@ -160,7 +160,7 @@ func (m *ExtensionHandlers) DoAfterClusterUpgrade(ctx context.Context, request *
160
160
// control the hook behaviour during a test.
161
161
// NOTE: custom RuntimeExtension, must implement the body of this func according to the specific use case.
162
162
func (m * ExtensionHandlers ) DoBeforeClusterDelete (ctx context.Context , request * runtimehooksv1.BeforeClusterDeleteRequest , response * runtimehooksv1.BeforeClusterDeleteResponse ) {
163
- log := ctrl .LoggerFrom (ctx )
163
+ log := ctrl .LoggerFrom (ctx ). WithValues ( "Cluster" , klog . KObj ( & request . Cluster ))
164
164
log .Info ("BeforeClusterDelete is called" )
165
165
166
166
if err := m .readResponseFromConfigMap (ctx , & request .Cluster , runtimehooksv1 .BeforeClusterDelete , request .GetSettings (), response ); err != nil {
0 commit comments