Class: Kuby::CertManager::Plugin

Inherits:
Kubernetes::Plugin
  • Object
show all
Defined in:
lib/kuby/cert-manager/plugin.rb

Defined Under Namespace

Classes: Config

Constant Summary collapse

NAMESPACE =
'cert-manager'.freeze
CERT_MANAGER_VERSION =
'0.13.1'.freeze
CERT_MANAGER_RESOURCE =
"https://github.com/jetstack/cert-manager/releases/download/v#{CERT_MANAGER_VERSION}/cert-manager.yaml".freeze

Instance Method Summary collapse

Instance Method Details

#annotate_ingress(ingress) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/kuby/cert-manager/plugin.rb', line 28

def annotate_ingress(ingress)
  context = self

  ingress. do
    annotations do
      add :'cert-manager.io/cluster-issuer', context.send(:issuer_name)
    end
  end
end

#configure(&block) ⇒ Object



16
17
18
# File 'lib/kuby/cert-manager/plugin.rb', line 16

def configure(&block)
  @config.instance_eval(&block) if block
end

#resourcesObject



24
25
26
# File 'lib/kuby/cert-manager/plugin.rb', line 24

def resources
  @resources ||= [cluster_issuer]
end

#setupObject



20
21
22
# File 'lib/kuby/cert-manager/plugin.rb', line 20

def setup
  install_cert_manager
end