Sha256: 59a02716cc56a6e6d8eb3d3c6b2db6ea0fb75fff206ec62860ddccecfa632af1

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true
module KubernetesDeploy
  class FatalDeploymentError < StandardError; end
  class FatalKubeAPIError < FatalDeploymentError; end
  class KubectlError < StandardError; end
  class TaskConfigurationError < FatalDeploymentError; end

  class InvalidTemplateError < FatalDeploymentError
    attr_reader :content
    attr_accessor :filename
    def initialize(err, filename: nil, content: nil)
      @filename = filename
      @content = content
      super(err)
    end
  end

  class NamespaceNotFoundError < FatalDeploymentError
    def initialize(name, context)
      super("Namespace `#{name}` not found in context `#{context}`")
    end
  end

  class DeploymentTimeoutError < FatalDeploymentError; end

  class EjsonPrunableError < FatalDeploymentError
    def initialize
      super("Found #{KubernetesResource::LAST_APPLIED_ANNOTATION} annotation on " \
          "#{EjsonSecretProvisioner::EJSON_KEYS_SECRET} secret. " \
          "kubernetes-deploy will not continue since it is extremely unlikely that this secret should be pruned.")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kubernetes-deploy-0.30.0 lib/kubernetes-deploy/errors.rb
kubernetes-deploy-0.29.0 lib/kubernetes-deploy/errors.rb
kubernetes-deploy-0.28.0 lib/kubernetes-deploy/errors.rb
kubernetes-deploy-0.27.0 lib/kubernetes-deploy/errors.rb