Add a script to copy the content of the custom folder to a running pod

For now it is only labels, but adding anything supported will work
(robots.txt, public files, templates, etc)

The content will be copied to the /data/gitea/ folder that is a mounted
persistent volume

https://docs.gitea.io/en-us/customizing-gitea/
This commit is contained in:
Greg Karékinian
2019-02-27 17:47:48 +01:00
parent 0a60d8831c
commit bbfa3f2964
7 changed files with 22 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ secret = `kubectl get secret gitea-config -o yaml`
yaml = YAML.load(secret)
yaml['data'].each do |key, data|
filename = File.join('kubernetes', 'custom', 'config', key)
filename = File.join('kubernetes', 'config', key)
File.open(filename, "w+") do |f|
puts "Writing #{filename}"
f.write Base64.decode64(data)