Skip to content

Commit

Permalink
fix: hodometer enable flag and docs (#5025)
Browse files Browse the repository at this point in the history
* fix hodometer enable flag and docs

* remove sed script
  • Loading branch information
ukclivecox authored Jul 13, 2023
1 parent 31e46cd commit ea5f5d4
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 38 deletions.
16 changes: 3 additions & 13 deletions docs/source/contents/metrics/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,20 @@ These Helm values and their equivalents are provided below:
| `hodometer.extraPublishUrls` | `EXTRA_PUBLISH_URLS` |
| `hodometer.logLevel` | `LOG_LEVEL` |
If you do not want usage metrics to be recorded, you can disable Hodometer via the `hodometer.enabled` Helm value.
If you do not want usage metrics to be recorded, you can disable Hodometer via the `hodometer.disable` Helm value when installing the runtime Helm chart.
The following command disables collection of usage metrics in fresh installations and also serves to remove Hodometer from an existing installation:
```bash
helm install seldon-core-v2 k8s/helm-charts/seldon-core-v2-setup \
helm install seldon-v2-runtime k8s/helm-charts/seldon-core-v2-runtime \
--namespace seldon-mesh \
--set hodometer.enabled=false
--set hodometer.disable=true
```
```{note}
It is a good practice to set Helm values in values file.
These can be applied by using the `-f <filename>` switch when running Helm.
```
````
````{group-tab} YAML
The [raw YAML](../getting-started/kubernetes-installation/raw.md) approach to installing Seldon Core v2 provides an opinionated, pre-configured set of manifests.
Hodometer is automatically enabled with this approach.
You can disable Hodometer by manually removing the appropriate resources before applying the manifests.
If you have an existing installation, you will also need to delete the deployment and, optionally, any of the RBAC resources.
As there is no templating with the raw YAML manifests, you would need to set configuration environment variables manually before deploying them to a cluster.
````
`````

Expand Down
6 changes: 1 addition & 5 deletions k8s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ create-helm-charts:
kustomize build kustomize/helm-components-ns/ > ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml
kustomize build kustomize/helm-servers/ > ${HELM_SERVERS_BASE}/seldon-v2-servers.yaml
sed -i 's/\(.*\)\(imagePullSecrets:\).*/{{- with .Values.imagePullSecrets }}\n\1\2\n\1{{- toYaml . | nindent 8 }}\n{{- end }}/g' ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml
sed -n --file=add-helm-toggle-hodometer.sed ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml \
> ${HELM_COMPONENTS_BASE}/.components.yaml
sed 's/HACK_REMOVE_ME//' ${HELM_COMPONENTS_BASE}/.components.yaml \
> ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml
rm ${HELM_COMPONENTS_BASE}/.components.yaml
sed -i 's/HACK_REMOVE_ME//' ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml
sed 's/HACK_REMOVE_ME//' ${HELM_SERVERS_BASE}/seldon-v2-servers.yaml \
> ${HELM_SERVERS_BASE}/.seldon-v2-servers.yaml
sed -zi 's#\(apiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole.*\- get\n\-\-\-\)#{{- if .Values.controller.clusterwide -}}\n\1\n{{- end }}#' ${HELM_COMPONENTS_BASE}/seldon-v2-components.yaml
Expand Down
15 changes: 0 additions & 15 deletions k8s/add-helm-toggle-hodometer.sed

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -887,7 +886,6 @@ spec:
| nindent 8 }}
serviceAccountName: seldon-controller-manager
terminationGracePeriodSeconds: 10
{{ if .Values.hodometer.enabled }}
---
apiVersion: mlops.seldon.io/v1alpha1
kind: SeldonConfig
Expand Down Expand Up @@ -1473,7 +1471,6 @@ spec:
disable: {{ .Values.opentelemetry.disable }}
otelExporterEndpoint: '{{ .Values.opentelemetry.endpoint }}'
ratio: '{{ .Values.opentelemetry.ratio }}'
{{ end }}
---
apiVersion: mlops.seldon.io/v1alpha1
kind: ServerConfig
Expand Down
1 change: 0 additions & 1 deletion k8s/helm-charts/seldon-core-v2-setup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ opentelemetry:
ratio: 1

hodometer:
enabled: true
image:
pullPolicy: IfNotPresent
registry: docker.io
Expand Down
1 change: 0 additions & 1 deletion k8s/helm-charts/seldon-core-v2-setup/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ opentelemetry:
ratio: 1

hodometer:
enabled: true
image:
pullPolicy: IfNotPresent
registry: docker.io
Expand Down

0 comments on commit ea5f5d4

Please sign in to comment.