From 6441e708086252a49d927fd880bdef23625b24b5 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 26 Aug 2021 17:57:59 -0500 Subject: [PATCH 1/4] Add amplitude key to the helm chart --- templates/coderd.yaml | 2 ++ values.yaml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/templates/coderd.yaml b/templates/coderd.yaml index ff5623a4..34f85ced 100644 --- a/templates/coderd.yaml +++ b/templates/coderd.yaml @@ -67,6 +67,8 @@ spec: value: {{ .Values.logging.splunk.token | quote }} - name: SPLUNK_CHANNEL value: {{ .Values.logging.splunk.channel | quote }} + - name: AMPLITUDE_API_KEY + value: {{ .Values.metrics.amplitudeKey | quote }} - name: NAMESPACE valueFrom: fieldRef: diff --git a/values.yaml b/values.yaml index 36d5e31e..86a254c7 100644 --- a/values.yaml +++ b/values.yaml @@ -248,6 +248,11 @@ logging: # to associate messages with. channel: "" +# metrics -- Configure various metrics to gain observability into Coder. +metrics: + # metrics.amplitudeKey -- Enables telemetry pushing to Amplitude. Keep empty to disable + amplitudeKey: "" + # certs -- Certificate that will be mounted inside Coder services. certs: secret: From fd41934a40459c2ec5815b919ce9e4d837e4d22e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 26 Aug 2021 23:43:17 +0000 Subject: [PATCH 2/4] move env var --- templates/coderd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/coderd.yaml b/templates/coderd.yaml index 34f85ced..706936e1 100644 --- a/templates/coderd.yaml +++ b/templates/coderd.yaml @@ -67,8 +67,6 @@ spec: value: {{ .Values.logging.splunk.token | quote }} - name: SPLUNK_CHANNEL value: {{ .Values.logging.splunk.channel | quote }} - - name: AMPLITUDE_API_KEY - value: {{ .Values.metrics.amplitudeKey | quote }} - name: NAMESPACE valueFrom: fieldRef: @@ -117,6 +115,8 @@ spec: value: {{ .Values.logging.json | quote }} - name: STACKDRIVER_LOG value: {{ .Values.logging.stackdriver | quote }} + - name: AMPLITUDE_API_KEY + value: {{ .Values.metrics.amplitudeKey | quote }} # ENVBOX_IMAGE describes the image used to provide # additional features to users for running applications # such as dockerd and kubernetes. From 7ce730042c6df36c961eb60227f0ad572ca70b36 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 26 Aug 2021 23:45:35 +0000 Subject: [PATCH 3/4] Make docs --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c7936ce..487a9e07 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa | certs | object | Certificate that will be mounted inside Coder services. | `{"secret":{"key":"","name":""}}` | | certs.secret.key | string | Key pointing to a certificate in the secret. | `""` | | certs.secret.name | string | Name of the secret. | `""` | -| coderd | object | Primary service responsible for all things Coder! | `{"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","oidc":{"enableRefresh":false,"redirectOptions":{}},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAnnotations":{},"serviceNodePorts":{"http":30080,"https":30443},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"superAdmin":{"passwordSecret":{"key":"password","name":""}},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` | +| coderd | object | Primary service responsible for all things Coder! | `{"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","oidc":{"enableRefresh":false,"redirectOptions":{}},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAnnotations":{},"serviceNodePorts":{"http":null,"https":null},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"superAdmin":{"passwordSecret":{"key":"password","name":""}},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` | | coderd.builtinProviderServiceAccount | object | Customize the built-in Kubernetes provider service account. | `{"annotations":{},"labels":{}}` | | coderd.builtinProviderServiceAccount.annotations | object | A KV mapping of annotations. See: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | `{}` | | coderd.builtinProviderServiceAccount.labels | object | Add labels to the service account used for the built-in provider. | `{}` | @@ -46,9 +46,9 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa | coderd.securityContext.readOnlyRootFilesystem | bool | Mounts the container's root filesystem as read-only. It is recommended to leave this setting enabled in production. This will override the same setting in the pod | `true` | | coderd.securityContext.seccompProfile | object | Sets the seccomp profile for the migration and runtime containers. | `{"type":"RuntimeDefault"}` | | coderd.serviceAnnotations | object | Extra annotations to apply to the coderd service. | `{}` | -| coderd.serviceNodePorts | object | Allows manually setting static node ports for the coderd service. This is only helpful if static ports are required, and usually should be left alone. By default these are dynamically chosen. | `{"http":30080,"https":30443}` | -| coderd.serviceNodePorts.http | int | Sets a static 'coderd' service non-TLS nodePort. This should usually be omitted. | `30080` | -| coderd.serviceNodePorts.https | int | Sets a static 'coderd' service TLS nodePort This should usually be omitted. | `30443` | +| coderd.serviceNodePorts | object | Allows manually setting static node ports for the coderd service. This is only helpful if static ports are required, and usually should be left alone. By default these are dynamically chosen. | `{"http":null,"https":null}` | +| coderd.serviceNodePorts.http | string | Sets a static 'coderd' service non-TLS nodePort. This should usually be omitted. | `nil` | +| coderd.serviceNodePorts.https | string | Sets a static 'coderd' service TLS nodePort This should usually be omitted. | `nil` | | coderd.serviceSpec | object | Specification to inject for the coderd service. See: https://kubernetes.io/docs/concepts/services-networking/service/ | `{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"}` | | coderd.serviceSpec.externalTrafficPolicy | string | Set the traffic policy for the service. See: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip | `"Local"` | | coderd.serviceSpec.loadBalancerIP | string | Set the external IP address of the Ingress service. | `""` | @@ -69,6 +69,8 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa | logging.splunk.token | string | Splunk HEC collector token. | `""` | | logging.splunk.url | string | Splunk HEC collector endpoint. | `""` | | logging.stackdriver | string | Location to send logs that are formatted for Google Stackdriver. Set to an empty string to disable. | `""` | +| metrics | object | Configure various metrics to gain observability into Coder. | `{"amplitudeKey":""}` | +| metrics.amplitudeKey | string | Enables telemetry pushing to Amplitude. Keep empty to disable | `""` | | postgres.database | string | Name of the database that Coder will use. You must create this database first. | `""` | | postgres.default | object | Configure a built-in PostgreSQL deployment. | `{"enable":true,"image":"","resources":{"limits":{"cpu":"250m","memory":"1Gi"},"requests":{"cpu":"250m","memory":"1Gi","storage":"10Gi"}},"storageClassName":""}` | | postgres.default.enable | bool | Deploys a PostgreSQL instance. We recommend using an external PostgreSQL instance in production. If true, all other values are ignored. | `true` | From dd25d98f01aadde9aa89b73109fd5d3129d22367 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Fri, 27 Aug 2021 10:02:47 -0500 Subject: [PATCH 4/4] Change wording for amplitude --- values.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 86a254c7..a3c736db 100644 --- a/values.yaml +++ b/values.yaml @@ -250,7 +250,10 @@ logging: # metrics -- Configure various metrics to gain observability into Coder. metrics: - # metrics.amplitudeKey -- Enables telemetry pushing to Amplitude. Keep empty to disable + # metrics.amplitudeKey -- Enables telemetry pushing to Amplitude. Amplitude records how users + # interact with Coder, which is used to improve the product. No events store any personal + # information. Amplitude can be found here: https://amplitude.com/ + # Keep empty to disable. amplitudeKey: "" # certs -- Certificate that will be mounted inside Coder services.