fix: address review findings in operator and tests
- Remove duplicate "Starting controller manager" log before install phases, keep only the one before mgr.Start() - Rename misleading test "document without kind returns error" to "decoder rejects document without kind" to match actual behavior - Document Helm uninstall CRD behavior in deployment template comment - Use --health-probe-bind-address=0 consistently with metrics-bind - Exclude all dotfiles in verify-crds diff, not just .gitattributes Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
9eb13fdafe
commit
92d261fc1e
4 changed files with 7 additions and 7 deletions
2
Makefile
2
Makefile
|
|
@ -81,7 +81,7 @@ test:
|
|||
make -C packages/core/testing test
|
||||
|
||||
verify-crds:
|
||||
@diff --recursive packages/core/installer/crds/ internal/crdinstall/manifests/ --exclude=.gitattributes \
|
||||
@diff --recursive packages/core/installer/crds/ internal/crdinstall/manifests/ --exclude='.*' \
|
||||
|| (echo "ERROR: CRD manifests out of sync. Run 'make generate' to fix." && exit 1)
|
||||
|
||||
unit-tests: helm-unit-tests verify-crds
|
||||
|
|
|
|||
|
|
@ -137,8 +137,7 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Start the controller manager
|
||||
setupLog.Info("Starting controller manager")
|
||||
// Initialize the controller manager
|
||||
mgr, err := ctrl.NewManager(config, ctrl.Options{
|
||||
Scheme: scheme,
|
||||
Cache: cache.Options{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ metadata:
|
|||
wantCount: 0,
|
||||
},
|
||||
{
|
||||
name: "document without kind returns error",
|
||||
name: "decoder rejects document without kind",
|
||||
input: `apiVersion: v1
|
||||
metadata:
|
||||
name: test
|
||||
|
|
|
|||
|
|
@ -54,11 +54,12 @@ spec:
|
|||
- --leader-elect=true
|
||||
- --install-flux=true
|
||||
# CRDs are also in crds/ for initial helm install, but Helm never updates
|
||||
# them on upgrade. The operator applies embedded CRDs via server-side apply
|
||||
# on every startup, ensuring they stay up to date.
|
||||
# them on upgrade and never deletes them on uninstall. The operator applies
|
||||
# embedded CRDs via server-side apply on every startup, ensuring they stay
|
||||
# up to date. To fully remove CRDs, delete them manually after helm uninstall.
|
||||
- --install-crds=true
|
||||
- --metrics-bind-address=0
|
||||
- --health-probe-bind-address=
|
||||
- --health-probe-bind-address=0
|
||||
{{- if .Values.cozystackOperator.disableTelemetry }}
|
||||
- --disable-telemetry
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue