Support Dashboard replicas (#2899) (#3633)

This PR makes possible to increase the amount of web dashboard replicas.

Follows up #2899

Signed-off-by: Eugene Glotov <kivagant@gmail.com>
This commit is contained in:
Eugene Glotov 2019-11-12 21:00:23 +02:00 committed by Alex Leong
parent 038900c27e
commit 2941ddb7f5
6 changed files with 85 additions and 67 deletions

View File

@ -83,7 +83,7 @@ helm install \
The following table lists the configurable parameters of the Linkerd2 chart and their default values. The following table lists the configurable parameters of the Linkerd2 chart and their default values.
| Parameter | Description | Default | | Parameter | Description | Default |
|--------------------------------------|-------------------------------------------------------------------------------------------------|-------------------------------| |:--------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|
| `ClusterDomain` | Kubernetes DNS Domain name to use | `cluster.local` | | `ClusterDomain` | Kubernetes DNS Domain name to use | `cluster.local` |
| `EnableH2Upgrade` | Allow proxies to perform transparent HTTP/2 upgrading | `true` | | `EnableH2Upgrade` | Allow proxies to perform transparent HTTP/2 upgrading | `true` |
| `ImagePullPolicy` | Docker image pull policy | `IfNotPresent` | | `ImagePullPolicy` | Docker image pull policy | `IfNotPresent` |
@ -96,6 +96,7 @@ The following table lists the configurable parameters of the Linkerd2 chart and
| `ControllerReplicas` | Number of replicas for each control plane pod | `1` | | `ControllerReplicas` | Number of replicas for each control plane pod | `1` |
| `ControllerUID` | User ID for the control plane components | `2103` | | `ControllerUID` | User ID for the control plane components | `2103` |
| `Identity.Issuer.ClockSkewAllowance` | Amount of time to allow for clock skew within a Linkerd cluster | `20s` | | `Identity.Issuer.ClockSkewAllowance` | Amount of time to allow for clock skew within a Linkerd cluster | `20s` |
| `Dashboard.Replicas` | Number of replicas of dashboard | `1` |
| `Identity.Issuer.Scheme` | Which scheme is used for the identity issuer secret format | `linkerd.io/tls` | | `Identity.Issuer.Scheme` | Which scheme is used for the identity issuer secret format | `linkerd.io/tls` |
| `Identity.Issuer.CrtExpiry` | Expiration timestamp for the issuer certificate. It must be provided during install || | `Identity.Issuer.CrtExpiry` | Expiration timestamp for the issuer certificate. It must be provided during install ||
| `Identity.Issuer.CrtExpiryAnnotation` | Annotation used to identity the issuer certificate expiration timestamp. Do not edit. | `linkerd.io/identity-issuer-expiry` | | `Identity.Issuer.CrtExpiryAnnotation` | Annotation used to identity the issuer certificate expiration timestamp. Do not edit. | `linkerd.io/identity-issuer-expiry` |

View File

@ -40,7 +40,7 @@ metadata:
name: linkerd-web name: linkerd-web
namespace: {{.Namespace}} namespace: {{.Namespace}}
spec: spec:
replicas: 1 replicas: {{.Dashboard.Replicas}}
selector: selector:
matchLabels: matchLabels:
{{.ControllerComponentLabel}}: web {{.ControllerComponentLabel}}: web

View File

@ -19,6 +19,10 @@ ControllerLogLevel: &controller_log_level info
ControllerReplicas: 1 ControllerReplicas: 1
ControllerUID: 2103 ControllerUID: 2103
# web dashboard configuration
Dashboard:
Replicas: 1
# identity configuration # identity configuration
Identity: Identity:
Issuer: Issuer:

View File

@ -119,6 +119,9 @@ func TestRender(t *testing.T) {
}, },
}, },
}, },
Dashboard: &charts.Dashboard{
Replicas: 1,
},
} }
haOptions, err := testInstallOptions() haOptions, err := testInstallOptions()

View File

@ -52,6 +52,7 @@ type (
InstallNamespace bool InstallNamespace bool
ControlPlaneTracing bool ControlPlaneTracing bool
Configs ConfigJSONs Configs ConfigJSONs
Dashboard *Dashboard
Identity *Identity Identity *Identity
ProxyInjector *ProxyInjector ProxyInjector *ProxyInjector
ProfileValidator *ProfileValidator ProfileValidator *ProfileValidator
@ -147,6 +148,11 @@ type (
Memory Constraints Memory Constraints
} }
// Dashboard has the Helm variables for the web dashboard
Dashboard struct {
Replicas int32
}
// Identity contains the fields to set the identity variables in the proxy // Identity contains the fields to set the identity variables in the proxy
// sidecar container // sidecar container
Identity struct { Identity struct {

View File

@ -50,6 +50,10 @@ func TestNewValues(t *testing.T) {
"beta.kubernetes.io/os": "linux", "beta.kubernetes.io/os": "linux",
}, },
Dashboard: &Dashboard{
Replicas: 1,
},
Identity: &Identity{ Identity: &Identity{
TrustDomain: "cluster.local", TrustDomain: "cluster.local",
Issuer: &Issuer{ Issuer: &Issuer{