Skip to content
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

Implement read current state of a managed topology #4971

Closed
fabriziopandini opened this issue Jul 20, 2021 · 4 comments · Fixed by #5045
Closed

Implement read current state of a managed topology #4971

fabriziopandini opened this issue Jul 20, 2021 · 4 comments · Fixed by #5045
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@fabriziopandini
Copy link
Member

Detailed Description
This is part of the activities for the implementation of the ClusterClass proposal.

As part of the ManageTopologyController reconcile loop, we want to read a ClusterClass and all the referenced templates

This step should return a struct including

  • Cluster (from scaffolding)
  • ClusterInfrastructure (Get*)
  • ClusterControlPlane (Get*)
  • ControlPlaneMachineInfrastructureTemplate (Get*)
  • List of machine deployments with the cluster.x-k8s.io/cluster-name and cluster.x-k8s.io/topology label
    • Then, for each MachineDeployment
      • MachineBootstrapTemplate (Get*)
      • MachineInfrastructureTemplate (Get*)

Anything else you would like to add:

This could be implemented only after #4933 is completed.

Notes:

  • Before using a reference it is important to call ConvertReferenceAPIContract in order to properly handle APIVersions/contract - -- upgrades.
  • TBD if in case a reference is converted to a newer API contract, the Cluster/MachineDeployment/ControlPlane objects containing the reference should be patched (the existing controllers are already taking care of this; in case we are going to implement this, feel free to tackle this in a separated PR).
  • ControlPlaneTemplate object might or might not have a MachineInfrastructureTemplate; in order to discover this, it is required to inspect the template spec using unstructured utils (See 🌱 Extend the ControlPlane contract defining version and infrastructure machine fields for ClusterClass compat #4949 for the related contract changes).
  • All the get reading templates/provider types (Get*) must use the unstructured caching client and return unstructured; please note that the external package already provides a Get utility that can be used for this scope.
  • After reading the ClusterInfrastructure object and the ClusterControlPlane object it is required to set up a watch on the corresponding types.
  • In case of missing objects the read operation should fail; this probably will be changed in future if/when implementing support for reconciling a subset of a topology.
  • Other errors (e.g. API server connection errors) must always trigger failure for the operation.

/kind feature
/milestone v0.4

@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Jul 20, 2021
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 20, 2021
@fabriziopandini
Copy link
Member Author

/assign @killianmuldoon

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: GitHub didn't allow me to assign the following users: killianmuldoon.

Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @killianmuldoon

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.

@fabriziopandini fabriziopandini self-assigned this Jul 20, 2021
@fabriziopandini
Copy link
Member Author

(assigning to myself given that Killian is not yet kubernetes-sigs member)

@sbueringer
Copy link
Member

sbueringer commented Jul 21, 2021

@fabriziopandini Just fyi, afaik you cannot assign killian but @killianmuldoon can assign himself. Just found that out with someone from my old company.

Apparently you cannot assign somebody outside of the org, except:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants