plugins/kubernetes/app/models/kubernetes/resource.rb
def update
        if server_side_apply?
          server_side_apply template_for_update
        else
          request :update, template_for_update
        end
        expire_resource_cache
      rescue Samson::Hooks::UserError => e
        raise unless e.message.match?(/cannot change|Forbidden: updates to .* for fields other than/)

        path = [:metadata, :annotations, :"samson/force_update"]
        if @template.dig(*path) == "true"
          delete
          create
        else
          raise Samson::Hooks::UserError, "#{e.message} (#{path.join(".")}=\"true\" to recreate)"
        end
      end
# TODO: remove the expire_cache and assign @resource but that breaks a bunch of deploy_executor tests
remove the expire_cache and assign @resource but that breaks a bunch of deploy_executor tests
remove the expire_cache and assign @resource but that breaks a bunch of deploy_executor tests
def update
        if server_side_apply?
          server_side_apply template_for_update
        else
          request :update, template_for_update
        end
        expire_resource_cache
      rescue Samson::Hooks::UserError => e
        raise unless e.message.match?(/cannot change|Forbidden: updates to .* for fields other than/)
        path = [:metadata, :annotations, :"samson/force_update"]
        if @template.dig(*path) == "true"
          delete
          create
        else
          raise Samson::Hooks::UserError, "#{e.message} (#{path.join(".")}=\"true\" to recreate)"
        end
      end
def update if server_side_apply? server_side_apply template_for_update else request :update , template_for_update end expire_resource_cache rescue Samson :: Hooks :: UserError => e raise unless e . message . match? ( / cannot change|Forbidden: updates to .* for fields other than / ) path = [ :metadata , :annotations , :" samson/force_update " ] if @template . dig ( * path ) == "true" delete create else raise Samson :: Hooks :: UserError , "#{e.message} (#{path.join(".")}=\"true\" to recreate)" end end
TODO: remove the expire_cache and assign @resource but that breaks a bunch of deploy_executor tests
TODO : remove the expire_cache and assign @resource but that breaks a bunch of deploy_executor tests