Skip to content

Commit

Permalink
install/0000_00_cluster-version-operator_03_deployment: Set 'strategy…
Browse files Browse the repository at this point in the history
…: Recreate'

Address [1]:

  F0129 08:54:04.971868       1 start.go:144] Unable to start metrics server: listen tcp 0.0.0.0:9099: bind: address already in use

when the new CVO pod is scheduled on the same node as the old one.
From [2] the default strategy (which we override with this commit) was
RollingUpdate.  The Recreate strategy avoids the port conflict because
[3]:

  All existing Pods are killed before new ones are created when
  .spec.strategy.type==Recreate.

That leaves a (hopefully brief) window when there is no CVO pod, but
since our only API is serving those metrics, that's probably not a big
deal.  The new pod should be able to pick up reconciling
ClusterVersion changes when it comes up, even if changes were made
during the no-CVO-pod gap.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1670727
[2]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
[3]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#recreate-deployment
  • Loading branch information
wking committed Mar 20, 2019
1 parent 46183d9 commit 078686d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ spec:
nodeSelector:
node-role.kubernetes.io/master: ""
priorityClassName: "system-cluster-critical"
strategy: Recreate
tolerations:
- operator: Exists
volumes:
Expand Down

0 comments on commit 078686d

Please sign in to comment.