Skip to content

Commit

Permalink
Always reflect kube-root-ca.crt
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 committed Sep 22, 2023
1 parent 9c91154 commit c12d7b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/virtualKubelet/reflection/configuration/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ func (ncr *NamespacedConfigMapReflector) Handle(ctx context.Context, name string
return nil
}

// ShouldSkipReflection returns whether the reflection of the given object should be skipped.
func (ncr *NamespacedConfigMapReflector) ShouldSkipReflection(obj metav1.Object) (bool, error) {
// If the object is the root CA configmap, the object must always be reflected.
if obj.GetName() == forge.RootCAConfigMapName {
return false, nil
}
return ncr.NamespacedReflector.ShouldSkipReflection(obj)
}

// List returns the list of objects.
func (ncr *NamespacedConfigMapReflector) List() ([]interface{}, error) {
return virtualkubelet.List[virtualkubelet.Lister[*corev1.ConfigMap], *corev1.ConfigMap](
Expand Down

0 comments on commit c12d7b5

Please sign in to comment.