-
Notifications
You must be signed in to change notification settings - Fork 585
config/v1: add etcd discovery domain and apiserver url to Infrastructure status.
#189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config/v1: add etcd discovery domain and apiserver url to Infrastructure status.
#189
Conversation
|
at first pass looks good to me |
092fc10 to
f63e026
Compare
|
nit on omitempty /lgtm |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
f63e026 to
db1e5e0
Compare
…ructure status. - the etcd members on master machines use the `etcd discovery domain` to bootstrap the etcd cluster. - `apiserver url` Machine Config Operator currently programs the kubelets on machines to contact `https://<cluster_name>-api.<base_domain>:6443`. To move the Machine Config Operator to use these global configs, it requires `cluster_name` while `base_domain` is already present in `DNS`. But adding `cluster_name` to these global configs is not ideal, so `apiserver url` is chosen, which is available at install-time.
```console $ make generate hack/update-deepcopy.sh Generating deepcopy funcs hack/update-protobuf.sh Generating protobuf requires protoc 3.0.x. Please download and install the platform appropriate Protobuf package for your OS: https://github.com/google/protobuf/releases To skip protobuf generation, set $PROTO_OPTIONAL. 2019/01/29 12:56:07 github.com/openshift/api/apps/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:07 github.com/openshift/api/authorization/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:08 github.com/openshift/api/build/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:08 github.com/openshift/api/image/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:09 github.com/openshift/api/network/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:09 github.com/openshift/api/oauth/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:09 github.com/openshift/api/project/v1/generated.proto: warning: Import k8s.io/api/core/v1/generated.proto but not used. github.com/openshift/api/project/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:09 github.com/openshift/api/quota/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:09 github.com/openshift/api/route/v1/generated.proto: warning: Import k8s.io/api/core/v1/generated.proto but not used. github.com/openshift/api/route/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:10 github.com/openshift/api/security/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:10 github.com/openshift/api/template/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. 2019/01/29 12:56:10 github.com/openshift/api/user/v1/generated.proto: warning: Import k8s.io/apimachinery/pkg/runtime/schema/generated.proto but not used. hack/update-swagger-docs.sh Generating swagger type docs for apps/v1 at apps/v1 Generating swagger type docs for authorization/v1 at authorization/v1 Generating swagger type docs for build/v1 at build/v1 Generating swagger type docs for config/v1 at config/v1 Generating swagger type docs for image/v1 at image/v1 Generating swagger type docs for kubecontrolplane/v1 at kubecontrolplane/v1 Generating swagger type docs for legacyconfig/v1 at legacyconfig/v1 Generating swagger type docs for network/v1 at network/v1 Generating swagger type docs for oauth/v1 at oauth/v1 Generating swagger type docs for openshiftcontrolplane/v1 at openshiftcontrolplane/v1 Generating swagger type docs for operator/v1 at operator/v1 Generating swagger type docs for operator/v1alpha1 at operator/v1alpha1 Generating swagger type docs for project/v1 at project/v1 Generating swagger type docs for quota/v1 at quota/v1 Generating swagger type docs for route/v1 at route/v1 Generating swagger type docs for security/v1 at security/v1 Generating swagger type docs for servicecertsigner/v1alpha1 at servicecertsigner/v1alpha1 Generating swagger type docs for template/v1 at template/v1 Generating swagger type docs for user/v1 at user/v1 Generating swagger type docs for webconsole/v1 at webconsole/v1 ``` ```console $ go version go version go1.10.3 linux/amd64 ``` ```console $ protoc --version libprotoc 3.0.0 ```
db1e5e0 to
373f113
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, deads2k The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This updates the `Infrastructure.config.openshift.io` object to catch up with [1]. Machine Config Operator uses the `APIServerURL` to point the kubelet on machines to apiserver, and `EtcdDiscoveryDomain` to setup the etcd members to bootstrap the etcd cluster using dns discovery [2]. This is required as Machine Config Operator currently uses the `cluster-config-v1` to creates these values and as `cluster-config-v1` is getting deprecated [3], Machine Config Operator will move to using the status of `Infrastructure.config.openshift.io` for sourcing that information. [1]: openshift/api#189 [2]: https://github.com/etcd-io/etcd/blob/583763261f1c843e07c1bf7fea5fb4cfb684fe87/Documentation/op-guide/clustering.md#dns-discovery [3]: openshift#680
Since [1], the `Infrastructure.config.openshift.io` global config object contains the kube apiserver's url and the domain that needs to be used by etcd to do bootstrapping using dns discovery. The installer creates and sets the appropiate value since [2]. Therefore there is no longer a requirement for cluster_name and base_domain to create these values in template controller. [1]: openshift/api#189 [2]: openshift/installer#1155
etcd discovery domainto bootstrap the etcd cluster.apiserver urlMachine Config Operator currently programs the kubelets on machines to contacthttps://<cluster_name>-api.<base_domain>:6443.To move the Machine Config Operator to use these global configs, it requires
cluster_namewhilebase_domainis already present inDNS. But addingcluster_nametothese global configs is not ideal, so
apiserver urlis chosen, which is available at install-time./cc @smarterclayton @deads2k