-
Bug
-
Resolution: Done
-
Medium
-
None
-
Guilin Release
-
None
-
Hide
SUMMARY
While updating SDC charts to use Certinitializer, I came across a strange error when helm renders the template, I followed the usual step, eg add needed values.yaml entries and just add the following into the sdc-be deployment.yaml :
{{include "common.certInitializer.initContainer" . | nindent 6 }}}}
then when running helm template sdc or make sdc (with linting) I get :
[sdc]
make[1]: Entering directory '/home/chris/IdeaProjects/oom/kubernetes'
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
Update Complete.
Saving 3 charts
Downloading common from repo http://127.0.0.1:8879/charts
Downloading certInitializer from repo http://127.0.0.1:8879/charts
Downloading cassandra from repo http://127.0.0.1:8879/charts
Deleting outdated charts
==> Linting sdc
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: render error in "sdc/charts/sdc-be/templates/deployment.yaml": template: sdc/charts/sdc-be/templates/deployment.yaml:78:9: executing "sdc/charts/sdc-be/templates/deployment.yaml" at <include "common.certInitializer.initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:129:7: executing "common.certInitializer.initContainer" at <include "common.certInitializer._initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:44:30: executing "common.certInitializer._initContainer" at <include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)>: error calling include: template: sdc/charts/common/templates/_utils.tpl:40:157: executing "common.subChartDot" at <deepCopy $initRoot>: error calling deepCopy: reflect: call of reflect.Value.Type on zero ValueOS / ENVIRONMENT
- Kubernetes version:
1.5.11 - Helm version:
Client: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"} - Kubernetes mode of installation:
well not yet deployed this fails at make - CNI Used for Kubernetes:
- type of installation:
OOM VERSION
Master
CONFIGURATION
None used yet
STEPS TO REPRODUCE
see above, the 3 changes I did are :
1) update sdc/requirements.yaml to add :
- name: certInitializer
{{ version: ~6.x-0}}
{{ repository: '@local'}}2) update sdc/value.yaml to add :
aafEnabled: true
certInitializer:
permission_user: 1000
permission_group: 999
addconfig: true
keystoreFile: "org.onap.sdc.p12" truststoreFile: "org.onap.sdc.trust.jks" keyFile: "org.onap.sdc.keyfile" truststoreFileONAP: "truststoreONAPall.jks" nameOverride: sdc-cert-initializer
aafDeployFqi: deployer@people.osaaf.org
aafDeployPass: demo123456!
# aafDeployCredsExternalSecret: some secret fqdn: sdc
fqi: sdc@sdc.onap.org
public_fqdn: sdc.onap.org
cadi_longitude: "0.0" cadi_latitude: "0.0" app_ns: org.osaaf.aaf
credsPath: /opt/app/osaaf/local
aaf_add_config: >
/opt/app/aaf_config/bin/agent.sh;
/opt/app/aaf_config/bin/agent.sh local showpass
.Values.fqi {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop;3) updeat sdc/charts/sdc-be/templates/deployment.yaml
just adding the 3 lines at the initcontainer, volume and volumemounts:
initcontainers:
...
{{ include "common.certInitializer.initContainer" . | nindent 6 }}
volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
EXPECTED RESULTS
make sdc report no error
ACTUAL RESULTS
chris@chris-oomvm:~/IdeaProjects/oom/kubernetes$ make sdc[sdc]
make[1]: Entering directory '/home/chris/IdeaProjects/oom/kubernetes'
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
Update Complete.
Saving 3 charts
Downloading common from repo http://127.0.0.1:8879/charts
Downloading certInitializer from repo http://127.0.0.1:8879/charts
Downloading cassandra from repo http://127.0.0.1:8879/charts
Deleting outdated charts
==> Linting sdc
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: render error in "sdc/charts/sdc-be/templates/deployment.yaml": template: sdc/charts/sdc-be/templates/deployment.yaml:78:9: executing "sdc/charts/sdc-be/templates/deployment.yaml" at <include "common.certInitializer.initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:129:7: executing "common.certInitializer.initContainer" at <include "common.certInitializer._initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:44:30: executing "common.certInitializer._initContainer" at <include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)>: error calling include: template: sdc/charts/common/templates/_utils.tpl:40:157: executing "common.subChartDot" at <deepCopy $initRoot>: error calling deepCopy: reflect: call of reflect.Value.Type on zero ValueError: 1 chart(s) linted, 1 chart(s) failed
make[1]: *** [Makefile:64: lint-sdc] Error 1
make[1]: Leaving directory '/home/chris/IdeaProjects/oom/kubernetes'
make: *** [Makefile:43: sdc] Error 2ShowSUMMARY While updating SDC charts to use Certinitializer, I came across a strange error when helm renders the template, I followed the usual step, eg add needed values.yaml entries and just add the following into the sdc-be deployment.yaml : {{include "common.certInitializer.initContainer" . | nindent 6 }}}} then when running helm template sdc or make sdc (with linting) I get : [sdc] make [1] : Entering directory '/home/chris/IdeaProjects/oom/kubernetes' Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "local" chart repository Update Complete. Saving 3 charts Downloading common from repo http://127.0.0.1:8879/charts Downloading certInitializer from repo http://127.0.0.1:8879/charts Downloading cassandra from repo http://127.0.0.1:8879/charts Deleting outdated charts ==> Linting sdc [INFO] Chart.yaml: icon is recommended [ERROR] templates/: render error in "sdc/charts/sdc-be/templates/deployment.yaml": template: sdc/charts/sdc-be/templates/deployment.yaml:78:9: executing "sdc/charts/sdc-be/templates/deployment.yaml" at <include "common.certInitializer.initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:129:7: executing "common.certInitializer.initContainer" at <include "common.certInitializer._initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:44:30: executing "common.certInitializer._initContainer" at <include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)>: error calling include: template: sdc/charts/common/templates/_utils.tpl:40:157: executing "common.subChartDot" at <deepCopy $initRoot>: error calling deepCopy: reflect: call of reflect.Value.Type on zero Value OS / ENVIRONMENT Kubernetes version: 1.5.11 Helm version: Client: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"} Kubernetes mode of installation: well not yet deployed this fails at make CNI Used for Kubernetes: type of installation: OOM VERSION Master CONFIGURATION None used yet STEPS TO REPRODUCE see above, the 3 changes I did are : 1) update sdc/requirements.yaml to add : - name : certInitializer {{ version : ~6.x-0}} {{ repository : '@local' }} 2) update sdc/value.yaml to add : aafEnabled : true certInitializer : permission_user : 1000 permission_group : 999 addconfig : true keystoreFile : "org.onap.sdc.p12" truststoreFile : "org.onap.sdc.trust.jks" keyFile : "org.onap.sdc.keyfile" truststoreFileONAP : "truststoreONAPall.jks" nameOverride : sdc-cert-initializer aafDeployFqi : deployer@people.osaaf.org aafDeployPass : demo123456! # aafDeployCredsExternalSecret: some secret fqdn : sdc fqi : sdc@sdc.onap.org public_fqdn : sdc.onap.org cadi_longitude : "0.0" cadi_latitude : "0.0" app_ns : org.osaaf.aaf credsPath : /opt/app/osaaf/local aaf_add_config : > /opt/app/aaf_config/bin/agent.sh; /opt/app/aaf_config/bin/agent.sh local showpass .Values.fqi {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop; 3) updeat sdc/charts/sdc-be/templates/deployment.yaml just adding the 3 lines at the initcontainer, volume and volumemounts: initcontainers: ... {{ include "common.certInitializer.initContainer" . | nindent 6 }} volumes : {{ include "common.certInitializer.volumes" . | nindent 6 }} volumeMounts : {{ include "common.certInitializer.volumeMount" . | nindent 10 }} EXPECTED RESULTS make sdc report no error ACTUAL RESULTS chris@chris-oomvm:~/IdeaProjects/oom/kubernetes$ make sdc [sdc] make [1] : Entering directory '/home/chris/IdeaProjects/oom/kubernetes' Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "local" chart repository Update Complete. Saving 3 charts Downloading common from repo http://127.0.0.1:8879/charts Downloading certInitializer from repo http://127.0.0.1:8879/charts Downloading cassandra from repo http://127.0.0.1:8879/charts Deleting outdated charts ==> Linting sdc [INFO] Chart.yaml: icon is recommended [ERROR] templates/: render error in "sdc/charts/sdc-be/templates/deployment.yaml": template: sdc/charts/sdc-be/templates/deployment.yaml:78:9: executing "sdc/charts/sdc-be/templates/deployment.yaml" at <include "common.certInitializer.initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:129:7: executing "common.certInitializer.initContainer" at <include "common.certInitializer._initContainer" .>: error calling include: template: sdc/charts/certInitializer/templates/_certInitializer.yaml:44:30: executing "common.certInitializer._initContainer" at <include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)>: error calling include: template: sdc/charts/common/templates/_utils.tpl:40:157: executing "common.subChartDot" at <deepCopy $initRoot>: error calling deepCopy: reflect: call of reflect.Value.Type on zero Value Error: 1 chart(s) linted, 1 chart(s) failed make [1] : *** [Makefile:64: lint-sdc] Error 1 make [1] : Leaving directory '/home/chris/IdeaProjects/oom/kubernetes' make: *** [Makefile:43: sdc] Error 2 - Kubernetes version: