Class: Kuby::EKS::Config

Inherits:
Object
  • Object
show all
Extended by:
KubeDSL::ValueFields
Defined in:
lib/kuby/eks/config.rb

Instance Method Summary collapse

Instance Method Details

#hash_valueObject

Double .credentials call here to convert instance into a Credentials object, which contains an access key ID and a secret access key. All the various credentials objects respond to this method, including SharedCredentials, InstanceProfileCredentials, etc.

See: docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Credentials.html



19
20
21
22
23
24
25
26
27
28
# File 'lib/kuby/eks/config.rb', line 19

def hash_value
  parts = [
    region,
    cluster_name,
    credentials.credentials.secret_access_key,
    credentials.credentials.access_key_id,
  ]

  Digest::SHA256.hexdigest(parts.join(':'))
end