Commit 8acbd77
committed
### What changes were proposed in this pull request?
This PR aims to support `v1alpha1` and `v1beta1`.
- Both `v1alpha1` and `v1beta1` will be accepted and be stored as `v1beta1`.
- Since the CRD generator always write a single version, we cannot use it directly from now. We should keep all previous versions in the CRD files inevitably.
- It's also required to protect these CRDs from accidental and breaking changes from `Beta`.
The added CRD files look like the following. Please note that `v1alpha` is `storage: false` and `v1beta1` is `storage: true`.
```yaml
# ... APACHE HEADER ...
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: sparkapplications.spark.apache.org
spec:
group: spark.apache.org
names:
kind: SparkApplication
plural: sparkapplications
shortNames:
- sparkapp
singular: sparkapplication
scope: Namespaced
versions:
- name: v1alpha1
storage: false
...
- name: v1beta1
storage: true
...
```
### Why are the changes needed?
- To support a smooth migration.
- To be clear, there is no schema change from 0.2.0 to 0.3.0 so far. Only, versions are changed.
### Does this PR introduce _any_ user-facing change?
No behavior change.
### How was this patch tested?
Pass the CIs.
After manual installation,
```
$ kubectl get crds sparkapplications.spark.apache.org -oyaml | yq '.spec.versions[].name'
v1alpha1
v1beta1
$ kubectl get crds sparkapplications.spark.apache.org -oyaml | yq .status.storedVersions
- v1beta1
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #220 from dongjoon-hyun/SPARK-52253.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent add99bb commit 8acbd77
File tree
6 files changed
+31989
-6
lines changed- .github/workflows
- build-tools/helm/spark-kubernetes-operator/crds
6 files changed
+31989
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
0 commit comments