Class: Kuby::GKE::Config

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

Instance Method Summary collapse

Instance Method Details

#hash_valueObject



11
12
13
14
15
16
17
18
# File 'lib/kuby/gke/config.rb', line 11

def hash_value
  keyfile_hash = Digest::SHA256.hexdigest(
    File.exist?(keyfile) ? File.read(keyfile) : ""
  )

  parts = [project_id, cluster_name, zone, keyfile, keyfile_hash]
  Digest::SHA256.hexdigest(parts.join(':'))
end