Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
linkerd: Allow user to specify the controller count
Browse files Browse the repository at this point in the history
In the HA mode user can specify the number of controllers that should be
created using a variable `controller_replicas`.

**Caution**: If the number of linkerd controller count is more than the
available worker nodes then some pods may stay in `Pending` state.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed Jul 2, 2020
1 parent 33863b9 commit c55f778
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions pkg/components/linkerd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ func init() {
}

type component struct {
CA string
Cert string
Key string
Expiry string
CA string
Cert string
Key string
Expiry string
ControllerReplicas int `hcl:"controller_replicas,optional"`
}

func newComponent() *component {
return &component{}
return &component{
ControllerReplicas: 1,
}
}

func (c *component) LoadConfig(configBody *hcl.Body, evalContext *hcl.EvalContext) hcl.Diagnostics {
Expand Down
2 changes: 1 addition & 1 deletion pkg/components/linkerd/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ identity:
enablePodAntiAffinity: true
# controller configuration
controllerReplicas: 3
controllerReplicas: {{.ControllerReplicas}}
controllerResources: &controller_resources
cpu: &controller_resources_cpu
limit: "1"
Expand Down

0 comments on commit c55f778

Please sign in to comment.