Skip to content

Instantly share code, notes, and snippets.

@pmorie
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save pmorie/7ff294b844504761673c to your computer and use it in GitHub Desktop.

Select an option

Save pmorie/7ff294b844504761673c to your computer and use it in GitHub Desktop.
// DeploymentTriggerPolicy describes a policy for a single trigger triggers that result in a new Deployment.
type DeploymentTriggerPolicy struct {
Type DeploymentTriggerType
ImageParams *ImageChangeTriggerParams
}
type ImageChangeTriggerParams struct {
RepositoryName string
ImageName string
}
type DeploymentTriggerType string
const (
DeploymentTriggerOnImageChange DeploymentTriggerType = "image-change"
DeploymentTriggerOnConfigChange DeploymentTriggerType = "config-change"
DeploymentTriggerManual DeploymentTriggerType = "manual"
)
// DeploymentConfig represents a configuration for a single deployment of a replication controller:
// what the template for the deployment, how new deployments are triggered, what the current
// deployed state is.
type DeploymentConfig struct {
api.JSONBase `json:",inline" yaml:",inline"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
TriggerPolicies []DeploymentTriggerPolicy `json:"triggerPolicy,omitempty" yaml:"triggerPolicy,omitempty"`
Template DeploymentTemplate `json:"template,omitempty" yaml:"template,omitempty"`
CurrentState api.ReplicationControllerState `json:"currentState" yaml:"currentState,omitempty"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment