Commit e5b9483
authored
feat: update Function CRD to use packageRef instead of package field (#204)
### Motivation
The Function CRD was using a simple `package` field as a string, which
limited the ability to reference Package resources across namespaces and
didn't follow Kubernetes best practices for resource references. This
change updates the Function CRD to use a proper `packageRef` object that
includes both name and namespace fields, allowing for better resource
management and cross-namespace package references.
### Modifications
- **Updated Function CRD schema**: Changed the `package` field from a
simple string to a `packageRef` object with `name` and `namespace`
properties
- **Enhanced developer documentation**: Added a new section in
`operator/DEVELOPER.md` explaining the process for updating CRD
definitions and ensuring Helm chart templates stay in sync
- **Updated Helm chart templates**: Modified the CRD template in
`operator/deploy/chart/templates/crd/fs.functionstream.github.io_functions.yaml`
to reflect the new schema structure
The changes ensure that:
- Functions can now reference Package resources across different
namespaces
- The CRD follows Kubernetes conventions for resource references
- Developers have clear guidance on maintaining CRD and Helm chart
consistency
- Both direct CRD installation and Helm chart installation will have
consistent behavior1 parent 985bd76 commit e5b9483
File tree
2 files changed
+26
-4
lines changed- operator
- deploy/chart/templates/crd
2 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
112 | 125 | | |
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
116 | | - | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
0 commit comments