diff --git a/CHANGELOG.md b/CHANGELOG.md index da53777d4..e6d707a89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Current snapshot tag (v0.7) +Breaking backward compatibility from `v0.6` + +* Default blue/green deployment mode changed from `pod` to `deploy`. Use `ingress.kubernetes.io/blue-green-mode` annotation to change to the v0.6 behavior. See also the blue/green deployment [doc](/README.md#blue-green). + Fixes and improvements since `v0.6` * Add SSL config on TCP services [#192](https://github.com/jcmoraisjr/haproxy-ingress/pull/192) - [doc](/README.md#tcp-services-configmap) @@ -36,6 +40,10 @@ Fixes and improvements since `v0.6` * Configmap options: * `http-port` * `https-port` +* Add blue/green balance mode [#201](https://github.com/jcmoraisjr/haproxy-ingress/pull/201) - [doc](/README.md#blue-green) + * Annotations: + * `ingress.kubernetes.io/blue-green-balance` + * `ingress.kubernetes.io/blue-green-mode` ## v0.6-beta.2 diff --git a/README.md b/README.md index 576b65c13..7532bd797 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ selector and another that matches the blue/green selector. * `ingress.kubernetes.io/blue-green-balance`: comma separated list of labels and weights * `ingress.kubernetes.io/blue-green-deploy`: deprecated on v0.7, this is an alias to `ingress.kubernetes.io/blue-green-balance`. -* `ingress.kubernetes.io/blue-green-mode`: how to apply the weights, might be `pod` or `deploy` +* `ingress.kubernetes.io/blue-green-mode`: defaults to `deploy` on v0.7, defines how to apply the weights, might be `pod` or `deploy` The following configuration `group=blue=1,group=green=4` will redirect 20% of the load to the `group=blue` group and 80% of the load to `group=green` group. diff --git a/examples/blue-green/README.md b/examples/blue-green/README.md index 9849ffaac..0773e15a5 100644 --- a/examples/blue-green/README.md +++ b/examples/blue-green/README.md @@ -144,7 +144,7 @@ Running 100 requests... --- -Changing to deploy mode. This mode targets the balance config to the whole deployment +Changing to *deploy* mode. This mode targets the balance config to the whole deployment instead of single pods. **Note:** BG mode was added on v0.7. On v0.6, the only supported mode is `pod`. diff --git a/pkg/common/ingress/annotations/bluegreen/main.go b/pkg/common/ingress/annotations/bluegreen/main.go index 65c4ad93a..6134ffdff 100644 --- a/pkg/common/ingress/annotations/bluegreen/main.go +++ b/pkg/common/ingress/annotations/bluegreen/main.go @@ -101,7 +101,7 @@ func (bg bgdeploy) Parse(ing *extensions.Ingress) (interface{}, error) { if mode != "" { glog.Warningf("unsupported blue/green mode '%v' on '%v/%v', falling back to 'pod'", mode, ing.Namespace, ing.Name) } - mode = "pod" + mode = "deploy" } return &Config{ DeployWeight: dw,