Skip to content

Commit

Permalink
Review improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ReToCode committed Dec 15, 2023
1 parent 7a6e5d0 commit 2a72a55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/generator/ingress_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ func (translator *IngressTranslator) buildTrustChain(logger *zap.SugaredLogger)
} else {
logger.Debugf("Adding CA bundle from Configmap %s/%s to trust chain", system.Namespace(), cm.Name)
if len(trustChain) > 0 {
// make sure we always have at least one newline between bundles, multiple ones are ok
// Make sure we always have at least one newline between bundles, multiple ones are ok
trustChain = append(trustChain, newline...)
}
trustChain = append(trustChain, []byte(bundle)...)
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/ingress/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
if err != nil {
return nil, err
}
return nsConfigmapInformer.Lister().ConfigMaps(system.Namespace()).List(selector)
return nsConfigmapInformer.Lister().List(selector)
},
func(ns, name string) (*corev1.Endpoints, error) {
return endpointsInformer.Lister().Endpoints(ns).Get(name)
Expand Down Expand Up @@ -236,7 +236,7 @@ func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
if err != nil {
return nil, err
}
return nsConfigmapInformer.Lister().ConfigMaps(system.Namespace()).List(selector)
return nsConfigmapInformer.Lister().List(selector)
},
func(ns, name string) (*corev1.Endpoints, error) {
return kubernetesClient.CoreV1().Endpoints(ns).Get(ctx, name, metav1.GetOptions{})
Expand Down Expand Up @@ -386,7 +386,7 @@ func getSecretInformer(ctx context.Context) v1.SecretInformer {

func getLabelSelector(label string) (labels.Selector, error) {
selector := labels.NewSelector()
req, err := labels.NewRequirement(label, selection.Exists, make([]string, 0))
req, err := labels.NewRequirement(label, selection.Exists, nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 2a72a55

Please sign in to comment.