crossplane / crossplane/docs

Figure out what OAPI and Kubernetes CEL stuff should be covered in XRD docs

Open
#529 0 comments 1 reaction 0 assignees View on GitHub
concepts/composition-revisions docs P3
Dominant language
SCSS
Stars
60
Forks
163
Avg merge
15h 20m
Merged PRs (30d)
9

Description

### What's Missing?
https://kubernetes.io/blog/2022/09/29/enforce-immutability-using-cel/#generated-schema

We can make XRD fields immutable using the CEL stuff for CRDs.

Example in an XRD

```yaml
versions:
- name: v1alpha1
served: true
referenceable: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
someData:
type: object
properties:
myField:
items:
type: string
type: array
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
```

Trying to update the field will produce an error.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.