mirror of https://github.com/crossplane/docs.git
Merge pull request #959 from negz/plus-one
Update content/master to use v2 stable instead of preview
This commit is contained in:
commit
ad7f75a96d
|
|
@ -27,7 +27,7 @@ To download the latest version for your CPU architecture with the Crossplane
|
||||||
install script.
|
install script.
|
||||||
|
|
||||||
```shell
|
```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)
|
[The script](https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh)
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ Creating a CompositeResourceDefinition consists of:
|
||||||
* [Defining a custom API group](#xrd-groups).
|
* [Defining a custom API group](#xrd-groups).
|
||||||
* [Defining a custom API name](#xrd-names).
|
* [Defining a custom API name](#xrd-names).
|
||||||
* [Defining a custom API schema and version](#xrd-versions).
|
* [Defining a custom API schema and version](#xrd-versions).
|
||||||
|
* [Setting the scope](#xrd-scope) (namespaced or cluster-scoped).
|
||||||
|
|
||||||
Optionally, CompositeResourceDefinitions also support:
|
Optionally, CompositeResourceDefinitions also support:
|
||||||
* [Setting composite resource defaults](#set-composite-resource-defaults).
|
* [Setting composite resource defaults](#set-composite-resource-defaults).
|
||||||
|
|
@ -48,16 +49,17 @@ Composite resource definitions (`XRDs`) create new API endpoints inside a
|
||||||
Kubernetes cluster.
|
Kubernetes cluster.
|
||||||
|
|
||||||
Creating a new API requires defining an API
|
Creating a new API requires defining an API
|
||||||
{{<hover label="xrd1" line="6">}}group{{</hover>}},
|
{{<hover label="xrd1" line="7">}}group{{</hover>}},
|
||||||
{{<hover label="xrd1" line="7">}}name{{</hover>}} and
|
{{<hover label="xrd1" line="8">}}name{{</hover>}} and
|
||||||
{{<hover label="xrd1" line="10">}}version{{</hover>}}.
|
{{<hover label="xrd1" line="11">}}version{{</hover>}}.
|
||||||
|
|
||||||
```yaml {label="xrd1",copy-lines="none"}
|
```yaml {label="xrd1",copy-lines="none"}
|
||||||
apiVersion: apiextensions.crossplane.io/v1
|
apiVersion: apiextensions.crossplane.io/v2
|
||||||
kind: CompositeResourceDefinition
|
kind: CompositeResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: mydatabases.example.org
|
name: mydatabases.example.org
|
||||||
spec:
|
spec:
|
||||||
|
scope: Namespaced
|
||||||
group: example.org
|
group: example.org
|
||||||
names:
|
names:
|
||||||
kind: XMyDatabase
|
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.
|
Changing or expanding the XRD schema requires restarting the [Crossplane pod]({{<ref "../guides/pods#crossplane-pod">}}) to take effect.
|
||||||
{{< /hint >}}
|
{{< /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
|
### Set composite resource defaults
|
||||||
XRDs can set default parameters for composite resources.
|
XRDs can set default parameters for composite resources.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ manually update it when you wish it to use another `CompositionRevision`.
|
||||||
apiVersion: example.org/v1alpha1
|
apiVersion: example.org/v1alpha1
|
||||||
kind: PlatformDB
|
kind: PlatformDB
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: default
|
||||||
name: example
|
name: example
|
||||||
spec:
|
spec:
|
||||||
storageGB: 20
|
storageGB: 20
|
||||||
|
|
@ -108,6 +109,7 @@ use a different `CompositionRevision`.
|
||||||
apiVersion: example.org/v1alpha1
|
apiVersion: example.org/v1alpha1
|
||||||
kind: PlatformDB
|
kind: PlatformDB
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: default
|
||||||
name: example
|
name: example
|
||||||
spec:
|
spec:
|
||||||
storageGB: 20
|
storageGB: 20
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ that supports REST APIs to work with apps.
|
||||||
This guide requires:
|
This guide requires:
|
||||||
|
|
||||||
* A Kubernetes cluster with at least 2 GB of RAM
|
* 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
|
## Create the custom resource
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,16 +32,16 @@ Kubernetes calls third party API resources _custom resources_.
|
||||||
This guide requires:
|
This guide requires:
|
||||||
|
|
||||||
* A Kubernetes cluster with at least 2 GB of RAM
|
* 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
|
* 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)
|
* AWS [access keys](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-creds)
|
||||||
|
|
||||||
{{<hint "note">}}
|
{{<hint "note">}}
|
||||||
Only AWS managed resources support the Crossplane v2 preview.
|
AWS managed resources fully support Crossplane v2.
|
||||||
|
|
||||||
<!-- vale gitlab.FutureTense = NO -->
|
<!-- vale gitlab.FutureTense = NO -->
|
||||||
Maintainers will update the managed resources for other systems including Azure,
|
Maintainers are actively working to update managed resources for other systems including Azure,
|
||||||
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
|
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
|
||||||
<!-- vale gitlab.FutureTense = YES -->
|
<!-- vale gitlab.FutureTense = YES -->
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ kind: Provider
|
||||||
metadata:
|
metadata:
|
||||||
name: crossplane-contrib-provider-aws-s3
|
name: crossplane-contrib-provider-aws-s3
|
||||||
spec:
|
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:
|
Save this as `provider.yaml` and apply it:
|
||||||
|
|
@ -83,8 +83,8 @@ Check that Crossplane installed the provider:
|
||||||
```shell {copy-lines="1",label="getProvider"}
|
```shell {copy-lines="1",label="getProvider"}
|
||||||
kubectl get providers
|
kubectl get providers
|
||||||
NAME INSTALLED HEALTHY PACKAGE AGE
|
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-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:v1.24.0-crossplane-v2-preview.0 31s
|
crossplane-contrib-provider-aws-s3 True True xpkg.crossplane.io/crossplane-contrib/provider-aws-s3:v2.0.0 31s
|
||||||
```
|
```
|
||||||
|
|
||||||
{{<hint "note">}}
|
{{<hint "note">}}
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,14 @@ Install Crossplane using the _Helm chart_.
|
||||||
|
|
||||||
<!-- vale Google.Headings = NO -->
|
<!-- vale Google.Headings = NO -->
|
||||||
<!-- vale Microsoft.Headings = NO -->
|
<!-- vale Microsoft.Headings = NO -->
|
||||||
### Add the Crossplane Preview Helm repository
|
### Add the Crossplane Helm repository
|
||||||
<!-- vale Google.Headings = YES -->
|
<!-- vale Google.Headings = YES -->
|
||||||
<!-- vale Microsoft.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
|
```shell
|
||||||
helm repo add crossplane-preview https://charts.crossplane.io/preview
|
helm repo add crossplane-stable https://charts.crossplane.io/stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Update the
|
Update the
|
||||||
|
|
@ -46,11 +46,11 @@ helm repo update
|
||||||
|
|
||||||
<!-- vale Google.Headings = NO -->
|
<!-- vale Google.Headings = NO -->
|
||||||
<!-- vale Microsoft.Headings = NO -->
|
<!-- vale Microsoft.Headings = NO -->
|
||||||
### Install the Crossplane Preview Helm chart
|
### Install the Crossplane Helm chart
|
||||||
<!-- vale Google.Headings = YES -->
|
<!-- vale Google.Headings = YES -->
|
||||||
<!-- vale Microsoft.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" >}}
|
{{< hint "tip" >}}
|
||||||
View the changes Crossplane makes to your cluster with the
|
View the changes Crossplane makes to your cluster with the
|
||||||
|
|
@ -63,8 +63,7 @@ Crossplane creates and installs into the `crossplane-system` namespace.
|
||||||
```shell
|
```shell
|
||||||
helm install crossplane \
|
helm install crossplane \
|
||||||
--namespace crossplane-system \
|
--namespace crossplane-system \
|
||||||
--create-namespace crossplane-preview/crossplane \
|
--create-namespace crossplane-stable/crossplane
|
||||||
--version v2.0.0-preview.1
|
|
||||||
```
|
```
|
||||||
|
|
||||||
View the installed Crossplane pods with `kubectl get pods -n crossplane-system`.
|
View the installed Crossplane pods with `kubectl get pods -n crossplane-system`.
|
||||||
|
|
|
||||||
|
|
@ -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
|
* [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.
|
Verify Helm has the Crossplane repository.
|
||||||
|
|
||||||
```shell
|
```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`.
|
Update the local Crossplane Helm chart with `helm repo update`.
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ By default, Crossplane installs into the `crossplane-system`
|
||||||
namespace.
|
namespace.
|
||||||
|
|
||||||
```shell
|
```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
|
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
|
For example, to maintain the original image registry use
|
||||||
```shell
|
```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"}'
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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).
|
* Microsoft Azure PostgreSQL `Database` defined in [provider-upjet-azure](https://github.com/crossplane-contrib/provider-upjet-azure).
|
||||||
|
|
||||||
{{<hint "important">}}
|
{{<hint "important">}}
|
||||||
Only AWS managed resources support the Crossplane v2 preview.
|
AWS managed resources fully support Crossplane v2.
|
||||||
|
|
||||||
<!-- vale gitlab.FutureTense = NO -->
|
<!-- vale gitlab.FutureTense = NO -->
|
||||||
Maintainers will update the managed resources for other systems including Azure,
|
Maintainers are actively working to update managed resources for other systems including Azure,
|
||||||
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
|
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
|
||||||
<!-- vale gitlab.FutureTense = YES -->
|
<!-- vale gitlab.FutureTense = YES -->
|
||||||
{{</hint>}}
|
{{</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)
|
[community AWS provider](https://github.com/crossplane-contrib/provider-aws)
|
||||||
generates an endpoint, password, port and username data. The Provider saves
|
generates an endpoint, password, port and username data. The Provider saves
|
||||||
these variables in the Kubernetes secret
|
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
|
the
|
||||||
{{<hover label="secretname" line="9" >}}writeConnectionSecretToRef{{</hover>}}
|
{{<hover label="secretname" line="9" >}}writeConnectionSecretToRef{{</hover>}}
|
||||||
field.
|
field.
|
||||||
|
|
@ -428,6 +428,7 @@ field.
|
||||||
apiVersion: database.aws.m.crossplane.io/v1beta1
|
apiVersion: database.aws.m.crossplane.io/v1beta1
|
||||||
kind: RDSInstance
|
kind: RDSInstance
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: default
|
||||||
name: my-rds-instance
|
name: my-rds-instance
|
||||||
spec:
|
spec:
|
||||||
forProvider:
|
forProvider:
|
||||||
|
|
|
||||||
|
|
@ -216,11 +216,11 @@ Follow [Get Started with Managed Resources]({{<ref "../get-started/get-started-w
|
||||||
to see how managed resources work.
|
to see how managed resources work.
|
||||||
|
|
||||||
{{<hint "note">}}
|
{{<hint "note">}}
|
||||||
Only AWS managed resources support the Crossplane v2 preview.
|
AWS managed resources fully support Crossplane v2.
|
||||||
|
|
||||||
<!-- vale gitlab.FutureTense = NO -->
|
<!-- vale gitlab.FutureTense = NO -->
|
||||||
Maintainers will update the managed resources for other systems including Azure,
|
Maintainers are actively working to update managed resources for other systems including Azure,
|
||||||
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2 soon.
|
GCP, Terraform, Helm, GitHub, etc to support Crossplane v2.
|
||||||
<!-- vale gitlab.FutureTense = YES -->
|
<!-- vale gitlab.FutureTense = YES -->
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: What's New in v2?
|
title: What's New in v2?
|
||||||
weight: 4
|
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
|
**Crossplane v2 makes Crossplane more useful, more intuitive, and less
|
||||||
opinionated.**
|
opinionated.**
|
||||||
|
|
@ -151,12 +151,11 @@ opinionated about using composition and MRs together. Namespaces enable fine
|
||||||
grained access control over who can create what MRs.
|
grained access control over who can create what MRs.
|
||||||
|
|
||||||
{{<hint "note">}}
|
{{<hint "note">}}
|
||||||
During the Crossplane v2 preview only namespaced AWS managed resources are
|
Namespaced AWS managed resources are fully available in Crossplane v2.
|
||||||
available.
|
|
||||||
|
|
||||||
<!-- vale gitlab.FutureTense = NO -->
|
<!-- vale gitlab.FutureTense = NO -->
|
||||||
Maintainers will update the managed resources for other systems including Azure,
|
Maintainers are actively working to update managed resources for other systems including Azure,
|
||||||
GCP, Terraform, Helm, GitHub, etc to support namespaced MRs soon.
|
GCP, Terraform, Helm, GitHub, etc to support namespaced MRs.
|
||||||
<!-- vale gitlab.FutureTense = YES -->
|
<!-- vale gitlab.FutureTense = YES -->
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue