-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Start implementing create workflow for KubeadmControlPlane controller #1856
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: detiber The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e0639c9
to
d81f46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any interest in merging the field changes & CRD changes before working on the implementation? could reduce the size of the PR as I expect this will be growing significantly. Anything we can do to merge things piecemeal will be helpful to reviewers
Yes, I can break this up. I'd like to finish up rounding out a few of the rough edges first, though. |
@ncdc @chuckha refactored into smaller (and should be easier to review PRs). With the following configs, I can stand up a single control plane instance: ---
kind: AWSCluster
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
metadata:
name: test-cluster
namespace: default
spec:
region: us-east-1
---
kind: Cluster
apiVersion: cluster.x-k8s.io/v1alpha3
metadata:
name: test-cluster
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks: ["192.168.0.0/16"]
infrastructureRef:
kind: AWSCluster
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
name: test-cluster
namespace: default
controlPlaneRef:
kind: KubeadmControlPlane
apiVersion: cluster.x-k8s.io/v1alpha3
name: kcp-1
namespace: default
---
kind: AWSMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
metadata:
name: kcp-infra-template
namespace: default
spec:
template:
spec:
instanceType: t3.large
iamInstanceProfile: "control-plane.cluster-api-provider-aws.sigs.k8s.io"
---
kind: KubeadmControlPlane
apiVersion: cluster.x-k8s.io/v1alpha3
metadata:
name: kcp-1
namespace: default
labels:
cluster.x-k8s.io/cluster-name: test-cluster
spec:
infrastructureTemplate:
kind: AWSMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
name: kcp-infra-template
namespace: default
kubeadmConfigSpec:
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.local_hostname }}'
kubeletExtraArgs:
cloud-provider: aws
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: aws
controllerManager:
extraArgs:
cloud-provider: aws
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.local_hostname }}'
kubeletExtraArgs:
cloud-provider: aws
version: v1.16.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks really great!
266eef8
to
0ef9660
Compare
/hold |
/hold cancel |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Update API Types for KubeadmControlPlane - Add Spec.ControlPlaneRef to Cluster - Add Status.ControlPlaneReady to Cluster - Remove omitempty from KubeadmControlPlane.Status.Initialized and KubeadmControlPlane.Status.Ready - [Cluster Controller] Add external reconciliation of Control Plane - Add reconcileControlPlane method to phases - Only reconcile the Kubeconfig if Spec.ControlPlaneRef is not set - Adds an IsInitialized function to the external utilities - Migrate bootstrap secret utilities for additional use in KubeadmControlPlane - Move secret utilities from bootstrap/kubeadm/internal/cluster to util/secret - Refactor to remove hardcoded ownerRefs to KubeadmConfig - Update kubeconfig utils to handle different ownerRefs - [KubeadmControlPlane] Fetch owning cluster - [KubeadmControlPlane] build and set Machine selector - [KubeadmControlPlane] fetch list of owned Machines - [KubeadmControlPlane] Create Cluster secrets if needed - [KubeadmControlPlane] Handle initialization of first control plane instance
/lgtm |
What this PR does / why we need it:
Related to: #1756