Sha256: b058f379318931a1e7934b38683b17f475aa359fbf255b4a7fca82aef844b48b

Contents?: true

Size: 1011 Bytes

Versions: 3

Compression:

Stored size: 1011 Bytes

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

  module Errors
    extend self
    def server_version_warning(server_version)
      "Minimum cluster version requirement of #{MIN_KUBE_VERSION} not met. "\
      "Using #{server_version} could result in unexpected behavior as it is no longer tested against"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kubernetes-deploy-0.25.0 lib/kubernetes-deploy/errors.rb
kubernetes-deploy-0.24.0 lib/kubernetes-deploy/errors.rb
kubernetes-deploy-0.23.0 lib/kubernetes-deploy/errors.rb