16 lines
326 B
Plaintext
16 lines
326 B
Plaintext
|
#!/usr/bin/env ruby
|
||
|
|
||
|
require 'yaml'
|
||
|
require 'base64'
|
||
|
|
||
|
secret = `kubectl get secret gitea-config -o yaml`
|
||
|
yaml = YAML.load(secret)
|
||
|
|
||
|
yaml['data'].each do |key, data|
|
||
|
filename = File.join('kubernetes', 'config', key)
|
||
|
File.open(filename, "w+") do |f|
|
||
|
puts "Writing #{filename}"
|
||
|
f.write Base64.decode64(data)
|
||
|
end
|
||
|
end
|