Files
ubicloud/rhizome/kubernetes/bin/join-worker-node
mohi-kalantari 6a85edc1ae Call setup-cni script on join-worker-node rhizome
Calling the setup-cni script was missed in join script. Now the issue
is fixed
2025-02-06 10:54:44 +01:00

21 lines
536 B
Ruby
Executable File

#!/bin/env ruby
# frozen_string_literal: true
require "json"
require_relative "../../common/lib/util"
params = JSON.parse($stdin.read)
begin
endpoint = params.fetch("endpoint")
join_token = params.fetch("join_token")
discovery_token_ca_cert_hash = params.fetch("discovery_token_ca_cert_hash")
rescue KeyError => e
puts "Needed #{e.key} in parameters"
exit 1
end
r "kubeadm join #{endpoint} --token #{join_token} --discovery-token-ca-cert-hash #{discovery_token_ca_cert_hash}"
r("sudo /home/ubi/kubernetes/bin/setup-cni")