lib/seira/secrets.rb in seira-0.3.6 vs lib/seira/secrets.rb in seira-0.3.7

- old
+ new

@@ -45,10 +45,10 @@ end end def copy_secret_across_namespace(key:, to:, from:) puts "Copying the #{key} secret from namespace #{from} to #{to}." - json_string = kubectl("get secret #{key} -o json", context: context, return_output: true) + json_string = kubectl("get secret #{key} -o json -n #{from}", context: :none, return_output: true) secrets = JSON.parse(json_string) # At this point we would preferably simply do a write_secrets call, but the metadata is highly coupled to old # namespace so we need to clear out the old metadata new_secrets = Marshal.load(Marshal.dump(secrets))