Load config from yaml file. Cleanup. Should now actually work.

This commit is contained in:
James Munnelly
2016-04-24 22:05:53 +01:00
parent fd9a28ad5d
commit 724e44f61d
6 changed files with 198 additions and 171 deletions
+29
View File
@@ -0,0 +1,29 @@
package common
import (
"k8s.io/kubernetes/pkg/api"
)
type Config struct {
LogFile string `group:"config" namespace:"config"`
Plex *PlexConfig `group:"plex config" namespace:"plex"`
Kubernetes *KubernetesConfig `group:"kubernetes executor" namespace:"kubernetes"`
}
type PlexConfig struct {
URL string
TranscodeDir string `yaml:"transcodeDir"`
MediaDir string `yaml:"mediaDir"`
}
type KubernetesConfig struct {
ProxyURL string `yaml:"proxyUrl"`
Namespace string
PodBasename string `yaml:"podBasename"`
Image string
TranscodeVolumeSource api.VolumeSource `yaml:"transcodeVolumeSource"`
MediaVolumeSource api.VolumeSource `yaml:"mediaVolumeSource"`
}