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

@ -82,72 +82,73 @@ 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` |
|`LinkerdVersion` | Control plane version |`stable-2.5.0`| | `LinkerdVersion` | Control plane version | `stable-2.5.0` |
|`Namespace` | Control plane namespace |`linkerd`| | `Namespace` | Control plane namespace | `linkerd` |
|`OmitWebhookSideEffects` | Omit the `sideEffects` flag in the webhook manifests |`false`| | `OmitWebhookSideEffects` | Omit the `sideEffects` flag in the webhook manifests | `false` |
|`WebhookFailurePolicy` | Failure policy for the proxy injector |`Ignore`| | `WebhookFailurePolicy` | Failure policy for the proxy injector | `Ignore` |
|`ControllerImage` | Docker image for the controller, tap and identity components |`gcr.io/linkerd-io/controller`| | `ControllerImage` | Docker image for the controller, tap and identity components | `gcr.io/linkerd-io/controller` |
|`ControllerLogLevel` | Log level for the control plane components |`info`| | `ControllerLogLevel` | Log level for the control plane components | `info` |
|`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` |
|`Identity.Issuer.Scheme` | Which scheme is used for the identity issuer secret format |`linkerd.io/tls`| | `Dashboard.Replicas` | Number of replicas of dashboard | `1` |
|`Identity.Issuer.CrtExpiry` | Expiration timestamp for the issuer certificate. It must be provided during install || | `Identity.Issuer.Scheme` | Which scheme is used for the identity issuer secret format | `linkerd.io/tls` |
|`Identity.Issuer.CrtExpiryAnnotation` | Annotation used to identity the issuer certificate expiration timestamp. Do not edit. |`linkerd.io/identity-issuer-expiry`| | `Identity.Issuer.CrtExpiry` | Expiration timestamp for the issuer certificate. It must be provided during install ||
|`Identity.Issuer.IssuanceLifeTime` | Amount of time for which the Identity issuer should certify identity |`86400s`| | `Identity.Issuer.CrtExpiryAnnotation` | Annotation used to identity the issuer certificate expiration timestamp. Do not edit. | `linkerd.io/identity-issuer-expiry` |
|`Identity.Issuer.TLS.CrtPEM` | Issuer certificate (ECDSA). It must be provided during install. || | `Identity.Issuer.IssuanceLifeTime` | Amount of time for which the Identity issuer should certify identity | `86400s` |
|`Identity.Issuer.TLS.KeyPEM` | Key for the issuer certificate (ECDSA). It must be provided during install. || | `Identity.Issuer.TLS.CrtPEM` | Issuer certificate (ECDSA). It must be provided during install. ||
|`Identity.TrustAnchorsPEM` | Trust root certificate (ECDSA). It must be provided during install. || | `Identity.Issuer.TLS.KeyPEM` | Key for the issuer certificate (ECDSA). It must be provided during install. ||
|`Identity.TrustDomain` | Trust domain used for identity |`cluster.local`| | `Identity.TrustAnchorsPEM` | Trust root certificate (ECDSA). It must be provided during install. ||
|`GrafanaImage` | Docker image for the Grafana container |`gcr.io/linkerd-io/grafana`| | `Identity.TrustDomain` | Trust domain used for identity | `cluster.local` |
|`DisableHeartBeat` | Set to true to not start the heartbeat cronjob |`false`| | `GrafanaImage` | Docker image for the Grafana container | `gcr.io/linkerd-io/grafana` |
|`HeartbeatSchedule` | Config for the heartbeat cronjob |`0 0 * * *`| | `DisableHeartBeat` | Set to true to not start the heartbeat cronjob | `false` |
|`PrometheusImage` | Docker image for the Prometheus container |`prom/prometheus:v2.11.1`| | `HeartbeatSchedule` | Config for the heartbeat cronjob | `0 0 * * *` |
|`PrometheusLogLevel` | Log level for Prometheus |`info`| | `PrometheusImage` | Docker image for the Prometheus container | `prom/prometheus:v2.11.1` |
|`Proxy.EnableExternalProfiles` | Enable service profiles for non-Kubernetes services |`false`| | `PrometheusLogLevel` | Log level for Prometheus | `info` |
|`Proxy.Image.Name` | Docker image for the proxy |`gcr.io/linkerd-io/proxy`| | `Proxy.EnableExternalProfiles` | Enable service profiles for non-Kubernetes services | `false` |
|`Proxy.Image.PullPolicy` | Pull policy for the proxy container Docker image |`IfNotPresent`| | `Proxy.Image.Name` | Docker image for the proxy | `gcr.io/linkerd-io/proxy` |
|`Proxy.Image.Version` | Tag for the proxy container Docker image |`stable-2.5.0`| | `Proxy.Image.PullPolicy` | Pull policy for the proxy container Docker image | `IfNotPresent` |
|`Proxy.LogLevel` | Log level for the proxy |`warn,linkerd2_proxy=info`| | `Proxy.Image.Version` | Tag for the proxy container Docker image | `stable-2.5.0` |
|`Proxy.Ports.Admin` | Admin port for the proxy container |`4191`| | `Proxy.LogLevel` | Log level for the proxy | `warn,linkerd2_proxy=info` |
|`Proxy.Ports.Control` | Control port for the proxy container |`4190`| | `Proxy.Ports.Admin` | Admin port for the proxy container | `4191` |
|`Proxy.Ports.Inbound` | Inbound port for the proxy container |`4143`| | `Proxy.Ports.Control` | Control port for the proxy container | `4190` |
|`Proxy.Ports.Outbound` | Outbound port for the proxy container |`4140`| | `Proxy.Ports.Inbound` | Inbound port for the proxy container | `4143` |
|`Proxy.Resources.CPU.Limit` | Maximum amount of CPU units that the proxy can use || | `Proxy.Ports.Outbound` | Outbound port for the proxy container | `4140` |
|`Proxy.Resources.CPU.Request` | Amount of CPU units that the proxy requests || | `Proxy.Resources.CPU.Limit` | Maximum amount of CPU units that the proxy can use ||
|`Proxy.Resources.Memory.Limit` | Maximum amount of memory that the proxy can use || | `Proxy.Resources.CPU.Request` | Amount of CPU units that the proxy requests ||
|`Proxy.Resources.Memory.Request` | Amount of memory that the proxy requests || | `Proxy.Resources.Memory.Limit` | Maximum amount of memory that the proxy can use ||
|`Proxy.Trace.CollectorSvcAccount` | Service account associated with the Trace collector instance || | `Proxy.Resources.Memory.Request` | Amount of memory that the proxy requests ||
|`Proxy.Trace.CollectorSvcAddr` | Collector Service address for the proxies to send Trace Data || | `Proxy.Trace.CollectorSvcAccount` | Service account associated with the Trace collector instance ||
|`Proxy.UID` | User id under which the proxy runs |`2102`| | `Proxy.Trace.CollectorSvcAddr` | Collector Service address for the proxies to send Trace Data ||
|`ProxyInit.IgnoreInboundPorts` | Inbound ports the proxy should ignore || | `Proxy.UID` | User id under which the proxy runs | `2102` |
|`ProxyInit.IgnoreOutboundPorts` | Outbound ports the proxy should ignore || | `ProxyInit.IgnoreInboundPorts` | Inbound ports the proxy should ignore ||
|`ProxyInit.Image.Name` | Docker image for the proxy-init container |`gcr.io/linkerd-io/proxy-init`| | `ProxyInit.IgnoreOutboundPorts` | Outbound ports the proxy should ignore ||
|`ProxyInit.Image.PullPolicy` | Pull policy for the proxy-init container Docker image |`IfNotPresent`| | `ProxyInit.Image.Name` | Docker image for the proxy-init container | `gcr.io/linkerd-io/proxy-init` |
|`ProxyInit.Image.Version` | Tag for the proxy-init container Docker image |`v1.1.0`| | `ProxyInit.Image.PullPolicy` | Pull policy for the proxy-init container Docker image | `IfNotPresent` |
|`ProxyInit.Resources.CPU.Limit` | Maximum amount of CPU units that the proxy-init container can use |`100m`| | `ProxyInit.Image.Version` | Tag for the proxy-init container Docker image | `v1.1.0` |
|`ProxyInit.Resources.CPU.Request` | Amount of CPU units that the proxy-init container requests |`10m`| | `ProxyInit.Resources.CPU.Limit` | Maximum amount of CPU units that the proxy-init container can use | `100m` |
|`ProxyInit.Resources.Memory.Limit` | Maximum amount of memory that the proxy-init container can use |`50Mi`| | `ProxyInit.Resources.CPU.Request` | Amount of CPU units that the proxy-init container requests | `10m` |
|`ProxyInit.Resources.Memory.Request` | Amount of memory that the proxy-init container requests |`10Mi`| | `ProxyInit.Resources.Memory.Limit` | Maximum amount of memory that the proxy-init container can use | `50Mi` |
|`ProxyInjector.CrtPEM` | Certificate for the proxy injector. If not provided then Helm will generate one. || | `ProxyInit.Resources.Memory.Request` | Amount of memory that the proxy-init container requests | `10Mi` |
|`ProxyInjector.KeyPEM` | Certificate key for the proxy injector. If not provided then Helm will generate one. || | `ProxyInjector.CrtPEM` | Certificate for the proxy injector. If not provided then Helm will generate one. ||
|`ProfileValidator.CrtPEM` | Certificate for the service profile validator. If not provided then Helm will generate one. || | `ProxyInjector.KeyPEM` | Certificate key for the proxy injector. If not provided then Helm will generate one. ||
|`ProfileValidator.KeyPEM` | Certificate key for the service profile validator. If not provided then Helm will generate one. || | `ProfileValidator.CrtPEM` | Certificate for the service profile validator. If not provided then Helm will generate one. ||
|`Tap.CrtPEM` | Certificate for the Tap component. If not provided then Helm will generate one. || | `ProfileValidator.KeyPEM` | Certificate key for the service profile validator. If not provided then Helm will generate one. ||
|`Tap.KeyPEM` | Certificate key for Tap component. If not provided then Helm will generate one. || | `Tap.CrtPEM` | Certificate for the Tap component. If not provided then Helm will generate one. ||
|`WebImage` | Docker image for the web container |`gcr.io/linkerd-io/web`| | `Tap.KeyPEM` | Certificate key for Tap component. If not provided then Helm will generate one. ||
|`CreatedByAnnotation` | Annotation label for the proxy create. Do not edit. |`linkerd.io/created-by`| | `WebImage` | Docker image for the web container | `gcr.io/linkerd-io/web` |
|`ProxyInjectAnnotation` | Annotation label to signal injection. Do not edit. || | `CreatedByAnnotation` | Annotation label for the proxy create. Do not edit. | `linkerd.io/created-by` |
|`ProxyInjectDisabled` | Annotation value to disable injection. Do not edit. |`disabled`| | `ProxyInjectAnnotation` | Annotation label to signal injection. Do not edit. ||
|`ControllerComponentLabel` | Control plane label. Do not edit |`linkerd.io/control-plane-component`| | `ProxyInjectDisabled` | Annotation value to disable injection. Do not edit. | `disabled` |
|`ControllerNamespaceLabel` | Control plane label. Do not edit |`linkerd.io/control-plane-component`| | `ControllerComponentLabel` | Control plane label. Do not edit | `linkerd.io/control-plane-component` |
|`LinkerdNamespaceLabel` | Control plane label. Do not edit |`linkerd.io/control-plane-component`| | `ControllerNamespaceLabel` | Control plane label. Do not edit | `linkerd.io/control-plane-component` |
|`InstallNamespace` | Set to false when installing Linkerd in a custom namespace. See the [Linkerd documentation](https://linkerd.io/2/tasks/install-helm/#customizing-the-namespace) for more information.|`true`| | `LinkerdNamespaceLabel` | Control plane label. Do not edit | `linkerd.io/control-plane-component` |
| `InstallNamespace` | Set to false when installing Linkerd in a custom namespace. See the [Linkerd documentation](https://linkerd.io/2/tasks/install-helm/#customizing-the-namespace) for more information. | `true` |
## Get involved ## Get involved

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{