Skip to content

Commit 062eb82

Browse files
Merge pull request #1058 from openshift-cherrypick-robot/cherry-pick-1048-to-release-4.17
[release-4.17] OCPBUGS-60791: Add NetworkPolicy as a supported kind
2 parents 14f5ca0 + da1a2af commit 062eb82

File tree

8 files changed

+61
-0
lines changed

8 files changed

+61
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: default-allow-all
5+
namespace: openshift-operators
6+
annotations:
7+
include.release.openshift.io/ibm-cloud-managed: "true"
8+
include.release.openshift.io/self-managed-high-availability: "true"
9+
capability.openshift.io/name: "OperatorLifecycleManager"
10+
include.release.openshift.io/hypershift: "true"
11+
spec:
12+
podSelector: {}
13+
policyTypes:
14+
- Ingress
15+
- Egress
16+
ingress:
17+
- {}
18+
egress:
19+
- {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: default-allow-all
5+
namespace: openshift-operators
6+
annotations:
7+
include.release.openshift.io/ibm-cloud-managed: "true"
8+
include.release.openshift.io/self-managed-high-availability: "true"
9+
capability.openshift.io/name: "OperatorLifecycleManager"
10+
include.release.openshift.io/hypershift: "true"
11+
spec:
12+
podSelector: {}
13+
policyTypes:
14+
- Ingress
15+
- Egress
16+
ingress:
17+
- {}
18+
egress:
19+
- {}

microshift-manifests/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ resources:
1414
- 0000_50_olm_00-pprof-rbac.yaml
1515
- 0000_50_olm_00-pprof-secret.yaml
1616
- 0000_50_olm_00-subscriptions.crd.yaml
17+
- 0000_50_olm_01-networkpolicies.yaml
1718
- 0000_50_olm_01-olm-operator.serviceaccount.yaml
1819
- 0000_50_olm_02-olmconfig.yaml
1920
- 0000_50_olm_02-services.yaml
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: default-allow-all
5+
namespace: {{ .Values.operator_namespace }}
6+
spec:
7+
podSelector: {}
8+
policyTypes:
9+
- Ingress
10+
- Egress
11+
ingress:
12+
- {}
13+
egress:
14+
- {}

staging/operator-lifecycle-manager/pkg/controller/operators/catalog/supportedresources.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const (
1010
ConsoleQuickStartKind = "ConsoleQuickStart"
1111
ConsoleCLIDownloadKind = "ConsoleCLIDownload"
1212
ConsoleLinkKind = "ConsoleLink"
13+
NetworkPolicyKind = "NetworkPolicy"
1314
)
1415

1516
var supportedKinds = map[string]struct{}{
@@ -22,6 +23,7 @@ var supportedKinds = map[string]struct{}{
2223
ConsoleQuickStartKind: {},
2324
ConsoleCLIDownloadKind: {},
2425
ConsoleLinkKind: {},
26+
NetworkPolicyKind: {},
2527
}
2628

2729
// isSupported returns true if OLM supports this type of CustomResource.

staging/operator-registry/pkg/lib/bundle/supported_resources.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const (
2020
ConsoleQuickStartKind = "ConsoleQuickStart"
2121
ConsoleCLIDownloadKind = "ConsoleCLIDownload"
2222
ConsoleLinkKind = "ConsoleLink"
23+
NetworkPolicyKind = "NetworkPolicy"
2324
)
2425

2526
// Namespaced indicates whether the resource is namespace scoped (true) or cluster-scoped (false).
@@ -47,6 +48,7 @@ var supportedResources = map[string]Namespaced{
4748
ConsoleQuickStartKind: false,
4849
ConsoleCLIDownloadKind: false,
4950
ConsoleLinkKind: false,
51+
NetworkPolicyKind: true,
5052
}
5153

5254
// IsSupported checks if the object kind is OLM-supported and if it is namespaced

vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/catalog/supportedresources.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/supported_resources.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)