Class: EksCli::K8s::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/eks_cli/k8s/auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(cluster_name) ⇒ Auth

Returns a new instance of Auth.



13
14
15
# File 'lib/eks_cli/k8s/auth.rb', line 13

def initialize(cluster_name)
  @cluster_name = cluster_name
end

Instance Method Details

#updateObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/eks_cli/k8s/auth.rb', line 17

def update
  Log.info "updating auth configmap on kubernetes"
  begin
    k8s_client.get_config_map("aws-auth", "kube-system")
    k8s_client.update_config_map(configmap)
  rescue KubeException => e
    Log.debug "exception updating configmap: #{e}"
    k8s_client.create_config_map(configmap)
  end
  Log.info "done"
end