Skip to content

feat: K3s controlplane and intel providers #78

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

Merged
merged 17 commits into from
May 28, 2025
Merged

Conversation

togashidm
Copy link
Contributor

@togashidm togashidm commented May 23, 2025

Description

This PR implements the k3s provider components methods that to support the creation of a workload k3s cluster with Intelmachine based on baseline-k3s cluster template.

Fixes # (issue)

Any Newly Introduced Dependencies

no

How Has This Been Tested?

test was evaluated within the cluster-test repo where cluster orchestrator components can be deployed and integrated. No smoke tests were done, yet.
The test was then comprised on:

  • deployment of cluster manager/ cluster manager template controller from this repo on the latest commit
  • deployment cluster connect gateway components from its repo at the main branch
  • deployment intel infra-provider components from its repo at the main branch

NOTE: The implementation on EMF is not ready, therefore, validation on the Orchestrator is not possible at moment

kubectl exec -it cluster-agent-0 -- kubectl get po -A
Defaulted container "cluster-agent" out of: cluster-agent, init-copy (init)
NAMESPACE          NAME                                      READY   STATUS      RESTARTS   AGE
calico-apiserver   calico-apiserver-cf49846df-lt8np          1/1     Running     0          27s
calico-apiserver   calico-apiserver-cf49846df-xn48s          0/1     Running     0          27s
calico-system      calico-kube-controllers-c9597565d-zh6bn   1/1     Running     0          23s
calico-system      calico-node-gkcb4                         0/1     Init:1/2    0          23s
calico-system      calico-typha-7f5bbf76c9-7xcb9             1/1     Running     0          23s
calico-system      csi-node-driver-7hc8s                     2/2     Running     0          23s
calico-system      goldmane-76f67ff5f5-ctxjb                 0/1     Running     0          24s
calico-system      whisker-7f7dcbddd-424wf                   0/2     Completed   0          23s
kube-system        connect-agent-cluster-agent-0             1/1     Running     0          49s
kube-system        coredns-697968c856-tvs6k                  1/1     Running     0          43s
kube-system        etcd-proxy-h6srs                          1/1     Running     0          43s
kube-system        helm-install-traefik-2vwf6                0/1     Completed   1          43s
kube-system        helm-install-traefik-crd-cqjjr            0/1     Completed   0          43s
kube-system        local-path-provisioner-774c6665dc-psspw   1/1     Running     0          43s
kube-system        metrics-server-6f4c6675d5-bdgmv           1/1     Running     0          43s
kube-system        svclb-traefik-29960cbf-fn6sq              2/2     Running     0          32s
kube-system        traefik-c98fdf6fb-v5jjv                   1/1     Running     0          32s
tigera-operator    tigera-operator-844669ff44-7lq6d          1/1     Running     0          43s
kubectl get po -A
NAMESPACE                      NAME                                                            READY   STATUS    RESTARTS   AGE
capi-operator-system           capi-operator-cluster-api-operator-7df7bb8546-gpbps             1/1     Running   0          6m13s
capi-system                    capi-controller-manager-7c8f7554c9-jdhsh                        1/1     Running   0          5m29s
cert-manager                   cert-manager-6b47874757-cgjnv                                   1/1     Running   0          6m44s
cert-manager                   cert-manager-cainjector-555c4b8bd5-ln7ss                        1/1     Running   0          6m44s
cert-manager                   cert-manager-webhook-6cf9c9b5d-glfk6                            1/1     Running   0          6m44s
default                        cluster-agent-0                                                 1/1     Running   0          2m1s
default                        cluster-connect-gateway-controller-6b4494bf6-hwg6r              1/1     Running   0          4m35s
default                        cluster-connect-gateway-gateway-656d689747-hwkt5                1/1     Running   0          4m35s
default                        cluster-manager-79c958c66-zfm76                                 2/2     Running   0          2m58s
default                        cluster-manager-template-controller-7d645ddb6b-dmghz            1/1     Running   0          2m58s
default                        intel-infra-provider-manager-599c794977-tt8vb                   1/1     Running   0          6m51s
default                        intel-infra-provider-southbound-5777cd8f95-hw8gq                1/1     Running   0          2m2s
docker-infrastructure-system   capd-controller-manager-6ff786db87-fjjf4                        1/1     Running   0          5m14s
k3s-bootstrap-system           capi-k3s-bootstrap-controller-manager-7c674678fd-q5mrl          2/2     Running   0          4m36s
k3s-control-plane-system       capi-k3s-control-plane-controller-manager-76c67f6c8f-qzzwp      2/2     Running   0          4m35s
kube-system                    coredns-668d6bf9bc-m7jg8                                        1/1     Running   0          6m55s
kube-system                    coredns-668d6bf9bc-szwkc                                        1/1     Running   0          6m55s
kube-system                    etcd-kind-control-plane                                         1/1     Running   0          7m1s
kube-system                    kindnet-css2q                                                   1/1     Running   0          6m55s
kube-system                    kube-apiserver-kind-control-plane                               1/1     Running   0          7m1s
kube-system                    kube-controller-manager-kind-control-plane                      1/1     Running   0          7m1s
kube-system                    kube-proxy-m7gvl                                                1/1     Running   0          6m55s
kube-system                    kube-scheduler-kind-control-plane                               1/1     Running   0          7m1s
kubeadm-bootstrap-system       capi-kubeadm-bootstrap-controller-manager-74b7cbbbb5-q6dh7      1/1     Running   0          4m58s
kubeadm-control-plane-system   capi-kubeadm-control-plane-controller-manager-777c6df7f-vlqxj   1/1     Running   0          4m56s
local-path-storage             local-path-provisioner-58cc7856b6-qx88b                         1/1     Running   0          6m55s
rke2-bootstrap-system          rke2-bootstrap-controller-manager-67cb49b65f-l4xtg              1/1     Running   0          4m50s
rke2-control-plane-system      rke2-control-plane-controller-manager-85456d754b-49gbq          1/1     Running   0          4m48s
make[1]: Leaving directory '/root/cluster-tests'
make[1]: Entering directory '/root/cluster-tests'
clusterctl -n 53cd37b9-66b2-4cc8-b080-3722ed7af64a describe cluster demo-cluster --show-conditions all
NAME                                                       READY  SEVERITY  REASON  SINCE  MESSAGE 
Cluster/demo-cluster                                       True                     11s             
│           ├─ControlPlaneInitialized                      True                     11s             
│           ├─ControlPlaneReady                            True                     11s             
│           ├─InfrastructureReady                          True                     104s            
│           └─TopologyReconciled                           True                     109s            
├─ClusterInfrastructure - IntelCluster/demo-cluster-t56tk  True                     104s            
│             ├─ControlPlaneEnpointReady                   True                     104s            
│             └─WorkloadCreatedReady                       True                     104s            
└─ControlPlane - KThreesControlPlane/demo-cluster-vz6gq    True                     11s             
  │           ├─Available                                  True                     11s             
  │           ├─CertificatesAvailable                      True                     103s            
  │           ├─ControlPlaneComponentsHealthy              True                     11s             
  │           ├─EtcdClusterHealthyCondition                True                     10s             
  │           ├─MachinesReady                              True                     39s             
  │           ├─Resized                                    True                     102s            
  │           └─TokenAvailable                             True                     103s            
  └─Machine/demo-cluster-vz6gq-mcqkp                       True                     39s             
                ├─AgentHealthy                             True                     11s             
                ├─BootstrapReady                           True                     102s            
                ├─EtcdMemberHealthy                        True                     10s             
                ├─HealthCheckSucceeded                     True                     11s             
                ├─InfrastructureReady                      True                     39s             
                └─NodeHealthy                              True                     13s  
$ kubectl get clustertemplates -n  53cd37b9-66b2-4cc8-b080-3722ed7af64a
NAME                  READY
baseline-k3s-v0.0.1   true

$ kubectl get kthreescontrolplane -n  53cd37b9-66b2-4cc8-b080-3722ed7af64a
NAME                 INITIALIZED   API SERVER AVAILABLE   VERSION        REPLICAS   READY   UPDATED   UNAVAILABLE
demo-cluster-zhr9b   true          true                   v1.32.4+k3s1   1          1       1         

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes
  • I have not introduced any 3rd party dependency changes
  • I have performed a self-review of my code

@gcgirish
Copy link
Contributor

What remaining work is there on this PR? When it is ready I would like to start using it as baseline for k3s airgapped support.

gcgirish and others added 7 commits May 23, 2025 12:17
during the integration tests run in the cluster-test repo, the connect-agent
was present. The agent pod manifest was not present in the workload cluster.
the agent was not deployed, and the cluster creation process was not complete.
@togashidm togashidm marked this pull request as ready for review May 26, 2025 17:17
this commit also remove the need of mounting and make it more
in line with the previous rke2 provider where it uses calico
operator and crds
@togashidm togashidm merged commit 0c39366 into main May 28, 2025
20 of 21 checks passed
@togashidm togashidm deleted the k3s-intel-provider branch May 28, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants