Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #173 from joshwget/scale-policy
Browse files Browse the repository at this point in the history
Add scale policy
  • Loading branch information
ibuildthecloud authored Jun 26, 2016
2 parents fa19d97 + 7338718 commit 3ecc0da
Show file tree
Hide file tree
Showing 17 changed files with 175 additions and 210 deletions.
1 change: 1 addition & 0 deletions rancher/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type RancherConfig struct {
DefaultCert string `yaml:"default_cert,omitempty"`
Certs []string `yaml:"certs,omitempty"`
Metadata map[string]interface{} `yaml:"metadata,omitempty"`
ScalePolicy *rancherClient.ScalePolicy `yaml:"scale_policy,omitempty"`
ServiceSchemas map[string]rancherClient.Schema `yaml:"service_schemas,omitempty"`
UpgradeStrategy rancherClient.InServiceUpgradeStrategy `yaml:"upgrade_strategy,omitempty"`
}
Expand Down
1 change: 1 addition & 0 deletions rancher/normal.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (f *NormalFactory) config(r *RancherService) (*CompositeService, *rancherCl
Name: r.name,
Metadata: r.Metadata(),
Scale: int64(r.getConfiguredScale()),
ScalePolicy: rancherConfig.ScalePolicy,
RetainIp: rancherConfig.RetainIp,
EnvironmentId: r.Context().Environment.Id,
SelectorContainer: r.SelectorContainer(),
Expand Down
1 change: 1 addition & 0 deletions scripts/config_schema_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"restart": {"type": "string"},
"retain_ip": {"type": "boolean"},
"scale": {"type": "number"},
"scale_policy": {"type": "object"},
"security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"shm_size": {"type": ["number", "string"]},
"stdin_open": {"type": "boolean"},
Expand Down
2 changes: 1 addition & 1 deletion trash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import:
version: ecc762f6877af82d7c6f56cae2a50045951f8af1

- package: github.com/rancher/go-rancher
version: 6f68a5fa617dca7db1a509c2a789c1fffaca7b19
version: 37c17e456a2d6dce279f54ee2f957797d30a20dc

- package: github.com/rancher/rancher-catalog-service
version: a3a8b500adceb82b3a0387b2c7b06a60e7eeee9a
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/docker/libcompose/config/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ecc0da

Please sign in to comment.