Sha256: 768dfed508efcbcb82efc571c599be5d8facc3f9059dbe54a3caa2a276707f57

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

# typed: true
module Kuby
  class Plugin
    attr_reader :environment

    def initialize(environment)
      @environment = environment
      after_initialize
    end

    def configure(&block)
      # do nothing by default
    end

    def setup
      # do nothing by default
    end

    # additional kubernetes resources that should be deployed
    def resources
      []
    end

    # additional docker images that should be built and pushed
    def docker_images
      []
    end

    # called after all plugins have been configured
    def after_configuration
      # do nothing by default
    end

    # called before any plugins have been setup
    def before_setup
      # do nothing by default
    end

    # called after all plugins have been setup
    def after_setup
      # do nothing by default
    end

    # called before deploying any resources
    def before_deploy(manifest)
      # do nothing by default
    end

    # called after deploying all resources
    def after_deploy(manifest)
      # do nothing by default
    end

    private

    def after_initialize
      # override this in derived classes
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kuby-core-0.16.1 lib/kuby/plugin.rb
kuby-core-0.16.0 lib/kuby/plugin.rb
kuby-core-0.15.0 lib/kuby/plugin.rb
kuby-core-0.14.0 lib/kuby/plugin.rb
kuby-core-0.13.0 lib/kuby/plugin.rb
kuby-core-0.12.0 lib/kuby/plugin.rb