Skip to content

Commit

Permalink
Fix controlplane controller
Browse files Browse the repository at this point in the history
Remove storageclass healthcheck and fix nil pointer deref on infrastructure status
  • Loading branch information
Nuckal777 committed Jul 24, 2024
1 parent cc7990e commit 3c35599
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions pkg/controller/controlplane/valuesprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ func (vp *valuesProvider) GetConfigChartValues(
cp *extensionsv1alpha1.ControlPlane,
cluster *extensionscontroller.Cluster,
) (map[string]interface{}, error) {
infrastructureStatus := &apismetal.InfrastructureStatus{}
if _, _, err := vp.decoder.Decode(cp.Spec.InfrastructureProviderStatus.Raw, nil, infrastructureStatus); err != nil {
return nil, fmt.Errorf("failed to decode infrastructure status: %w", err)
}
// Collect config chart values
return map[string]interface{}{
metal.ClusterFieldName: cluster.ObjectMeta.Name,
Expand Down
6 changes: 0 additions & 6 deletions pkg/controller/controlplane/valuesprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ var _ = Describe("Valueprovider Reconcile", func() {
}),
},
},
InfrastructureProviderStatus: &runtime.RawExtension{
Raw: encode(&apismetal.InfrastructureStatus{}),
},
},
}
Expect(k8sClient.Create(ctx, cp)).To(Succeed())
Expand Down Expand Up @@ -129,9 +126,6 @@ var _ = Describe("Valueprovider Reconcile", func() {
}),
},
},
InfrastructureProviderStatus: &runtime.RawExtension{
Raw: encode(&apismetal.InfrastructureStatus{}),
},
},
}
providerCloudProfile := &apismetal.CloudProfileConfig{}
Expand Down
4 changes: 0 additions & 4 deletions pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ func RegisterHealthChecks(ctx context.Context, mgr manager.Manager, opts healthc
ConditionType: string(gardencorev1beta1.ShootSystemComponentsHealthy),
HealthCheck: general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName),
},
{
ConditionType: string(gardencorev1beta1.ShootSystemComponentsHealthy),
HealthCheck: general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName),
},
},
sets.New[gardencorev1beta1.ConditionType](gardencorev1beta1.ShootSystemComponentsHealthy),
); err != nil {
Expand Down

0 comments on commit 3c35599

Please sign in to comment.