Bug 1717996 - api-allow-http-and-https network policy example incorrect
Summary: api-allow-http-and-https network policy example incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.1.z
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-06 15:50 UTC by Samuel Padgett
Modified: 2019-06-26 08:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the web console NetworkPolicy YAML template `api-allow-http-and-https` was incorrect and couldn't be created without modifications. This has been fixed, and the template now works properly as-is.
Clone Of:
Environment:
Last Closed: 2019-06-26 08:50:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1589 None None None 2019-06-26 08:51:05 UTC

Description Samuel Padgett 2019-06-06 15:50:39 UTC
The network policy example YAML template is incorrect. It should be

```
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: api-allow-http-and-https
  namespace: default
spec:
  podSelector:
    matchLabels:
      app: api
  ingress:
    - from:
        - podSelector:
            matchLabels:
              role: monitoring
      ports:
        - protocol: TCP
          port: 80
        - protocol: TCP
          port: 443
```

Comment 1 Samuel Padgett 2019-06-06 15:51:20 UTC
https://github.com/openshift/console/pull/1640

Comment 3 Yadan Pei 2019-06-21 02:27:15 UTC
NetworkPolicy example 'api-allow-http-and-https' is correct now.


apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: api-allow-http-and-https
  namespace: yapei1
spec:
  podSelector:
    matchLabels:
      app: api
  ingress:
    - from:
        - podSelector:
            matchLabels:
              role: monitoring
      ports:
        - protocol: TCP
          port: 80
        - protocol: TCP
          port: 443

Verified on 4.1.0-0.nightly-2019-06-20-015058

Comment 5 errata-xmlrpc 2019-06-26 08:50:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1589


Note You need to log in before you can comment on or make changes to this bug.