Commit 175f162
committed
chore: standardize controller kustomize implementation
Motivation:
This refactoring aligns the controller's kustomize configuration with best
practices and ensures consistency with other components (backend, frontend).
The primary goals were:
- Remove nested subdirectories (bases/, patches/) to match the flat structure
used in other base directories
- Ensure components are only included in overlays, not the base
- Improve maintainability through consistent naming conventions
- Better organize resources by their purpose and dependencies
Changes Made:
1. Flattened CRD directory structure:
- Moved CRD base files from crd/bases/ to crd/
- Moved patch files from crd/patches/ to crd/
- Updated all references in Makefile and test files
2. Standardized patch file naming:
- Renamed cainjection_in_*.yaml → *_cainjection_patch.yaml
- Renamed webhook_in_*.yaml → *_webhook_patch.yaml
- Provides consistent naming pattern across all patches
3. Component organization:
- Moved metrics_service.yaml to prometheus component (only included when
prometheus is enabled)
- Moved manager_webhook_patch.yaml to certmanager component (only needed
when cert-manager is enabled)
- Extracted namespace.yaml from manager.yaml for explicit definition
4. Updated references:
- Makefile: Changed controller-gen output path from crd/bases to crd
- Test files: Updated CRDDirectoryPaths in controller, webhook, and backend
test suites
5. Removed unused build-installer target:
- Removed from Makefile and README as it's not used and kustomize provides
better facilities for vendoring
Expected Manifest Output Differences:
1. webhook-service port now has name attribute:
- Added `name: webhook` to the port definition
- This enables replacements to reference the port by name, improving
maintainability and keeping port values in sync between Service and
Deployment
2. workspaces-controller-metrics-service is missing:
- This is expected as metrics_service.yaml was moved to the prometheus
component
- The service will only appear when the prometheus component is explicitly
enabled in an overlay
3. kubeflow-workspaces-istio-config ConfigMap labels:
- Common labels were added (app.kubernetes.io/managed-by, app.kubernetes.io/name,
app.kubernetes.io/part-of) due to reordering of components in the overlay
- The common component is now applied last to ensure its labels are applied
to all resources consistently
4. All other resources remain functionally equivalent:
- CRDs, Deployments, Services, RBAC, and webhook configurations are
unchanged in functionality
- Only structural and organizational improvements were made
Signed-off-by: Andy Stoneberg <[email protected]>1 parent 84a1c72 commit 175f162
File tree
62 files changed
+337
-252
lines changed- workspaces
- backend/api
- controller
- config
- certmanager
- default
- manager
- prometheus
- webhook
- internal
- controller
- webhook
- manifests/kustomize
- base
- crd
- manager
- webhook
- components
- certmanager
- common
- istio
- prometheus
- overlays/istio
- samples
- common
- test/e2e
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
62 files changed
+337
-252
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 124 | | |
128 | 125 | | |
129 | 126 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
| 132 | + | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
139 | | - | |
| 136 | + | |
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
144 | | - | |
| 140 | + | |
| 141 | + | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
148 | | - | |
| 145 | + | |
149 | 146 | | |
150 | 147 | | |
151 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
Lines changed: 0 additions & 9 deletions
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 0 additions & 10 deletions
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 6 deletions
This file was deleted.
This file was deleted.
0 commit comments