Skip to content

Commit f230c21

Browse files
kabicinKirby Chin
authored andcommitted
Update webspherelibertyapplication_controller.go
1 parent e9de870 commit f230c21

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/webspherelibertyapplication_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ func (r *ReconcileWebSphereLiberty) Reconcile(ctx context.Context, request ctrl.
471471
reqLogger.Info("Failed to retrieve endpoints for kubernetes service in the default namespace. Using more permissive rule.")
472472
}
473473
apiServerNetworkPolicy.Spec.Egress = append(apiServerNetworkPolicy.Spec.Egress, rule)
474+
apiServerNetworkPolicy.Labels = ba.GetLabels()
475+
apiServerNetworkPolicy.Annotations = oputils.MergeMaps(apiServerNetworkPolicy.Annotations, ba.GetAnnotations())
476+
apiServerNetworkPolicy.Spec.PolicyTypes = []networkingv1.PolicyType{networkingv1.PolicyTypeEgress}
474477
err = r.CreateOrUpdate(apiServerNetworkPolicy, instance, func() error {
475478
apiServerNetworkPolicy.Spec.PodSelector = metav1.LabelSelector{
476479
MatchLabels: map[string]string{

0 commit comments

Comments
 (0)