Bug 1729310

Summary: dns.config.openshift.io does not make it clear it is read-only
Product: OpenShift Container Platform Reporter: Ben Parees <bparees>
Component: NetworkingAssignee: Dan Mace <dmace>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: aos-bugs
Version: 4.2.0   
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:33:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Parees 2019-07-11 21:48:34 UTC
Our docs state that the dns config resource should not be edited:

You cannot modify the DNS settings for your cluster. You can view the DNS Operator status.


But the api doc makes it seem like you can:

 oc explain dns.spec
KIND:     DNS
VERSION:  config.openshift.io/v1

RESOURCE: spec <Object>

DESCRIPTION:
     spec holds user settable values for configuration

FIELDS:
   baseDomain	<string>
     baseDomain is the base domain of the cluster. All managed DNS records will
     be sub-domains of this base. For example, given the base domain
     `openshift.example.com`, an API server DNS record may be created for
     `cluster-api.openshift.example.com`.

   privateZone	<Object>
     privateZone is the location where all the DNS records that are only
     available internally to the cluster exist. If this field is nil, no private
     records should be created.

   publicZone	<Object>
     publicZone is the location where all the DNS records that are publicly
     accessible to the internet exist. If this field is nil, no public records
     should be created.


The api doc should make it clear these fields should not be edited (and even better we should also enforce that they are not edited).

Comment 2 Hongan Li 2019-07-29 08:52:13 UTC
Verified with 4.2.0-0.nightly-2019-07-28-222114 and issue has been fixed.

$ oc explain dns.spec --api-version=config.openshift.io/v1
KIND:     DNS
VERSION:  config.openshift.io/v1

RESOURCE: spec <Object>

DESCRIPTION:
     spec holds user settable values for configuration

FIELDS:
   baseDomain	<string> -required-
     baseDomain is the base domain of the cluster. All managed DNS records will
     be sub-domains of this base. For example, given the base domain
     `openshift.example.com`, an API server DNS record may be created for
     `cluster-api.openshift.example.com`.

   privateZone	<Object>
     privateZone is the location where all the DNS records that are only
     available internally to the cluster exist. If this field is nil, no private
     records should be created. Once set, this field cannot be changed.

   publicZone	<Object>
     publicZone is the location where all the DNS records that are publicly
     accessible to the internet exist. If this field is nil, no public records
     should be created. Once set, this field cannot be changed.

Comment 3 errata-xmlrpc 2019-10-16 06:33:27 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:2922