Skip to content

WIP: Add machineconfiguration API#301

Closed
LorbusChris wants to merge 2 commits into
openshift:masterfrom
LorbusChris:machineconfig
Closed

WIP: Add machineconfiguration API#301
LorbusChris wants to merge 2 commits into
openshift:masterfrom
LorbusChris:machineconfig

Conversation

@LorbusChris
Copy link
Copy Markdown
Contributor

@LorbusChris LorbusChris commented Apr 29, 2019

This PR moves over the type definitions for the machineconfiguration API from the MCO repo, except for those depending on Ignition, which will stay in the MCO repo.

WIP

cc @runcom @sttts

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 29, 2019
Comment thread hack/lib/init.sh Outdated
Comment thread hack/lib/init.sh Outdated
@LorbusChris
Copy link
Copy Markdown
Contributor Author

Any hint is appreciated! Please also consider @kikisdeliveryservice's comments over at runcom#1 (comment)

Comment thread glide.yaml Outdated
Comment thread machineconfiguration/v1/doc.go Outdated
Comment thread machineconfiguration/v1/doc.go Outdated
@sttts
Copy link
Copy Markdown
Contributor

sttts commented May 6, 2019

Please double check (missing) +required tags and omitempty.

Comment thread machineconfiguration/v1/types.go Outdated
@LorbusChris
Copy link
Copy Markdown
Contributor Author

Please double check (missing) +required tags and omitempty.

Where can I deduce these? cc @runcom

@LorbusChris
Copy link
Copy Markdown
Contributor Author

LorbusChris commented May 6, 2019

Build should be succeeding now 🎉 only locally :/

What's still missing is this part:

Please double check (missing) +required tags and omitempty.

@LorbusChris
Copy link
Copy Markdown
Contributor Author

/test verify

@LorbusChris LorbusChris force-pushed the machineconfig branch 4 times, most recently from 170f481 to 060ad22 Compare May 6, 2019 19:34
@LorbusChris
Copy link
Copy Markdown
Contributor Author

Running hack/update-protobuf.sh locally as suggested by prow yields no changes (as expected that is, b/c I already ran and commited make generate which includes this).

Why is it still not working now?

@LorbusChris
Copy link
Copy Markdown
Contributor Author

/retest

@LorbusChris LorbusChris force-pushed the machineconfig branch 3 times, most recently from 060ad22 to 6f704f4 Compare May 7, 2019 12:03
Comment thread glide.yaml Outdated
Comment thread authorization/v1/generated.pb.go Outdated
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 13, 2019
@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LorbusChris
To complete the pull request process, please assign derekwaynecarr
You can assign the PR to them by writing /assign @derekwaynecarr in a comment when ready.

The full list of commands accepted by this bot can be found 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

@LorbusChris LorbusChris changed the title Add machineconfiguration API [WIP] Add machineconfiguration API Jun 13, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 13, 2019
@LorbusChris LorbusChris force-pushed the machineconfig branch 4 times, most recently from e886845 to b9fac8e Compare June 14, 2019 17:18
@LorbusChris LorbusChris changed the title [WIP] Add machineconfiguration API Add machineconfiguration API Jun 14, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 14, 2019
@LorbusChris LorbusChris force-pushed the machineconfig branch 2 times, most recently from 400c23a to 4535328 Compare June 20, 2019 14:47
@LorbusChris
Copy link
Copy Markdown
Contributor Author

LorbusChris commented Jun 20, 2019

This is ready for another round of reviews

Comment thread machineconfiguration/v1/register.go Outdated
Comment thread machineconfiguration/v1/types.go Outdated
CloudProviderConfig string `json:"cloudProviderConfig"`

// The openshift platform, e.g. "libvirt", "openstack", "aws", or "none"
Platform string `json:"platform"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do right away, why followup, same rules applies.

Comment thread machineconfiguration/v1/types.go Outdated
// etcdDiscoveryDomain specifies the etcd discovery domain
EtcdDiscoveryDomain string `json:"etcdDiscoveryDomain"`

// TODO: Investigate using string for CA data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string is being used in other places, so I'd prefer we keep it consistent.

Copy link
Copy Markdown
Contributor Author

@LorbusChris LorbusChris Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaiu v1 has already been released, albeit from the mco repo, and not this one. Can I still change this then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same goes for the KubeletConfig type below

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we talked about: the use of RawExtensions instead of an explicit kubelet config type will not change the wire format. So that's possible and should be done.


// pullSecret is the default pull secret that needs to be installed
// on all machines.
PullSecret *corev1.ObjectReference `json:"pullSecret,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered using ConfigMapFileReference or ConfigMapNameReference or SecretNameReference from https://github.com/openshift/api/blob/master/config/v1/types.go ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above: Can we still change this for v1 at this point? Do we want to?
cc @runcom @cgwalters

Comment thread machineconfiguration/v1/types.go

// osImageURL is the location of the container image that contains the OS update payload.
// It is sourced from configmap/machine-config-osimageurl
OSImageURL string `json:"osImageURL"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean sourced from if it's a reference why not using ConfigMapNameReference ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string value is taken from cm/machine-config-osimageurl.data.osImageURL

Comment thread machineconfiguration/v1/types.go Outdated
// KubeletConfigSpec defines the desired state of KubeletConfig
type KubeletConfigSpec struct {
MachineConfigPoolSelector *metav1.LabelSelector `json:"machineConfigPoolSelector,omitempty"`
KubeletConfig *kubeletconfigv1beta1.KubeletConfiguration `json:"kubeletConfig,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're exposing this as part of v1 API, postponing means you won't get a chance to do it, ever.

@LorbusChris
Copy link
Copy Markdown
Contributor Author

@soltysh I don't think we can change the types here now, as we have already released this API as v1 from the MCO repo (this PR is just a move). Please anybody correct me if I am wrong on this. cc @runcom @cgwalters @sttts .

I have addressed the other requested changes.

This commit moves over the definitions of the following resource types
in machineconfiguration/v1 from the
openshift/machine-config-operator repository:
- ContainerRuntimeConfig
- ControllerConfig
- KubeletConfig
- MachineConfigPool
Run `hack/update-deps.sh && make generate-with-container`
@LorbusChris LorbusChris changed the title Add machineconfiguration API WIP: Add machineconfiguration API Jul 3, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 3, 2019
@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Sep 25, 2019

Christian Glombek
@deads2k that's currently blocked because our types depend on ignition's types internally. we want to move to RawExtension first, before we move it over to the api repo.

/close

Feel free to re-open once that's updated.

@openshift-ci-robot
Copy link
Copy Markdown

@deads2k: Closed this PR.

Details

In response to this:

Christian Glombek
@deads2k that's currently blocked because our types depend on ignition's types internally. we want to move to RawExtension first, before we move it over to the api repo.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants