cluster-api-provider-ocne

command module
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 49 Imported by: 0

README

Cluster API Provider for OCNE

👋 Welcome to our project!

✨ What is OCNE?

Oracle Cloud Native Environment is a fully integrated suite for the development and management of cloud-native applications. Oracle Cloud Native Environment is a curated set of open source projects that are based on open standards, specifications and APIs defined by the Open Container Initiative (OCI) and Cloud Native Computing Foundation (CNCF) that can be easily deployed, have been tested for interoperability and for which enterprise-grade support is offered. Oracle Cloud Native Environment delivers a simplified framework for installations, updates, upgrades and configuration of key features for orchestrating microservices.

⚙️ Providers

Cluster API can be extended to support any infrastructure (AWS, Azure, vSphere, etc.), bootstrap or control plane provider (kubeadm is built in). There is a growing list of supported providers available.

⚙️ OCNE Provider

OCNE Provider for CAPI (CAPOCNE) is used to bootstrap and control OCNE instances on top of major infrastructure providers like OCI, AWS and Azure. This extends the kubeadm bootstrap and control plane provider functionality. The OCNE Provider does not use pre-baked images but rather uses vanilla OL8 images and installs the dependancies at boot time.

⚙️ Cluster API Versions

CAPOCNE supports the following Cluster API versions.

Cluster API v1beta1 (v1.x.x)
OCNE Provider (v0.x.x)
⚙️ CAPOCNE Operating System Support

CAPOCNE enables dynamic installation of dependencies without the need to maintain images per region. The following is the support matrix for CAPOCNE:

Operating System Infrastructure Provider
Oracle Linux 8 CAPOCI
⚙️ CAPOCNE Kubernetes Version Support

CAPOCNE provider follows the below support matrix with regards Kubernetes distribution. All images are hosted at container-registry.oracle.com.

K8s Version DNS Image Tag ETCD Image Tag
1.25.7 v1.9.3 3.5.6
1.25.11 v1.9.3 3.5.6
1.26.6 v1.9.3 3.5.6
⚙️ Prerequisites
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.3/clusterctl-linux-amd64 -o clusterctl
  • Install a Kubernetes cluster using KinD:
cat > kind-cluster-with-extramounts.yaml <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraMounts:
    - hostPath: /var/run/docker.sock
      containerPath: /var/run/docker.sock
EOF

kind create cluster --config kind-cluster-with-extramounts.yaml
⚙️ Installation
  • To install the OCNE providers, convert the existing KIND cluster created above into a management cluster. Update the clusterctl configuration file ~/.cluster-api/clusterctl.yaml to point to the release artifacts folder:
providers:
  - name: "ocne"
    url: "https://github.com/verrazzano/cluster-api-provider-ocne/releases/v1.7.0/bootstrap-components.yaml"
    type: "BootstrapProvider"
  - name: "ocne"
    url: "https://github.com/verrazzano/cluster-api-provider-ocne/releases/v1.7.0/control-plane-components.yaml"
    type: "ControlPlaneProvider"

You will now be able to initialize clusterctl with the OCNE providers:

clusterctl init --bootstrap ocne:v1.7.0 --control-plane ocne:v1.7.0 -i oci:v0.12.0

NOTE: Currently OCNE Provider is verified only for the OCI infrastructure provider. Follow the instructions here for setting up OCI provider.

  • Once initialization is complete pods such as the following should be running in the cluster
capi-ocne-bootstrap-system           capi-ocne-bootstrap-controller-manager-7cd89b4bbb-bwsbs           1/1     Running   0              34m
capi-ocne-control-plane-system       capi-ocne-control-plane-controller-manager-5cdf88667f-vqq27       1/1     Running   0              34m
capi-system                          capi-controller-manager-8b477f66b-tcgcg                           1/1     Running   0              34m
cluster-api-provider-oci-system      capoci-controller-manager-5f5d9d49b5-mht2p                        1/1     Running   0              34m
⚙️ Usage

When the OCNE bootstrap and control plane clusters are up and running you can apply cluster manifests with the desired specs to provision a cluster of your choice. OCNE provider configuration is similar to Kubeadm configuration with some additional properties. For example, the proxy property may be required to enable dependency installation in environmentis that have a proxy configured. For such a case, the spec.controlPlaneConfig.proxy property can be set in the OCNEControlPlane object and spec.proxy.httpProxy in the OCNEConfigTemplate. You may also find useful manifests for property configuration under the examples directory.

  • Generate and deploy the cluster
source examples/variables.env
clusterctl generate cluster ocne-cluster --from-file examples/module-operator/cluster-template-existingvcnwithaddons.yaml | kubectl apply -f -
  • Once the cluster is deployed successfully you should see a cluster description similar to the following:
clusterctl describe cluster ocne-cluster
NAME                                                            READY  SEVERITY  REASON  SINCE  MESSAGE
Cluster/ocne-cluster                                             True                     45m
  ClusterInfrastructure - OCICluster/ocne-cluster                True                     56m
  ControlPlane - OCNEControlPlane/ocne-cluster-control-plane     True                     45m
    Machine/ocne-cluster-control-plane-z47bj                     True                     55m
  Workers
    MachineDeployment/ocne-cluster-md-0                          True                     36m
      Machine/ocne-cluster-md-0-846df89cb4-dbrdn                 True                     44m

Documentation

Overview

main is the main package for the Cluster API Core Provider.

Directories

Path Synopsis
bootstrap
ocne
main is the main package for the Kubeadm Bootstrap provider.
main is the main package for the Kubeadm Bootstrap provider.
ocne/api/v1alpha1
Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group +kubebuilder:object:generate=true +groupName=bootstrap.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group +kubebuilder:object:generate=true +groupName=bootstrap.cluster.x-k8s.io
ocne/controllers
Package controllers implements the Kubeadm controllers.
Package controllers implements the Kubeadm controllers.
ocne/internal/builder
Package builder implements builder and CRDs for creating Bootstrap objects for testing.
Package builder implements builder and CRDs for creating Bootstrap objects for testing.
ocne/internal/cloudinit
Package cloudinit implements kubeadm cloudinit functionality.
Package cloudinit implements kubeadm cloudinit functionality.
ocne/internal/controllers
Package controllers implements the Kubeadm controllers.
Package controllers implements the Kubeadm controllers.
ocne/internal/ignition
Package ignition aggregates all Ignition flavors into a single package to be consumed by the bootstrap provider by exposing an API similar to 'internal/cloudinit' package.
Package ignition aggregates all Ignition flavors into a single package to be consumed by the bootstrap provider by exposing an API similar to 'internal/cloudinit' package.
ocne/internal/ignition/clc
Package clc generates bootstrap data in Ignition format using Container Linux Config Transpiler.
Package clc generates bootstrap data in Ignition format using Container Linux Config Transpiler.
ocne/internal/locking
Package locking implements locking functionality.
Package locking implements locking functionality.
ocne/types
Package utils contains Kubeadm utility types.
Package utils contains Kubeadm utility types.
ocne/types/upstreamv1beta1
Package upstreamv1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K.
Package upstreamv1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K.
ocne/types/upstreamv1beta2
Package upstreamv1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K.
Package upstreamv1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K.
ocne/types/upstreamv1beta3
Package upstreamv1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K.
Package upstreamv1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K.
util
Package util implements kubeadm utility functionality.
Package util implements kubeadm utility functionality.
controlplane
ocne
main is the main package for the Kubeadm Control Plane provider.
main is the main package for the Kubeadm Control Plane provider.
ocne/api/v1alpha1
Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io
ocne/controllers
Package controllers implements the OCNE controllers.
Package controllers implements the OCNE controllers.
ocne/internal
Package internal contains internal implementation details for the Kubeadm Control Plane.
Package internal contains internal implementation details for the Kubeadm Control Plane.
ocne/internal/controllers
Package controllers implements the Kubeadm controllers.
Package controllers implements the Kubeadm controllers.
ocne/internal/etcd
Package etcd provides a connection to an etcd member.
Package etcd provides a connection to an etcd member.
ocne/internal/etcd/fake
Package fake implements testing fakes.
Package fake implements testing fakes.
ocne/internal/etcd/util
Package util implements etcd utility functions.
Package util implements etcd utility functions.
ocne/internal/proxy
Package proxy implements kubeadm proxy functionality.
Package proxy implements kubeadm proxy functionality.
ocne/internal/webhooks
Package webhooks provides the validating webhook for KubeadmControlPlane scale subresource.
Package webhooks provides the validating webhook for KubeadmControlPlane scale subresource.
ocne/webhooks
Package webhooks provides the validating webhook for KubeadmControlPlane scale subresource.
Package webhooks provides the validating webhook for KubeadmControlPlane scale subresource.
Package errors makes a set of error message handlers available for use by Cluster API Providers.
Package errors makes a set of error message handlers available for use by Cluster API Providers.
Package feature implements feature functionality.
Package feature implements feature functionality.
internal
hooks
Package hooks has helper functions for Runtime Hooks.
Package hooks has helper functions for Runtime Hooks.
k8s
labels
Package labels contains functions to validate and compare values used in Kubernetes labels.
Package labels contains functions to validate and compare values used in Kubernetes labels.
log
Package log provides log utilities for the topology package.
Package log provides log utilities for the topology package.
runtime/client
Package client provides the Runtime SDK client.
Package client provides the Runtime SDK client.
runtime/client/fake
Package fake is used to help with testing functions that need a fake RuntimeClient.
Package fake is used to help with testing functions that need a fake RuntimeClient.
runtime/metrics
Package metrics provides functions for creating Runtime SDK related metrics.
Package metrics provides functions for creating Runtime SDK related metrics.
runtime/registry
Package registry implements the RuntimeSDK registry.
Package registry implements the RuntimeSDK registry.
runtime/test/v1alpha1
Package v1alpha1 contains types for tests.
Package v1alpha1 contains types for tests.
runtime/test/v1alpha2
Package v1alpha2 contains types for tests.
Package v1alpha2 contains types for tests.
test/builder
Package builder implements builder and CRDs for creating API objects for testing.
Package builder implements builder and CRDs for creating API objects for testing.
test/envtest
Package envtest contains the test environment to run integration tests.
Package envtest contains the test environment to run integration tests.
topology/check
Package check implements checks for managed topology.
Package check implements checks for managed topology.
topology/variables
Package variables implements validation and defaulting for ClusterClass variables.
Package variables implements validation and defaulting for ClusterClass variables.
util/ocne
Package kubeadm contains utils related to kubeadm.
Package kubeadm contains utils related to kubeadm.
webhooks
Package webhooks contains external webhook implementations for some of our API types.
Package webhooks contains external webhook implementations for some of our API types.
webhooks/runtime
Package runtime contains the webhook implementation for runtime ExtensionConfig.
Package runtime contains the webhook implementation for runtime ExtensionConfig.
webhooks/util
Package util includes the utility functions for testing webhooks.
Package util includes the utility functions for testing webhooks.
Package util implements utilities.
Package util implements utilities.
annotations
Package annotations implements annotation helper functions.
Package annotations implements annotation helper functions.
certs
Package certs implements cert handling utilities.
Package certs implements cert handling utilities.
collections
Package collections implements collection utilities.
Package collections implements collection utilities.
conditions
Package conditions implements condition utilities.
Package conditions implements condition utilities.
container
Package container implements container utility functionality.
Package container implements container utility functionality.
contract
Package contract contains utils related to the Cluster API contract.
Package contract contains utils related to the Cluster API contract.
conversion
Package conversion implements conversion utilities.
Package conversion implements conversion utilities.
defaulting
Package defaulting implements defaulting webhook functionality.
Package defaulting implements defaulting webhook functionality.
failuredomains
Package failuredomains implements FailureDomain utility functions.
Package failuredomains implements FailureDomain utility functions.
flags
Package flags implements the webhook server TLS options utilities.
Package flags implements the webhook server TLS options utilities.
kubeconfig
Package kubeconfig implements utilities for working with kubeconfigs.
Package kubeconfig implements utilities for working with kubeconfigs.
labels
Package labels implements label utility functions.
Package labels implements label utility functions.
log
Package log provides log utils.
Package log provides log utils.
patch
Package patch implements patch utilities.
Package patch implements patch utilities.
predicates
Package predicates implements predicate utilities.
Package predicates implements predicate utilities.
secret
Package secret implements utilities for secret handling.
Package secret implements utilities for secret handling.
version
Package version implements version handling.
Package version implements version handling.
yaml
Package yaml implements yaml utility functions.
Package yaml implements yaml utility functions.
Package version implements version handling code.
Package version implements version handling code.
Package webhooks contains external webhook implementations for some of our API types.
Package webhooks contains external webhook implementations for some of our API types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL