Documentation ¶
Index ¶
- type Deployment
- type Parser
- func (p *Parser) Deployment(file string) error
- func (p *Parser) GetImage() string
- func (p *Parser) GetImageForContainer(containerName string) string
- func (p *Parser) SetImage(newImage string)
- func (p *Parser) SetImageForContainer(newImage string, containerName string)
- func (p *Parser) WriteDeployment(outFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct { Kind string `yaml:"kind"` APIVersion string `yaml:"apiVersion"` Metadata struct { Name string `yaml:"name"` } `yaml:"metadata"` Spec struct { Template struct { Metadata struct { Labels struct { Name string `yaml:"name"` } `yaml:"labels"` } `yaml:"metadata"` Spec struct { Containers []struct { Name string `yaml:"name"` Image string `yaml:"image"` Ports []struct { ContainerPort int `yaml:"containerPort"` Protocol string `yaml:"protocol"` } `yaml:"ports"` } `yaml:"containers"` } `yaml:"spec"` } `yaml:"template"` Replicas int `yaml:"replicas"` Triggers []struct { Type string `yaml:"type"` ImageChangeParams struct { Automatic bool `yaml:"automatic"` ContainerNames []string `yaml:"containerNames"` From struct { Kind string `yaml:"kind"` Name string `yaml:"name"` } `yaml:"from"` } `yaml:"imageChangeParams,omitempty"` } `yaml:"triggers,omitempty"` Strategy struct { Type string `yaml:"type"` } `yaml:"strategy"` Paused bool `yaml:"paused"` RevisionHistoryLimit int `yaml:"revisionHistoryLimit"` MinReadySeconds int `yaml:"minReadySeconds"` } `yaml:"spec"` }
Deployment is the struct type for Openshift App Deployment configuration
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is the main callable struct
func (*Parser) Deployment ¶
Deployment reads the yaml and returns the Deployment struct
func (*Parser) GetImageForContainer ¶
GetImageForContainer returns the image used in a specific container name
func (*Parser) SetImageForContainer ¶
SetImageForContainer sets new image for specific container name
func (*Parser) WriteDeployment ¶
WriteDeployment writes the parsed YAML into a file
Click to show internal directories.
Click to hide internal directories.