Skip to content

Commit

Permalink
viz: cleanup helm values.yaml (linkerd#5546)
Browse files Browse the repository at this point in the history
* viz: cleanup helm values.yaml

This branch fixes some nits around naming of default variables
i.e replace the usage of global with default.

Renames globalLogLevel to defaultLogLevel and globalUID to
defaultUID along with some chart README updates.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
  • Loading branch information
Pothulapati authored and jijeesh committed Apr 21, 2021
1 parent 0b8eebf commit 103655f
Show file tree
Hide file tree
Showing 4 changed files with 1,168 additions and 34 deletions.
16 changes: 10 additions & 6 deletions viz/charts/linkerd-viz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Kubernetes: `>=1.13.0-0`

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| clusterDomain | string | `"cluster.local"` | Kubernetes DNS Domain name to use |
| clusterDomain | string | `"cluster.local"` | Kubernetes DNS Domain name to use |
| createdByAnnotation | string | `"linkerd.io/created-by"` | |
| dashboard.UID | int | `2103` | |
| dashboard.enforcedHostRegexp | string | `""` | Host header validation regex for the dashboard. See the [Linkerd documentation](https://linkerd.io/2/tasks/exposing-dashboard) for more information |
Expand All @@ -86,10 +86,11 @@ Kubernetes: `>=1.13.0-0`
| dashboard.resources.memory.limit | string | `nil` | Maximum amount of memory that web container can use |
| dashboard.resources.memory.request | string | `nil` | Amount of memory that the web container requests |
| dashboard.restrictPrivileges | bool | `false` | Restrict the Linkerd Dashboard's default privileges to disallow Tap and Check |
| defaultRegistry | string | `"ghcr.io/linkerd"` | Default Docker Registry |
| defaultLogLevel | string | `"info"` | Log level for all the viz components |
| defaultRegistry | string | `"ghcr.io/linkerd"` | Docker registry for all viz components |
| defaultUID | int | `2103` | UID for all the viz components |
| enablePodAntiAffinity | bool | `false` | Enables Pod Anti Affinity logic to balance the placement of replicas across hosts and zones for High Availability. Enable this only when you have multiple replicas of components. |
| extensionAnnotation | string | `"linkerd.io/extension"` | |
| globalLogLevel | string | `"info"` | Log level for all the viz components |
| globalUID | int | `2103` | UID for all the viz components |
| grafana.enabled | bool | `true` | toggle field to enable or disable grafana |
| grafana.image.name | string | `"grafana"` | Docker image name for the grafana instance |
| grafana.image.registry | string | `"ghcr.io/linkerd"` | Docker registry for the grafana instance |
Expand All @@ -99,9 +100,10 @@ Kubernetes: `>=1.13.0-0`
| grafana.resources.cpu.request | string | `nil` | Amount of CPU units that the grafana container requests |
| grafana.resources.memory.limit | string | `nil` | Maximum amount of memory that grafana container can use |
| grafana.resources.memory.request | string | `nil` | Amount of memory that the grafana container requests |
| identityTrustDomain | string | `"cluster.local"` | Trust domain used for identity |
| identityTrustDomain | string | `"cluster.local"` | Trust domain used for identity |
| imagePullSecrets | list | `[]` | For Private docker registries, authentication is needed. Registry secrets are applied to the respective service accounts |
| installNamespace | bool | `true` | Set to false when installing in a custom namespace. |
| jaegerUrl | string | `""` | url of external jaeger instance Set this to `jaeger.linkerd-jaeger.svc.<clusterDomain>` if you plan to use jaeger extension |
| linkerdNamespace | string | `"linkerd"` | Namespace of the Linkerd core control-plane install |
| linkerdVersion | string | `"linkerdVersionValue"` | control plane version. See Proxy section for proxy version |
| namespace | string | `"linkerd-viz"` | Namespace in which the Linkerd Viz extension has to be installed |
Expand All @@ -124,6 +126,7 @@ Kubernetes: `>=1.13.0-0`
| prometheus.ruleConfigMapMounts | string | `nil` | Alerting/recording rule ConfigMap mounts (sub-path names must end in ´_rules.yml´ or ´_rules.yaml´) |
| prometheus.scrapeConfigs | string | `nil` | A scrapeConfigs section specifies a set of targets and parameters describing how to scrape them. |
| prometheus.sideCarContainers | string | `nil` | A sidecarContainers section specifies a list of secondary containers to run in the prometheus pod e.g. to export data to non-prometheus systems |
| prometheusUrl | string | `""` | url of external prometheus instance |
| proxyInjectAnnotation | string | `"linkerd.io/inject"` | |
| tap.UID | int | `2103` | |
| tap.caBundle | string | `""` | Bundle of CA certificates for Tap component. If not provided then Helm will use the certificate generated for `tap.crtPEM`. If `tap.externalSecret` is set to true, this value must be set, as no certificate will be generated. |
Expand All @@ -135,7 +138,7 @@ Kubernetes: `>=1.13.0-0`
| tap.keyPEM | string | `""` | Certificate key for Tap component. If not provided then Helm will generate one. |
| tap.logLevel | string | `"info"` | log level of the tap component |
| tap.proxy | string | `nil` | |
| tap.replicas | int | `1` | |
| tap.replicas | int | `1` | Number of tap component replicas |
| tap.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the tap container can use |
| tap.resources.cpu.request | string | `nil` | Amount of CPU units that the tap container requests |
| tap.resources.memory.limit | string | `nil` | Maximum amount of memory that tap container can use |
Expand All @@ -157,6 +160,7 @@ Kubernetes: `>=1.13.0-0`
| tapInjector.resources.cpu.request | string | `nil` | Amount of CPU units that the tapInjector container requests |
| tapInjector.resources.memory.limit | string | `nil` | Maximum amount of memory that tapInjector container can use |
| tapInjector.resources.memory.request | string | `nil` | Amount of memory that the tapInjector container requests |
| tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.4.0](/~https://github.com/norwoodj/helm-docs/releases/v1.4.0)
56 changes: 28 additions & 28 deletions viz/charts/linkerd-viz/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,31 @@

# -- control plane version. See Proxy section for proxy version
linkerdVersion: &linkerd_version linkerdVersionValue

# -- Default Docker Registry
defaultRegistry: &default_registry ghcr.io/linkerd

# -- Kubernetes DNS Domain name to use
# -- Kubernetes DNS Domain name to use
clusterDomain: &cluster_domain cluster.local

# -- Trust domain used for identity
# -- Trust domain used for identity
identityTrustDomain: *cluster_domain

# -- Namespace of the Linkerd core control-plane install
linkerdNamespace: linkerd

# -- Log level for all the viz components
globalLogLevel: &log_level info

# -- UID for all the viz components
globalUID: &uid 2103

# Annotation labels. Do not edit.
createdByAnnotation: linkerd.io/created-by
proxyInjectAnnotation: linkerd.io/inject
extensionAnnotation: linkerd.io/extension

# -- Docker registry for all viz components
defaultRegistry: &registry ghcr.io/linkerd
# -- Log level for all the viz components
defaultLogLevel: &log_level info
# -- UID for all the viz components
defaultUID: &uid 2103

# -- Namespace of the Linkerd core control-plane install
linkerdNamespace: linkerd
# -- Set to false when installing in a custom namespace.
installNamespace: true
# -- Namespace in which the Linkerd Viz extension has to be installed
namespace: linkerd-viz

# -- NodeSelector section, See the [K8S
# documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector)
# for more information
# -- NodeSelector section, See the
# [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information
nodeSelector:
beta.kubernetes.io/os: linux

Expand All @@ -46,26 +39,32 @@ nodeSelector:
imagePullSecrets: []
# - name: my-private-docker-registry-login-secret

# -|- Tolerations section, See the
# -- Tolerations section, See the
# [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
# for more information
# tolerations:
tolerations:

# -- Enables Pod Anti Affinity logic to balance the placement of replicas
# across hosts and zones for High Availability.
# Enable this only when you have multiple replicas of components.
enablePodAntiAffinity: false

# -- url of external prometheus instance
# prometheusUrl:
prometheusUrl: ""

# -- url of external jaeger instance
# Set this to `jaeger.linkerd-jaeger.svc.<clusterDomain>` if you plan to use jaeger extension
# jaegerUrl:
jaegerUrl: ""

# tap configuration
tap:
# -- Number of tap component replicas
replicas: 1
# -- log level of the tap component
logLevel: *log_level
image:
# -- Docker registry for the tap instance
registry: *default_registry
registry: *registry
# -- Docker image name for the tap instance
name: controller
# -- Docker image tag for the tap instance
Expand Down Expand Up @@ -104,6 +103,7 @@ tap:
# into the tap component
# resources:

# UID for the dashboard resource
UID: *uid

# tapInjector configuration
Expand All @@ -112,7 +112,7 @@ tapInjector:
replicas: 1
image:
# -- Docker registry for the tapInjector instance
registry: *default_registry
registry: *registry
# -- Docker image name for the tapInjector instance
name: controller
# -- Docker image tag for the tapInjector instance
Expand Down Expand Up @@ -168,7 +168,7 @@ dashboard:
logLevel: *log_level
image:
# -- Docker registry for the web instance
registry: *default_registry
registry: *registry
# -- Docker image name for the web instance
name: web
# -- Docker image tag for the web instance
Expand Down Expand Up @@ -206,7 +206,7 @@ grafana:
enabled: true
image:
# -- Docker registry for the grafana instance
registry: *default_registry
registry: *registry
# -- Docker image name for the grafana instance
name: grafana
# -- Docker image tag for the grafana instance
Expand Down
24 changes: 24 additions & 0 deletions viz/cmd/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ func TestRender(t *testing.T) {
},
}

proxyResources := map[string]interface{}{
"proxy": map[string]interface{}{
"resources": map[string]interface{}{
"cpu": map[string]interface{}{
"request": "500m",
"limit": "100m",
},
"memory": map[string]interface{}{
"request": "20Mi",
"limit": "250Mi",
},
},
},
}

testCases := []struct {
values map[string]interface{}
goldenFileName string
Expand All @@ -39,6 +54,15 @@ func TestRender(t *testing.T) {
},
"install_prometheus_disabled.golden",
},
{
map[string]interface{}{
"prometheus": proxyResources,
"tap": proxyResources,
"grafana": proxyResources,
"dashboard": proxyResources,
},
"install_proxy_resources.golden",
},
}

for i, tc := range testCases {
Expand Down
Loading

0 comments on commit 103655f

Please sign in to comment.