Skip to content

Commit

Permalink
Create v1.14 docs branch and merge initial content (#574)
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Lumbis <[email protected]>
  • Loading branch information
plumbis committed Nov 1, 2023
1 parent cc6550c commit e35abf1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/master/concepts/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ configuring the Crossplane Pod settings in the
Provide the name of the Configuration's `.xpkg` file and set
{{<hover label="offline" line="7">}}packagePullPolicy: Never{{</hover>}}.

For example, to install a locally stored version of
For example, to install a locally downloaded version of
Upbound AWS reference platform set the
{{<hover label="offline" line="6">}}package{{</hover>}} to the local filename
and set the Configuration's
Expand Down
48 changes: 48 additions & 0 deletions content/v1.14/concepts/compositions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1290,8 +1290,13 @@ Composition.

## Composition validation

<<<<<<< HEAD
When creating a Composition, Crossplane automatically validates its integrity,
checking that the Composition is well formed, for example:
=======
When creating a Composition Crossplane automatically validates specific
parameters in the Composition.
>>>>>>> bf5e306 (Create v1.14 docs branch and merge initial content (#574))

* All resources either use a `name` or don't. Compositions can't use both named
and unnamed resources.
Expand All @@ -1308,6 +1313,7 @@ checking that the Composition is well formed, for example:
* Composition function `type` is `container`.
* Composition function names are unique.

<<<<<<< HEAD
### Composition schema aware validation

Crossplane also performs schema aware
Expand Down Expand Up @@ -1361,17 +1367,57 @@ If not specified, the default mode is `warn`.

For example, to enable `loose` mode checking set the annotation value to
{{<hover label="mode" line="5">}}loose{{</hover>}}.
=======
### Resource schema validation
<!-- vale write-good.TooWordy = NO -->
Optionally, Crossplane can also validate the schema of the resources defined
inside a Composition. This verifies that the resource `apiVersion` and `kinds`
are valid.
<!-- vale write-good.TooWordy = YES -->

Enable "schema validation" with the
`--enable-composition-webhook-schema-validation` flag on the Crossplane pod.
The [Crossplane Pods]({{<ref "./pods#edit-the-deployment">}}) page has
more information on enabling Crossplane flags.

{{<hint "note" >}}
<!-- vale write-good.TooWordy = NO -->
Schema validation only checks the `apiVersion` and `kind` are valid. Schema
validation doesn't validate the fields of a specific resource.
<!-- vale write-good.TooWordy = YES -->
{{< /hint >}}

The default validations are still checked with schema validation enabled.
#### Validation modes

Schema validation supports two modes:
* `loose` (default) - Sends an warning for each schema error and installs the
Composition if the default validations pass.
* `strict` - Send an error for every schema validation error and rejects the
Composition.

Change the validation mode for a Composition with the
{{<hover label="mode" line="5">}}crossplane.io/composition-validation-mode{{</hover>}}
annotation.

For example, to enable `strict` mode checking:
>>>>>>> bf5e306 (Create v1.14 docs branch and merge initial content (#574))

```yaml {copy-lines="none",label="mode"}
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
annotations:
<<<<<<< HEAD
crossplane.io/composition-schema-aware-validation-mode: loose
=======
crossplane.io/composition-validation-mode: strict
>>>>>>> bf5e306 (Create v1.14 docs branch and merge initial content (#574))
# Removed for brevity
spec:
# Removed for brevity
```
<<<<<<< HEAD

{{<hint "important" >}}
Validation modes also apply to Compositions defined by Configuration packages.
Expand All @@ -1385,3 +1431,5 @@ Crossplane sets a Configuration as unhealthy if there are validation errors.
View the Configuration details with `kubectl describe configuration` to see the
specific errors.
{{< /hint >}}
=======
>>>>>>> bf5e306 (Create v1.14 docs branch and merge initial content (#574))

0 comments on commit e35abf1

Please sign in to comment.