Merge pull request #1102 from bitnami/global

Use global registry in secondary, metrics and other non-default images
This commit is contained in:
Carlos Rodríguez Hernández
2019-03-15 09:59:25 +01:00
committed by GitHub
49 changed files with 325 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: apache
version: 4.1.0
version: 4.1.1
appVersion: 2.4.38
description: Chart for Apache HTTP Server
keywords:

View File

@@ -76,9 +76,22 @@ imagePullSecrets:
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "apache.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}

View File

@@ -63,7 +63,7 @@ spec:
mountPath: /bitnami/apache
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "apache.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:8080/server-status/?auto']
ports:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: cassandra
version: 2.3.1
version: 2.3.2
appVersion: 3.11.4
description: Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.
icon: https://bitnami.com/assets/stacks/cassandra/img/cassandra-stack-220x234.png

View File

@@ -65,27 +65,39 @@ Also, we can't use a single if because lazy evaluation is not an option
{{- end -}}
{{- end -}}
{{/*
Return the proper metrics image name
*/}}
{{- define "cassandra.metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- $repositoryName := .Values.metrics.image.repository -}}
{{- $tag := .Values.metrics.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Get the init db configmap.
*/}}
{{- define "cassandra.initDbCM" -}}
{{- if .Values.initDBConfigMap -}}
{{- printf "%s" .Values.initDBConfigMap -}}
{{- else -}}
{{- printf "%s-init-scripts" (include "cassandra.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Get the init db configmap.
*/}}
{{- define "cassandra.initDbCM" -}}
{{- if .Values.initDBConfigMap -}}
{{- printf "%s" .Values.initDBConfigMap -}}
{{- else -}}
{{- printf "%s-init-scripts" (include "cassandra.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Get the configuration configmap.

View File

@@ -257,4 +257,4 @@ spec:
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: consul
version: 4.2.0
version: 4.2.1
appVersion: 1.4.3
description: Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
home: https://www.consul.io/

View File

@@ -45,6 +45,29 @@ Also, we can't use a single if because lazy evaluation is not an option
{{- end -}}
{{- end -}}
{{/*
Return the proper metrics image name
*/}}
{{- define "consul.metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- $repositoryName := .Values.metrics.image.repository -}}
{{- $tag := .Values.metrics.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}

View File

@@ -186,7 +186,7 @@ spec:
{{ end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: "{{ .Values.metrics.image.registry }}/{{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}"
image: "{{ template "consul.metrics.image" . }}"
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
env:
command: [ '/bin/consul_exporter' , '--consul.server={{ template "consul.fullname" . }}:{{ .Values.port }}']

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: elasticsearch
version: 4.6.3
version: 4.6.4
appVersion: 6.6.2
description: A highly scalable open-source full-text search and analytics engine
keywords:

View File

@@ -102,19 +102,47 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{/*
Return the proper ES exporter image name
*/}}
{{- define "metrics.image" -}}
{{- $registryName := default "docker.io" .Values.metrics.image.registry -}}
{{- $tag := default "latest" .Values.metrics.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName .Values.metrics.image.repository $tag -}}
{{- define "elasticsearch.metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- $repositoryName := .Values.metrics.image.repository -}}
{{- $tag := .Values.metrics.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper sysctl image name
*/}}
{{- define "sysctl.image" -}}
{{- $registryName := default "docker.io" .Values.sysctlImage.registry -}}
{{- $tag := default "latest" .Values.sysctlImage.tag | toString -}}
{{- printf "%s/%s:%s" $registryName .Values.sysctlImage.repository $tag -}}
{{- define "elasticsearch.sysctl.image" -}}
{{- $registryName := .Values.sysctlImage.image.registry -}}
{{- $repositoryName := .Values.sysctlImage.image.repository -}}
{{- $tag := .Values.sysctlImage.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -56,7 +56,7 @@ spec:
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
initContainers:
- name: sysctl
image: {{ template "sysctl.image" . }}
image: {{ template "elasticsearch.sysctl.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command: ['sh', '-c', 'install_packages systemd && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
securityContext:

View File

@@ -57,7 +57,7 @@ spec:
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
initContainers:
- name: sysctl
image: {{ template "sysctl.image" . }}
image: {{ template "elasticsearch.sysctl.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command: ['sh', '-c', 'install_packages systemd && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
securityContext:

View File

@@ -57,7 +57,7 @@ spec:
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
initContainers:
- name: sysctl
image: {{ template "sysctl.image" . }}
image: {{ template "elasticsearch.sysctl.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command: ['sh', '-c', 'install_packages systemd && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
securityContext:

View File

@@ -57,7 +57,7 @@ spec:
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
initContainers:
- name: sysctl
image: {{ template "sysctl.image" . }}
image: {{ template "elasticsearch.sysctl.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command: ['sh', '-c', 'install_packages systemd && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
securityContext:

View File

@@ -27,7 +27,7 @@ spec:
{{- include "elasticsearch.imagePullSecrets" . | indent 6 }}
containers:
- name: {{ template "elasticsearch.metrics.fullname" . }}
image: {{ template "metrics.image" . }}
image: {{ template "elasticsearch.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
args: [ "-es.uri=http://{{ template "elasticsearch.coordinating.fullname" . }}:{{ .Values.coordinating.service.port }}", "-es.all=true" ]
ports:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: jenkins
version: 2.2.1
version: 2.2.2
appVersion: 2.164.1
description: The leading open source automation server
keywords:

View File

@@ -41,11 +41,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "jenkins.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -75,7 +75,7 @@ spec:
mountPath: /bitnami/jenkins
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "jenkins.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: ['sh', '-c', 'python -u ./jenkins_exporter.py -j http://127.0.0.1:8080 --user $JENKINS_USERNAME --password $JENKINS_PASSWORD']
env:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: kafka
version: 1.7.0
version: 1.7.1
appVersion: 2.1.1
description: Apache Kafka is a distributed streaming platform.
keywords:

View File

@@ -59,8 +59,22 @@ Return the proper Kafka exporter image name
*/}}
{{- define "kafka.metrics.kafka.image" -}}
{{- $registryName := .Values.metrics.kafka.image.registry -}}
{{- $repositoryName := .Values.metrics.kafka.image.repository -}}
{{- $tag := .Values.metrics.kafka.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName .Values.metrics.kafka.image.repository $tag -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
@@ -68,10 +82,23 @@ Return the proper JMX exporter image name
*/}}
{{- define "kafka.metrics.jmx.image" -}}
{{- $registryName := .Values.metrics.jmx.image.registry -}}
{{- $repositoryName := .Values.metrics.jmx.image.repository -}}
{{- $tag := .Values.metrics.jmx.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName .Values.metrics.jmx.image.repository $tag -}}
{{- end -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
Create a default fully qualified zookeeper name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: mean
version: 6.1.0
version: 6.1.1
appVersion: 4.6.2
description: MEAN is a free and open-source JavaScript software stack for building dynamic web sites and web applications. The MEAN stack is MongoDB, Express.js, Angular, and Node.js. Because all components of the MEAN stack support programs written in JavaScript, MEAN applications can be written in one language for both server-side and client-side execution environments.
keywords:

View File

@@ -102,16 +102,22 @@ imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.image.pullSecrets }}
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.git.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- else if .Values.image.pullSecrets }}
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.git.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}

View File

@@ -31,6 +31,12 @@ git:
repository: bitnami/git
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:
# - myRegistryKeySecretName
## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: memcached
version: 1.5.0
version: 1.5.1
appVersion: 1.5.12
description: Chart for Memcached
keywords:

View File

@@ -18,11 +18,24 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "memcached.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -65,7 +65,7 @@ spec:
{{ toYaml .Values.resources | indent 10 }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "memcached.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
ports:
- name: metrics

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: mysql
version: 4.4.0
version: 4.4.1
appVersion: 5.7.25
description: Chart to create a Highly available MySQL cluster
keywords:

View File

@@ -53,11 +53,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper MySQL metrics exporter image name
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "mysql.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -138,7 +138,7 @@ spec:
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "mysql.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
env:
- name: MYSQL_ROOT_PASSWORD

View File

@@ -124,7 +124,7 @@ spec:
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "mysql.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
env:
- name: MYSQL_MASTER_ROOT_PASSWORD

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx-ingress-controller
version: 3.4.1
version: 3.4.2
appVersion: 0.23.0
description: Chart for the nginx Ingress controller
keywords:

View File

@@ -81,6 +81,29 @@ Also, we can't use a single if because lazy evaluation is not an option
{{- end -}}
{{- end -}}
{{/*
Return the proper defaultBackend image name
*/}}
{{- define "nginx-ingress-controller.defaultBackend.image" -}}
{{- $registryName := .Values.defaultBackend.image.registry -}}
{{- $repositoryName := .Values.defaultBackend.image.repository -}}
{{- $tag := .Values.defaultBackend.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}

View File

@@ -36,7 +36,7 @@ spec:
{{- end }}
containers:
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.defaultBackend.name }}
image: "{{ .Values.defaultBackend.image.repository }}:{{ .Values.defaultBackend.image.tag }}"
image: "{{ template "nginx-ingress-controller.defaultBackend.image" . }}"
imagePullPolicy: "{{ .Values.defaultBackend.image.pullPolicy }}"
args:
{{- range $key, $value := .Values.defaultBackend.extraArgs }}

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx
version: 2.2.0
version: 2.2.1
appVersion: 1.14.2
description: Chart for the nginx server
keywords:

View File

@@ -41,11 +41,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "nginx.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -59,7 +59,7 @@ spec:
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "nginx.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: [ '/usr/bin/exporter', '-nginx.scrape-uri', 'http://127.0.0.1:8080/status']
ports:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: node
version: 8.1.1
version: 8.1.2
appVersion: 8.15.1
description: Event-driven I/O server-side JavaScript environment based on V8
keywords:

View File

@@ -102,16 +102,22 @@ imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.image.pullSecrets }}
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.git.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- else if .Values.image.pullSecrets }}
{{- else if or .Values.image.pullSecrets .Values.git.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- range .Values.git.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}

View File

@@ -34,6 +34,12 @@ git:
repository: bitnami/git
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:
# - myRegistryKeySecretName
## Git repository http/https
##

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: tensorflow-inception
version: 3.3.0
version: 3.3.1
appVersion: 1.13.0
description: Open-source software library for serving machine learning models
keywords:

View File

@@ -64,11 +64,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "tensorflow-inception.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -75,7 +75,7 @@ spec:
mountPath: "/bitnami/model-data"
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "tensorflow-inception.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:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: tensorflow-resnet
version: 0.1.1
version: 0.1.2
appVersion: 1.13.0
description: Open-source software library serving the ResNet machine learning model.
keywords:

View File

@@ -64,11 +64,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "tensorflow-resnet.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -84,7 +84,7 @@ spec:
mountPath: "/bitnami/model-data"
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
image: {{ template "tensorflow-resnet.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
command: ['python', 'tf_serving_exporter.py', '--tf_port', '{{ .Values.server.port }}', '--port', {{ .Values.metrics.port }}, '--model_name', 'resnet']
ports:

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: zookeeper
version: 1.4.0
version: 1.4.1
appVersion: 3.4.13
description: A centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services for distributed applications.
keywords:

View File

@@ -48,11 +48,24 @@ Also, we can't use a single if because lazy evaluation is not an option
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "metrics.image" -}}
{{- $registryName := .Values.metrics.image.registry -}}
{{- define "zookeeper.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 -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}
{{/*

View File

@@ -26,7 +26,7 @@ spec:
spec:
{{- include "zookeeper.imagePullSecrets" . | indent 6 }}
containers:
- image: {{ template "metrics.image" . }}
- image: {{ template "zookeeper.metrics.image" . }}
name: zookeeper-exporter
command:
- /usr/local/bin/zookeeper-exporter