Remove unused YAML tags and GetYAML/SetYAML methods

Unneeded after move to ghodss/yaml.
This commit is contained in:
Sam Ghods
2014-11-30 21:31:52 -08:00
parent 1208946f55
commit 6399854240
34 changed files with 980 additions and 1069 deletions

View File

@@ -16,8 +16,8 @@ $ enscope specFilename configFilename
## Scope schema
```
type EnscopeSpec struct {
NameSuffix string `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
NameSuffix string `json:"nameSuffix,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
```
@@ -211,4 +211,4 @@ Output:
name: bar-solo-coolapp-prod
status:
replicas: 0
```
```

View File

@@ -38,8 +38,8 @@ func checkErr(err error) {
// TODO: If name suffix is not specified, deterministically generate it by hashing the labels.
type EnscopeSpec struct {
NameSuffix string `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
NameSuffix string `json:"nameSuffix,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
func main() {

View File

@@ -17,13 +17,13 @@ $ simplegen http://some.blog.site.com/k8s-example.yaml
### Schema
```
// Optional: Defaults to image base name if not specified
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Name string `json:"name,omitempty"`
// Required.
Image string `yaml:"image" json:"image"`
Image string `json:"image"`
// Optional: Defaults to one
Replicas int `yaml:"replicas,omitempty" json:"replicas,omitempty"`
Replicas int `json:"replicas,omitempty"`
// Optional: Creates a service if specified: servicePort:containerPort
PortSpec string `yaml:"portSpec,omitempty" json:"portSpec,omitempty"`
PortSpec string `json:"portSpec,omitempty"`
```
### Example

View File

@@ -45,13 +45,13 @@ const usage = "usage: simplegen filename"
type SimpleService struct {
// Optional: Defaults to image base name if not specified
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Name string `json:"name,omitempty"`
// Required.
Image string `yaml:"image" json:"image"`
Image string `json:"image"`
// Optional: Defaults to one
Replicas int `yaml:"replicas,omitempty" json:"replicas,omitempty"`
Replicas int `json:"replicas,omitempty"`
// Optional: Creates a service if specified: servicePort:containerPort
PortSpec string `yaml:"portSpec,omitempty" json:"portSpec,omitempty"`
PortSpec string `json:"portSpec,omitempty"`
}
func checkErr(err error) {

View File

@@ -15,9 +15,9 @@ $ srvexpand myservice.yaml
```
type HierarchicalController struct {
// Optional: Defaults to one
Replicas int `yaml:"replicas,omitempty" json:"replicas,omitempty"`
Replicas int `json:"replicas,omitempty"`
// Spec defines the behavior of a pod.
Spec v1beta3.PodSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
Spec v1beta3.PodSpec `json:"spec,omitempty"`
}
type ControllerMap map[string]HierarchicalController
@@ -25,9 +25,9 @@ type ControllerMap map[string]HierarchicalController
type HierarchicalService struct {
// Optional: Creates a service if specified: servicePort:containerPort
// TODO: Support multiple protocols
PortSpec string `yaml:"portSpec,omitempty" json:"portSpec,omitempty"`
PortSpec string `json:"portSpec,omitempty"`
// Map of replication controllers to create
ControllerMap ControllerMap `json:"controllers,omitempty" yaml:"controllers,omitempty"`
ControllerMap ControllerMap `json:"controllers,omitempty"`
}
type ServiceMap map[string]HierarchicalService
@@ -213,4 +213,4 @@ Output:
status:
replicas: 0
```
```

View File

@@ -62,9 +62,9 @@ const usage = "usage: srvexpand filename"
type HierarchicalController struct {
// Optional: Defaults to one
Replicas int `yaml:"replicas,omitempty" json:"replicas,omitempty"`
Replicas int `json:"replicas,omitempty"`
// Spec defines the behavior of a pod.
Spec v1beta3.PodSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
Spec v1beta3.PodSpec `json:"spec,omitempty"`
}
type ControllerMap map[string]HierarchicalController
@@ -72,9 +72,9 @@ type ControllerMap map[string]HierarchicalController
type HierarchicalService struct {
// Optional: Creates a service if specified: servicePort:containerPort
// TODO: Support multiple protocols
PortSpec string `yaml:"portSpec,omitempty" json:"portSpec,omitempty"`
PortSpec string `json:"portSpec,omitempty"`
// Map of replication controllers to create
ControllerMap ControllerMap `json:"controllers,omitempty" yaml:"controllers,omitempty"`
ControllerMap ControllerMap `json:"controllers,omitempty"`
}
type ServiceMap map[string]HierarchicalService