mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-20 18:46:11 +10:00
[bitnami/tensorflow-inception] Add prometheus exporter
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: tensorflow-inception
|
||||
version: 3.0.1
|
||||
version: 3.1.0
|
||||
appVersion: 1.11.1
|
||||
description: Open-source software library for serving machine learning models
|
||||
keywords:
|
||||
|
||||
@@ -76,6 +76,15 @@ The following tables lists the configurable parameters of the TensorFlow Incepti
|
||||
| `client.image.pullPolicy` | TensorFlow Inception image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
|
||||
| `client.image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
|
||||
| `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` |
|
||||
| `podAnnotations` | Pod annotations | `{}` |
|
||||
| `metrics.enabled` | Start a side-car Tensorflow prometheus exporter | `false` |
|
||||
| `metrics.image.registry` | Tensorflow exporter image registry | `docker.io` |
|
||||
| `metrics.image.repository` | Tensorflow exporter image name | `ynqa/tensorflow-serving-exporter` |
|
||||
| `metrics.image.tag` | Tensorflow exporter image tag | `latest` |
|
||||
| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `nil` |
|
||||
| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | `{prometheus.io/scrape: "true", prometheus.io/port: "9118"}` |
|
||||
| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
|
||||
@@ -60,3 +60,13 @@ Also, we can't use a single if because lazy evaluation is not an option
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the metrics image)
|
||||
*/}}
|
||||
{{- define "metrics.image" -}}
|
||||
{{- $registryName := .Values.metrics.image.registry -}}
|
||||
{{- $repositoryName := .Values.metrics.image.repository -}}
|
||||
{{- $tag := .Values.metrics.image.tag | toString -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -19,6 +19,15 @@ spec:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.server.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -48,7 +57,7 @@ spec:
|
||||
- name: seed
|
||||
mountPath: /seed
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
- name: serving
|
||||
image: "{{ template "tensorflow-inception.server.image" . }}"
|
||||
imagePullPolicy: {{ .Values.server.image.pullPolicy | quote }}
|
||||
readinessProbe:
|
||||
@@ -64,6 +73,29 @@ spec:
|
||||
volumeMounts:
|
||||
- name: seed
|
||||
mountPath: "/bitnami/model-data"
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
command: ['python', 'tf_serving_exporter.py', '--tf_port', '{{ .Values.server.port }}', '--port', '9118', '--model_name', 'inception-v3']
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9118
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: seed
|
||||
emptyDir: {}
|
||||
|
||||
@@ -57,3 +57,32 @@ imagePullPolicy: IfNotPresent
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
##
|
||||
serviceType: LoadBalancer
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: ynqa/tensorflow-serving-exporter
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9118"
|
||||
## Metrics exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
# resources: {}
|
||||
|
||||
Reference in New Issue
Block a user