Closed zuiurs closed 5 years ago
To avoid nil pointer reference, separate condition of if statement. This will prevent the error when we generate compose file for TiKV.
I want to try to generate a compose file for TiKV. TiKV document says below.
Edit the compose/values.yaml file to configure the networkMode and host and comment the tidb section out.
https://tikv.org/docs/tasks/quickstart/
However, I got nil pointer exception when I commented out tidb section.
$ helm template compose Error: render error in "tidb-docker-compose/templates/docker-compose.yml": template: tidb-docker-compose/templates/docker-compose.yml:104:33: executing "tidb-docker-compose/templates/docker-compose.yml" at <.Values.tidb.enableBinlog>: nil pointer evaluating interface {}.enableBinlog
This error is occurred by evaluating .Values.tidb and .Values.tidb.enableBinlog together. This is why I separate this condition statement.
.Values.tidb
.Values.tidb.enableBinlog
All committers have signed the CLA.
@tennix If you have the time, would you please review this?
what does this do
To avoid nil pointer reference, separate condition of if statement. This will prevent the error when we generate compose file for TiKV.
what is happened
I want to try to generate a compose file for TiKV. TiKV document says below.
https://tikv.org/docs/tasks/quickstart/
However, I got nil pointer exception when I commented out tidb section.
This error is occurred by evaluating
.Values.tidb
and.Values.tidb.enableBinlog
together. This is why I separate this condition statement.