Merge pull request #959 from negz/plus-one

Update content/master to use v2 stable instead of preview
This commit is contained in:
Nic Cope 2025-08-08 11:48:08 -07:00 committed by GitHub
commit ad7f75a96d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 217 additions and 179 deletions

View File

@ -27,7 +27,7 @@ To download the latest version for your CPU architecture with the Crossplane
install script.
```shell
curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | XP_CHANNEL=preview sh
curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | sh
```
[The script](https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh)

View File

@ -40,6 +40,7 @@ Creating a CompositeResourceDefinition consists of:
* [Defining a custom API group](#xrd-groups).
* [Defining a custom API name](#xrd-names).
* [Defining a custom API schema and version](#xrd-versions).
* [Setting the scope](#xrd-scope) (namespaced or cluster-scoped).
Optionally, CompositeResourceDefinitions also support:
* [Setting composite resource defaults](#set-composite-resource-defaults).
@ -48,16 +49,17 @@ Composite resource definitions (`XRDs`) create new API endpoints inside a
Kubernetes cluster.
Creating a new API requires defining an API
{{<hover label="xrd1" line="6">}}group{{</hover>}},
{{<hover label="xrd1" line="7">}}name{{</hover>}} and
{{<hover label="xrd1" line="10">}}version{{</hover>}}.
{{<hover label="xrd1" line="7">}}group{{</hover>}},
{{<hover label="xrd1" line="8">}}name{{</hover>}} and
{{<hover label="xrd1" line="11">}}version{{</hover>}}.
```yaml {label="xrd1",copy-lines="none"}
apiVersion: apiextensions.crossplane.io/v1
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
name: mydatabases.example.org
spec:
scope: Namespaced
group: example.org
names:
kind: XMyDatabase
@ -494,6 +496,41 @@ spec:
Changing or expanding the XRD schema requires restarting the [Crossplane pod]({{<ref "../guides/pods#crossplane-pod">}}) to take effect.
{{< /hint >}}
<!-- vale Google.Headings = NO -->
<!-- vale Microsoft.Headings = NO -->
### XRD scope
<!-- vale Google.Headings = YES -->
<!-- vale Microsoft.Headings = YES -->
The {{<hover label="xrdscope" line="6">}}scope{{</hover>}} field determines
whether composite resources created from this XRD exist in a namespace or
at cluster scope.
```yaml {label="xrdscope",copy-lines="none"}
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
name: mydatabases.example.org
spec:
scope: Namespaced
# Removed for brevity
```
The scope field supports three values:
* `Namespaced` - **(Default in v2)** - Composite resources exist in a
namespace and can only compose resources in the same namespace.
* `Cluster` - Composite resources are cluster-scoped and can compose resources
in any namespace or at cluster scope.
* `LegacyCluster` - Cluster-scoped with support for claims (v1 compatibility
mode).
{{<hint "note" >}}
Most XRDs should use `Namespaced` scope. This provides better security
isolation and follows standard Kubernetes patterns. Use `Cluster` scope only
for platform level resources like RBAC or cluster configuration.
{{< /hint >}}
### Set composite resource defaults
XRDs can set default parameters for composite resources.

View File

@ -88,6 +88,7 @@ manually update it when you wish it to use another `CompositionRevision`.
apiVersion: example.org/v1alpha1
kind: PlatformDB
metadata:
namespace: default
name: example
spec:
storageGB: 20
@ -108,6 +109,7 @@ use a different `CompositionRevision`.
apiVersion: example.org/v1alpha1
kind: PlatformDB
metadata:
namespace: default
name: example
spec:
storageGB: 20

View File

@ -89,7 +89,7 @@ that supports REST APIs to work with apps.
This guide requires:
* A Kubernetes cluster with at least 2 GB of RAM
* The Crossplane v2 preview [installed on the Kubernetes cluster]({{<ref "install">}})
* Crossplane v2 [installed on the Kubernetes cluster]({{<ref "install">}})
## Create the custom resource

View File

@ -32,16 +32,16 @@ Kubernetes calls third party API resources _custom resources_.
This guide requires:
* A Kubernetes cluster with at least 2 GB of RAM
* The Crossplane v2 preview [installed on the Kubernetes cluster]({{<ref "install">}})
* Crossplane v2 [installed on the Kubernetes cluster]({{<ref "install">}})
* An AWS account with permissions to create an S3 storage bucket
* AWS [access keys](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-creds)
{{<hint "note">}}
Only AWS managed resources support the Crossplane v2 preview.
AWS managed resources fully support Crossplane v2.
<!-- vale gitlab.FutureTense = NO -->
Maintainers will update the managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
Maintainers are actively working to update managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
<!-- vale gitlab.FutureTense = YES -->
{{</hint>}}
@ -69,7 +69,7 @@ kind: Provider
metadata:
name: crossplane-contrib-provider-aws-s3
spec:
package: xpkg.crossplane.io/crossplane-contrib/provider-aws-s3:v1.24.0-crossplane-v2-preview.0
package: xpkg.crossplane.io/crossplane-contrib/provider-aws-s3:v2.0.0
```
Save this as `provider.yaml` and apply it:
@ -83,8 +83,8 @@ Check that Crossplane installed the provider:
```shell {copy-lines="1",label="getProvider"}
kubectl get providers
NAME INSTALLED HEALTHY PACKAGE AGE
crossplane-contrib-provider-family-aws True True xpkg.crossplane.io/crossplane-contrib/provider-family-aws:v1.24.0-crossplane-v2-preview.0 27s
crossplane-contrib-provider-aws-s3 True True xpkg.crossplane.io/crossplane-contrib/provider-aws-s3:v1.24.0-crossplane-v2-preview.0 31s
crossplane-contrib-provider-family-aws True True xpkg.crossplane.io/crossplane-contrib/provider-family-aws:v2.0.0 27s
crossplane-contrib-provider-aws-s3 True True xpkg.crossplane.io/crossplane-contrib/provider-aws-s3:v2.0.0 31s
```
{{<hint "note">}}

View File

@ -28,14 +28,14 @@ Install Crossplane using the _Helm chart_.
<!-- vale Google.Headings = NO -->
<!-- vale Microsoft.Headings = NO -->
### Add the Crossplane Preview Helm repository
### Add the Crossplane Helm repository
<!-- vale Google.Headings = YES -->
<!-- vale Microsoft.Headings = YES -->
Add the Crossplane preview repository with the `helm repo add` command.
Add the Crossplane stable repository with the `helm repo add` command.
```shell
helm repo add crossplane-preview https://charts.crossplane.io/preview
helm repo add crossplane-stable https://charts.crossplane.io/stable
```
Update the
@ -46,11 +46,11 @@ helm repo update
<!-- vale Google.Headings = NO -->
<!-- vale Microsoft.Headings = NO -->
### Install the Crossplane Preview Helm chart
### Install the Crossplane Helm chart
<!-- vale Google.Headings = YES -->
<!-- vale Microsoft.Headings = YES -->
Install the Crossplane Preview Helm chart with `helm install`.
Install the Crossplane Helm chart with `helm install`.
{{< hint "tip" >}}
View the changes Crossplane makes to your cluster with the
@ -63,8 +63,7 @@ Crossplane creates and installs into the `crossplane-system` namespace.
```shell
helm install crossplane \
--namespace crossplane-system \
--create-namespace crossplane-preview/crossplane \
--version v2.0.0-preview.1
--create-namespace crossplane-stable/crossplane
```
View the installed Crossplane pods with `kubectl get pods -n crossplane-system`.

View File

@ -10,14 +10,14 @@ The recommended upgrade method for an existing Crossplane install is to use
* [Helm](https://helm.sh/docs/intro/install/) version `v3.2.0` or later
## Add the Crossplane Preview Helm repository
## Add the Crossplane Helm repository
Verify Helm has the Crossplane repository.
```shell
helm repo add crossplane-preview https://charts.crossplane.io/preview
helm repo add crossplane-stable https://charts.crossplane.io/stable
```
## Update the Helm Preview repository
## Update the Helm repository
Update the local Crossplane Helm chart with `helm repo update`.
@ -37,7 +37,7 @@ By default, Crossplane installs into the `crossplane-system`
namespace.
```shell
helm upgrade crossplane --namespace crossplane-system crossplane-preview/crossplane --devel
helm upgrade crossplane --namespace crossplane-system crossplane-stable/crossplane
```
Helm preserves any arguments or flags originally used when installing
@ -56,5 +56,5 @@ with the upgrade command.
For example, to maintain the original image registry use
```shell
helm upgrade crossplane --namespace crossplane-system crossplane-preview/crossplane --set 'args={"--registry=index.docker.io"}'
helm upgrade crossplane --namespace crossplane-system crossplane-stable/crossplane --set 'args={"--registry=index.docker.io"}'
```

View File

@ -20,11 +20,11 @@ Examples of managed resources include:
* Microsoft Azure PostgreSQL `Database` defined in [provider-upjet-azure](https://github.com/crossplane-contrib/provider-upjet-azure).
{{<hint "important">}}
Only AWS managed resources support the Crossplane v2 preview.
AWS managed resources fully support Crossplane v2.
<!-- vale gitlab.FutureTense = NO -->
Maintainers will update the managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
Maintainers are actively working to update managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
<!-- vale gitlab.FutureTense = YES -->
{{</hint>}}
@ -419,7 +419,7 @@ For example, when creating an AWS RDS database instance with the Crossplane
[community AWS provider](https://github.com/crossplane-contrib/provider-aws)
generates an endpoint, password, port and username data. The Provider saves
these variables in the Kubernetes secret
{{<hover label="secretname" line="9" >}}rds-secret{{</hover>}}, referenced by
{{<hover label="secretname" line="10" >}}rds-secret{{</hover>}}, referenced by
the
{{<hover label="secretname" line="9" >}}writeConnectionSecretToRef{{</hover>}}
field.
@ -428,6 +428,7 @@ field.
apiVersion: database.aws.m.crossplane.io/v1beta1
kind: RDSInstance
metadata:
namespace: default
name: my-rds-instance
spec:
forProvider:

View File

@ -216,11 +216,11 @@ Follow [Get Started with Managed Resources]({{<ref "../get-started/get-started-w
to see how managed resources work.
{{<hint "note">}}
Only AWS managed resources support the Crossplane v2 preview.
AWS managed resources fully support Crossplane v2.
<!-- vale gitlab.FutureTense = NO -->
Maintainers will update the managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
Maintainers are actively working to update managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
<!-- vale gitlab.FutureTense = YES -->
{{</hint>}}

View File

@ -1,7 +1,7 @@
---
title: What's New in v2?
weight: 4
description: Learn what's new in the Crossplane v2 preview
description: Learn what's new in Crossplane v2
---
**Crossplane v2 makes Crossplane more useful, more intuitive, and less
opinionated.**
@ -151,12 +151,11 @@ opinionated about using composition and MRs together. Namespaces enable fine
grained access control over who can create what MRs.
{{<hint "note">}}
During the Crossplane v2 preview only namespaced AWS managed resources are
available.
Namespaced AWS managed resources are fully available in Crossplane v2.
<!-- vale gitlab.FutureTense = NO -->
Maintainers will update the managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support namespaced MRs soon.
Maintainers are actively working to update managed resources for other systems including Azure,
GCP, Terraform, Helm, GitHub, etc to support namespaced MRs.
<!-- vale gitlab.FutureTense = YES -->
{{</hint>}}