Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Nuckal777 committed Jul 24, 2024
1 parent cc7990e commit 3c35599
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
@@ -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,
6 changes: 0 additions & 6 deletions pkg/controller/controlplane/valuesprovider_test.go
Original file line number Diff line number Diff line change
@@ -74,9 +74,6 @@ var _ = Describe("Valueprovider Reconcile", func() {
}),
},
},
InfrastructureProviderStatus: &runtime.RawExtension{
Raw: encode(&apismetal.InfrastructureStatus{}),
},
},
}
Expect(k8sClient.Create(ctx, cp)).To(Succeed())
@@ -129,9 +126,6 @@ var _ = Describe("Valueprovider Reconcile", func() {
}),
},
},
InfrastructureProviderStatus: &runtime.RawExtension{
Raw: encode(&apismetal.InfrastructureStatus{}),
},
},
}
providerCloudProfile := &apismetal.CloudProfileConfig{}
4 changes: 0 additions & 4 deletions pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
@@ -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 {

0 comments on commit 3c35599

Please sign in to comment.