Crossplane Graduation Review related presentation

kedofef453 35 views 29 slides Oct 16, 2024
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review+Crossplane Graduation Review


Slide Content

https://crossplane.io

Jared Watts, Upbound
Crossplane
Graduation Review

●Framework to build your own cloud native control planes
○No need to write any code (but you can)
●Cloud providers manage their own infrastructure with a
control plane
○Crossplane helps you build your own - with your own opinions
●Provision and manage all of your cloud infrastructure and
resources from your control plane
●Compose resources into higher level abstractions that enable
developer self-service provisioning
What is Crossplane?

CNCF Project History
●Crossplane is a neutral place for vendors and individuals to come
together in enabling control planes
●Launched in Dec 2018 by creators of CNCF graduated Rook
project
○Accepted into Sandbox in June 2020
○First major “stable” milestone v1.0 released in Dec 2020
○Moved to Incubation September 2021
○v1.14 most recent release - biggest release to date
○Graduation proposal now open!
■https://github.com/cncf/toc/pull/1254

The Basics
Managed Resources

Managed Resources Example: AWS
https://marketplace.upbound.io/providers/upbound/provider-family-aws
Networking
Databases
Kubernetes Clusters
IAM
VMs
Message Queues
Caches
Certificates
…and much more…

Managed Resources

Managed Resources
Managed Resources
Generate K8s Events
Status contains values
returned from the remote
API and the condition of
the resources.

Managed Resource Reconciliation
●Controllers reconcile these CRDs with cloud provider and
on-prem APIs (e.g., GCP, AWS, or any API really)
Kubernetes Control Plane
S3 api-server
S3 controller
apiVer: aws/v1
kind:Bucket
spec:
forProvider:
acl: private
...
watches
apply
AWS
API

Control Plane Internal Stack
Kubernetes Runtime
Kubernetes API Machinery
Controller Runtime
Crossplane Runtime
ControllerController Controller
Run Workloads, Ingress,
RBAC
Manage External APIs
Create/Update/Delete
Custom Logic
CRDs, OpenAPI,
Persistence (etcd)
Event, Watch, Request,
Reconciliation
Controller

Building Your Control
Plane
Composition

Build your own Platform API
●Assemble granular resources, e.g. from multiple clouds.
●Expose as higher level self-service API for your app teams
○Compose GKE, NodePool, Network, Subnetwork
○Offer as a single Cluster abstraction (API) with limited config for
developers to self-service
●Hide infrastructure complexity and include policy guardrails
●All with K8s API - compatible with kubectl, GitOps, etc.
●No code required (unless you want), it’s all declarative

Claim
Configuration
XRD
Composite Resource
Definition
Composition
Provider
Managed Resource
Managed Resource
Managed Resource
Managed Resource
Managed Resource
Managed Resource
App Dev Platform Engineer

Small
PostgreSQL
Configuration
XRD
Composite Resource
Definition
AWS
Composition
provider-aws
Managed Resource
Security Group
Managed Resource
DB Parameter
Group
Managed Resource
RDS Instance
App Dev Platform Engineer

Composite Resources
Standard openAPIV3
Schema
Custom API Group
First create Composite
Resource Definition
(XRD) to declare our
custom platform API

Compositions
Then we define a
Composition which
implements XRD
List of Managed Resources
to Compose
XRD reference

Patches
Patches enable propagation
of data from Composite
Resource (XR) down to
composed Managed
Resources (MR)
Map transform to
manipulate the config data
Copy of value from XR
spec down to MR spec

Composition Functions

●No iteration. No conditionals. No templates.
●No advanced logic other than simple patch & transforms
●List of resources is static
●No ability to call external APIs to get values
●and others…composition is not a programming language
○We didn’t want to grow a DSL expressed in YAML
Limitations of Composition

●Run a pipeline of simple functions
●Written in your language of choice with any logic your use case needs
●Sweet spot between “no code” ←→ building an entire controller
○Focus on your platform’s unique needs only
○Crossplane still does the heavy lifting of CRUD-ing resources,
finalizers, owner refs, etc
●You don’t have to write any code to start using functions
○Reusable functions that are generally useful
○e.g., helm/go templates, CUE scripts, etc.
What can Functions do?

Writing Functions - Go

Using Functions - for loop (go templates)

Using Functions - if conditionals (CUE)

●Published Roadmap: crossplane/crossplane/ROADMAP.md
●Mature high impact APIs to v1/Stable (Functions, Management
Policies, Usage)
●Continue investment to improve Developer Experience #4676
○shift-left: easier/faster to build your platform “correct” first try
●Day 2 operations functions #4729
●Build an entire platform in your language of choice #5172
Roadmap

●Governance has been in place since before Sandbox
○crossplane/crossplane/GOVERNANCE.md
●Steering committee responsible for overall vision, health, and
success of the project
○Apple, Nokia, and Upbound
○Oversight, conflict resolution, vetoes across entire ecosystem
●Autonomous maintainer teams per repository
○Make local decisions, merge PRs, triage and keep healthy flow
Community and Governance

Project and Community Stats
●1,900 contributors to the project
●Top 10% of all CNCF projects for PR authors (18th out of 173)
●Since Incubation
○PR authors up 3x from 184 to 660+
○Companies contributing up 3x from 105 to 338+
○120+ companies with “committers” (maintainers w/ write perms)
●In use by several end-user organizations in production and at
scale (ADOPTERS.md )
○Nike, Autodesk, Grafana, NASA Science Cloud, Elastic, SAP, IBM,
VMWare Tanzu, Nokia, etc.

●Radius
○Probably more overlap than indicated in sandbox#65, both are focusing on abstractions
for developer self-service
○Radius focuses more on application model
■Recipes: limited support in recipes right now, doesn’t appear to be user definable
○Crossplane focuses more on infrastructure
■Compositions: platform team completely defines their own custom abstractions
and implementations
●Score
○Container workload focused only
○Abstractions for app environments (Helm, Docker Compose, Cloud Run)
○Doesn’t support infrastructure building blocks (VPCs, IAM, databases, etc.)
Project Comparison

Demo - Example Platform
https://github.com/jbw976/platform-demo

Demo - Functions
https://github.com/jbw976/xfn-demo

Questions?