File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ $(BIN): $(VBIN_LINUX_AMD64) $(VBIN_OPS_LINUX_AMD64) $(VBIN_INT_LINUX_AMD64)
475475@cp " $( VBIN_OPS_LINUX_AMD64) " " $( BIN_OPS) "
476476
477477.PHONY : docker
478- docker : check-vars $(VBIN_LINUX_AMD64 ) $(VBIN_LINUX_ARM64 )
478+ docker : clean check-vars $(VBIN_LINUX_AMD64 ) $(VBIN_LINUX_ARM64 )
479479ifdef PUSHIMAGES
480480docker buildx build --no-cache -f $(DOCKERFILE) --build-arg GOVERSION=$(GOVERSION) --build-arg DISTRIBUTION=$(DISTRIBUTION) \
481481--build-arg "VERSION=${VERSION_MAJOR_MINOR_PATCH}" --build-arg "RELEASE_MODE=$(RELEASE_MODE)" \
Original file line number Diff line number Diff line change @@ -436,6 +436,11 @@ func (s *DeploymentSpec) SetDefaults(deploymentName string) {
436436if s .GetImagePullPolicy () == "" {
437437s .ImagePullPolicy = util.NewType [core.PullPolicy ](core .PullIfNotPresent )
438438}
439+ if s .Gateway .IsEnabled () {
440+ if s .Gateways == nil {
441+ s .Gateways = & ServerGroupSpec {}
442+ }
443+ }
439444s .ExternalAccess .SetDefaults ()
440445s .RocksDB .SetDefaults ()
441446s .Authentication .SetDefaults (deploymentName + "-jwt" )
@@ -574,7 +579,7 @@ func (s *DeploymentSpec) Validate() error {
574579if err := s .Architecture .Validate (); err != nil {
575580return errors .WithStack (errors .Wrap (err , "spec.architecture" ))
576581}
577- if err := s .Architecture .Validate (); err != nil {
582+ if err := s .Gateway .Validate (); err != nil {
578583return errors .WithStack (errors .Wrap (err , "spec.architecture" ))
579584}
580585return nil
Original file line number Diff line number Diff line change @@ -436,6 +436,11 @@ func (s *DeploymentSpec) SetDefaults(deploymentName string) {
436436if s .GetImagePullPolicy () == "" {
437437s .ImagePullPolicy = util.NewType [core.PullPolicy ](core .PullIfNotPresent )
438438}
439+ if s .Gateway .IsEnabled () {
440+ if s .Gateways == nil {
441+ s .Gateways = & ServerGroupSpec {}
442+ }
443+ }
439444s .ExternalAccess .SetDefaults ()
440445s .RocksDB .SetDefaults ()
441446s .Authentication .SetDefaults (deploymentName + "-jwt" )
@@ -574,7 +579,7 @@ func (s *DeploymentSpec) Validate() error {
574579if err := s .Architecture .Validate (); err != nil {
575580return errors .WithStack (errors .Wrap (err , "spec.architecture" ))
576581}
577- if err := s .Architecture .Validate (); err != nil {
582+ if err := s .Gateway .Validate (); err != nil {
578583return errors .WithStack (errors .Wrap (err , "spec.architecture" ))
579584}
580585return nil
Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ func (o *Operator) handleDeploymentEvent(event *Event) error {
149149return errors .WithStack (errors .Errorf ("ignore failed deployment (%s). Please delete its CR" , apiObject .Name ))
150150}
151151
152+ defer func () {
153+ // recover() will return nil if there's no panic
154+ if r := recover (); r != nil {
155+ o .log .Error ("Recovered from panic:" , r )
156+ }
157+ }()
158+
152159switch event .Type {
153160case kwatch .Added :
154161if _ , ok := o .deployments [apiObject .Name ]; ok {
You can’t perform that action at this time.
0 commit comments