Skip to content

Commit cae8c93

Browse files
author
Per Goncalves da Silva
committed
This will fail verify. Testing upstream fix to root out any other issues until I can downsync the bug fix commit
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 54ecce8 commit cae8c93

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

manifests/0000_50_olm_01-networkpolicies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ spec:
126126
- protocol: TCP
127127
port: 5443
128128
egress:
129+
- ports:
130+
- port: 6443
131+
protocol: TCP
129132
- ports:
130133
- port: dns-tcp
131134
protocol: TCP

microshift-manifests/0000_50_olm_01-networkpolicies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ spec:
126126
- protocol: TCP
127127
port: 5443
128128
egress:
129+
- ports:
130+
- port: 6443
131+
protocol: TCP
129132
- ports:
130133
- port: dns-tcp
131134
protocol: TCP

staging/operator-lifecycle-manager/deploy/chart/templates/0000_50_olm_01-networkpolicies.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ spec:
6262
- protocol: TCP
6363
port: {{ .Values.package.service.internalPort }}
6464
egress:
65+
- {{ .Values.networkPolicy.kubeAPIServer | toYaml | nindent 6 | trimSuffix "\n" }}
6566
- {{ .Values.networkPolicy.dns | toYaml | nindent 6 | trimSuffix "\n" }}
6667
- ports:
6768
- protocol: TCP

staging/operator-lifecycle-manager/pkg/controller/registry/reconciler/helpers.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package reconciler
22

33
import (
44
"fmt"
5+
"github.com/operator-framework/api/pkg/operators/v1alpha1"
56

67
corev1 "k8s.io/api/core/v1"
78
networkingv1 "k8s.io/api/networking/v1"
@@ -16,7 +17,7 @@ import (
1617
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/ownerutil"
1718
)
1819

19-
func DesiredGRPCServerNetworkPolicy(catalogSource client.Object, matchLabels map[string]string) *networkingv1.NetworkPolicy {
20+
func DesiredGRPCServerNetworkPolicy(catalogSource *v1alpha1.CatalogSource, matchLabels map[string]string) *networkingv1.NetworkPolicy {
2021
np := &networkingv1.NetworkPolicy{
2122
ObjectMeta: metav1.ObjectMeta{
2223
Name: fmt.Sprintf("%s-grpc-server", catalogSource.GetName()),
@@ -43,6 +44,19 @@ func DesiredGRPCServerNetworkPolicy(catalogSource client.Object, matchLabels map
4344
},
4445
},
4546
}
47+
// Allow egress to kube-apiserver from configmap backed catalog sources
48+
if catalogSource.Spec.SourceType == v1alpha1.SourceTypeConfigmap || catalogSource.Spec.SourceType == v1alpha1.SourceTypeInternal {
49+
np.Spec.Egress = []networkingv1.NetworkPolicyEgressRule{
50+
{
51+
Ports: []networkingv1.NetworkPolicyPort{
52+
{
53+
Protocol: ptr.To(corev1.ProtocolTCP),
54+
Port: ptr.To(intstr.FromInt32(6443)),
55+
},
56+
},
57+
},
58+
}
59+
}
4660
ownerutil.AddOwner(np, catalogSource, false, false)
4761
return np
4862
}

vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry/reconciler/helpers.go

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)