Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
nil pointer when keep .spec.Image is empty field
2024/01/31 11:56:15 http: panic serving [2a02:6b8:c08:b58d:0:1517:2:ec]:60364: runtime error: invalid memory address or nil pointer dereference goroutine 49187 [running]: net/http.(*conn).serve.func1() /usr/local/go/src/net/http/server.go:1850 +0xbf panic({0x1991240, 0x2d46090}) /usr/local/go/src/runtime/panic.go:890 +0x262 github.com/ydb-platform/ydb-kubernetes-operator/api/v1alpha1.(*StorageDefaulter).Default(0xc000d51f20?, {0x24?, 0xc0009f9998?}, {0x1f044e0?, 0xc0004deb00}) /workspace/api/v1alpha1/storage_webhook.go:80 +0x16b sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*defaulterForType).Handle(_, {_, _}, {{{0xc000d51f20, 0x24}, {{0xc0009f9998, 0x8}, {0xc0009f99c0, 0x8}, {0xc0009f99c8, ...}}, ...}}) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.1/pkg/webhook/admission/defaulter_custom.go:84 +0x2fd sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).Handle(_, {_, _}, {{{0xc000d51f20, 0x24}, {{0xc0009f9998, 0x8}, {0xc0009f99c0, 0x8}, {0xc0009f99c8, ...}}, ...}}) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.1/pkg/webhook/admission/webhook.go:169 +0xfd sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).ServeHTTP(0xc000ab1000, {0x7f69652b3bc0?, 0xc0008157c0}, 0xc0009f7400) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.1/pkg/webhook/admission/http.go:98 +0xed2 github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerInFlight.func1({0x7f69652b3bc0, 0xc0008157c0}, 0x1f16300?) /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/promhttp/instrument_server.go:60 +0xd4 net/http.HandlerFunc.ServeHTTP(0x1f163f0?, {0x7f69652b3bc0?, 0xc0008157c0?}, 0x7ba3e0?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1({0x1f163f0?, 0xc000826e00?}, 0xc0009f7400) /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/promhttp/instrument_server.go:146 +0xb8 net/http.HandlerFunc.ServeHTTP(0x0?, {0x1f163f0?, 0xc000826e00?}, 0xc000d51e60?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2({0x1f163f0, 0xc000826e00}, 0xc0009f7400) /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/promhttp/instrument_server.go:108 +0xbf net/http.HandlerFunc.ServeHTTP(0xc000826e00?, {0x1f163f0?, 0xc000826e00?}, 0x1c4ecef?) /usr/local/go/src/net/http/server.go:2109 +0x2f net/http.(*ServeMux).ServeHTTP(0xc000c8d8a7?, {0x1f163f0, 0xc000826e00}, 0xc0009f7400) /usr/local/go/src/net/http/server.go:2487 +0x149 net/http.serverHandler.ServeHTTP({0x1f08360?}, {0x1f163f0, 0xc000826e00}, 0xc0009f7400) /usr/local/go/src/net/http/server.go:2947 +0x30c net/http.(*conn).serve(0xc0006adcc0, {0x1f175b0, 0xc000599b30}) /usr/local/go/src/net/http/server.go:1991 +0x607 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3102 +0x4db
What is the new behavior?
Other information
generate manifests from previous changes