Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented May 6, 2019

The kubelet (via the machine-config operator) and Kubernetes API-server operator need the internal API URI. The console operator and authentication operator need the external URI. Since the api-int split (e.g. openshift/installer@13e4b702f7, openshift/installer#1601), those are two different things, so we need two different properties.

I've deprecated the old property because it was ambiguous. We can drop it if/when we ever cut a v2 of this type.

I've avoided leading with External or Internal so these properties will all alphabetize together when rendering YAML, etc.

I've avoided Public, because that is often used in a public/private` dichotomy for security. The split was motivated by separating X.509 chains of trust, but the URIs themselves are not sensitive.

I've also taken the opportunity to change from URL to the more-generic URI, because we don't need to make a point of locator-ness and RFCs recommend using the more generic label.

We need this to address the 4.1-blocking rhbz#1706689, although this API change on its own is not sufficient to fix the bug.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 6, 2019
@spadgett
Copy link
Member

spadgett commented May 6, 2019

cc @benjaminapetersen

@wking wking force-pushed the external-api-uri branch from 71ad4d7 to b47d12f Compare May 6, 2019 16:34
@sdodson
Copy link
Member

sdodson commented May 6, 2019

@openshift/api-reviewers

@smarterclayton
Copy link
Contributor

Comments added

@wking wking force-pushed the external-api-uri branch from b47d12f to a33660b Compare May 6, 2019 17:12
wking added a commit to wking/openshift-api that referenced this pull request May 6, 2019
…rverURL

The kubelet (via the machine-config operator [1]) and Kubernetes
API-server operator [2] need the internal API URI.  The console
operator [3] and authentication operator [4] need the external URI.
Since the api-int split (e.g. openshift/installer@13e4b702f7,
data/aws: create an api-int dns name, 2019-04-11,
openshift/installer#1601), those are two different things, so we need
two different properties.

I'd originally proposed deprecating the old property because it was
ambiguous, but Clayton suggested using the generic name for the
external URI because the internal URI is only intended for a small
subset of components [5].

I've avoided leading with Internal so these properties will all
alphabetize together when rendering YAML, etc.

I've avoided "Private", because that is often used in a public/private
dichotomy for security.  The split was motivated by separating X.509
chains of trust, but the URIs themselves are not sensitive.

I'd originally proposed changing URL to URI, because we don't need to
make a point of locator-ness and RFCs recommend using the more generic
label [5,6].  But Sam and Clayton prefer sticking with URL, because it
is used more widely within OpenShift [7,8].

[1]: https://github.com/openshift/machine-config-operator/blob/2bd29e5005fb6f438f1b1c512176c3f7e5cf9e47/pkg/operator/operator.go#L393
[2]: https://github.com/openshift/cluster-kube-apiserver-operator/blob/cbcb3f403f674dd8d0b590d770c0ebf6ecb75f17/pkg/operator/certrotationcontroller/externalloadbalancer.go#L18
[3]: https://github.com/openshift/console-operator/blob/fc721a6990b6ca27efb60062cf5e9d620ec0ab01/pkg/console/subresource/configmap/configmap.go#L59
[4]: https://github.com/openshift/cluster-authentication-operator/blob/96643e4b29452f9ad20f7b90fc0794ffc3006fa2/pkg/operator2/oauth.go#L117
[5]: openshift#308 (comment)
[5]: https://tools.ietf.org/html/rfc3305#section-2.2
[6]: https://tools.ietf.org/html/rfc3986#section-1.1.3
[7]: openshift#308 (comment)
[8]: openshift#308 (comment)
wking added 2 commits May 6, 2019 13:40
…rverURL

The kubelet (via the machine-config operator [1]) and Kubernetes
API-server operator [2] need the internal API URI.  The console
operator [3] and authentication operator [4] need the external URI.
Since the api-int split (e.g. openshift/installer@13e4b702f7,
data/aws: create an api-int dns name, 2019-04-11,
openshift/installer#1601), those are two different things, so we need
two different properties.

I'd originally proposed deprecating the old property because it was
ambiguous, but Clayton suggested using the generic name for the
external URI because the internal URI is only intended for a small
subset of components [5].

I've avoided leading with Internal so these properties will all
alphabetize together when rendering YAML, etc.

I've avoided "Private", because that is often used in a public/private
dichotomy for security.  The split was motivated by separating X.509
chains of trust, but the URIs themselves are not sensitive.

I'd originally proposed changing URL to URI, because we don't need to
make a point of locator-ness and RFCs recommend using the more generic
label [5,6].  But Sam and Clayton prefer sticking with URL, because it
is used more widely within OpenShift [7,8].

[1]: https://github.com/openshift/machine-config-operator/blob/2bd29e5005fb6f438f1b1c512176c3f7e5cf9e47/pkg/operator/operator.go#L393
[2]: https://github.com/openshift/cluster-kube-apiserver-operator/blob/cbcb3f403f674dd8d0b590d770c0ebf6ecb75f17/pkg/operator/certrotationcontroller/externalloadbalancer.go#L18
[3]: https://github.com/openshift/console-operator/blob/fc721a6990b6ca27efb60062cf5e9d620ec0ab01/pkg/console/subresource/configmap/configmap.go#L59
[4]: https://github.com/openshift/cluster-authentication-operator/blob/96643e4b29452f9ad20f7b90fc0794ffc3006fa2/pkg/operator2/oauth.go#L117
[5]: openshift#308 (comment)
[5]: https://tools.ietf.org/html/rfc3305#section-2.2
[6]: https://tools.ietf.org/html/rfc3986#section-1.1.3
[7]: openshift#308 (comment)
[8]: openshift#308 (comment)
With:

  $ make generate
@wking wking force-pushed the external-api-uri branch from a33660b to fdc055c Compare May 6, 2019 20:41
@smarterclayton
Copy link
Contributor

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 7, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 10f647f into openshift:master May 7, 2019
abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request May 7, 2019
Brins in changes from openshift/api#308

```console
$ dep version
dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false
$ dep ensure -update github.com/openshift/api github.com/openshift/client-go
```
@wking wking deleted the external-api-uri branch May 7, 2019 13:04
abhinavdahiya added a commit to abhinavdahiya/machine-config-operator that referenced this pull request May 7, 2019
Brins in changes from openshift/api#308

```console
$ dep version
dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false
$ dep ensure -update github.com/openshift/api github.com/openshift/client-go
```
abhinavdahiya added a commit to abhinavdahiya/machine-config-operator that referenced this pull request May 7, 2019
Catch up to the api change introduced in openshift/api#308
The migration is required until installer correctly sets up the infrastructure object in openshift/installer#1718
abhinavdahiya added a commit to abhinavdahiya/machine-config-operator that referenced this pull request May 7, 2019
Brins in changes from openshift/api#308

```console
$ dep version
dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false
$ dep ensure -update github.com/openshift/api github.com/openshift/client-go
```
abhinavdahiya added a commit to abhinavdahiya/machine-config-operator that referenced this pull request May 7, 2019
abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request May 7, 2019
Catch up to the api change introduced in [1]

PR [1] introduces breaking change for `.status.apiServerURL` therefore, this only adds the new
field `.status.apiServerInternalURL` so that consumers like KAS-O and MCO can move to this new field and
then installer can move the `.status.apiServerURL` to public url for Kubernetes API.

[1]: openshift/api#308
imcleod added a commit to openshift/machine-config-operator that referenced this pull request May 8, 2019
Bug 1706689: pkg: Catch up to the api change introduced in openshift/api#308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants