mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-21 11:06:10 +10:00
Merge pull request #1078 from bitnami/tensorflow-resnetGlobalImagePullSecrets
[bitnami/tensorflow-resnet] Add global 'imagePullSecrets' to overwrite any other existing one
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: tensorflow-resnet
|
||||
version: 0.0.5
|
||||
version: 0.1.0
|
||||
appVersion: 1.12.0
|
||||
description: Open-source software library serving the ResNet machine learning model.
|
||||
keywords:
|
||||
|
||||
@@ -63,6 +63,7 @@ The following tables lists the configurable parameters of the TensorFlow ResNet
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------------ | -----------------------------------------------------| -------------------------------------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `server.image.registry` | TensorFlow Serving image registry | `docker.io` |
|
||||
| `server.image.repository` | TensorFlow Serving Image name | `bitnami/tensorflow-serving` |
|
||||
| `server.image.tag` | TensorFlow Serving Image tag | `{VERSION}` |
|
||||
|
||||
@@ -70,3 +70,44 @@ Return the proper image name (for the metrics image)
|
||||
{{- $tag := .Values.metrics.image.tag | toString -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "tensorflow-resnet.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.server.image.pullSecrets .Values.client.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.server.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.client.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.server.image.pullSecrets .Values.client.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.server.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.client.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -29,12 +29,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.server.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.server.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
{{- include "tensorflow-resnet.imagePullSecrets" . | indent 6 }}
|
||||
initContainers:
|
||||
- name: seed
|
||||
image: "{{ template "tensorflow-resnet.client.image" . }}"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
## Global Docker image registry
|
||||
## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
@@ -24,7 +27,7 @@ server:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
port: 8500
|
||||
|
||||
## TensorFlow ResNet image version
|
||||
@@ -45,7 +48,7 @@ client:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
@@ -95,7 +98,7 @@ metrics:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
port: 9118
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
|
||||
Reference in New Issue
Block a user