cannot access root($) Chart.yaml Version from templated subchart

9/2/2019

i cant get the base chart version, it seems like there is the need of workaround,

tried definition in template tried definition in _helpers.tpl

{{- define "bitcore.deployment" -}}
{{- $common := dict "Values" .Values.bitcore -}}
{{- $noCommon := omit .Values "bitcore" -}}
{{- $overrides := dict "Values" $noCommon -}}
{{- $noValues := omit . "Values" -}}
{{- with merge $noValues $overrides $common -}}
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
app: {{ .Chart.Name }}
deploymentconfig: {{ .Chart.Name }}
strategy:
activeDeadlineSeconds: 21600
recreateParams:
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: {{ .Chart.Name }}
deploymentconfig: {{ .Chart.Name }}
test: required
spec:
containers:
- image: "{{ .Values.image.repository }}:{{ $.Chart.Version }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
env:
- name: BIT_CORE_RUNTIME_PROFILE
value: '{{ required "Please provide runtime profile" .Values.global.runtimeProfile }}'
- name: JAVA_OPTS
value: '{{ required "Please provide Java Ops." .Values.global.javaOpts }}'
{{- end -}}
{{- end -}}

expecting to get the real version from base chart thanks alot!!!!!

-- Matankila
charts
kubernetes
kubernetes-helm

0 Answers