Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separation startup scripts and application config from yaml files #149

Merged
merged 7 commits into from
Oct 30, 2018

Conversation

onlymellb
Copy link
Contributor

No description provided.

@onlymellb
Copy link
Contributor Author

/run-e2e-tests

@@ -14,3 +14,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "tidb-cluster.utils.template" -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to give the template helpers generic names if they are not specific to our chart. This makes it easier to re-use them in different charts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe chart.configmap-template?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use helm-toolkit.utils.template instead @gregwebs @tennix ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, lgtm.

weekface
weekface previously approved these changes Oct 26, 2018
Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pump/drainer startup script should also be put in a configmap to keep consistent with pd/tikv/tidb pod.

@@ -14,3 +14,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "tidb-cluster.utils.template" -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe chart.configmap-template?

@onlymellb
Copy link
Contributor Author

The pump/drainer startup script has been separated.

@tennix
Copy link
Member

tennix commented Oct 30, 2018

For the configuration files, I think it's better to add the filename suffix for toml, yaml format.

@tennix
Copy link
Member

tennix commented Oct 30, 2018

I've run helm template charts/tidb-cluster --name=demo --namespace=tidb and got the following errors:

Error: render error in "tidb-cluster/templates/tikv-configmap.yaml": template: tidb-cluster/templates/tikv-configmap.yaml:13:42: executing "tidb-cluster/templates/tikv-configmap.yaml" at <include "helm-toolki...>: error calling include: template: no template "helm-toolkit.utils.template" associated with template "gotpl"

Have you tested the templates?

@weekface
Copy link
Contributor

/run-e2e-tests

Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weekface weekface merged commit f0257bd into pingcap:master Oct 30, 2018
queenliuxx pushed a commit to queenliuxx/tidb-operator that referenced this pull request Dec 19, 2018
…ngcap#149)

* separation startup scripts and application config from yaml files
@onlymellb onlymellb deleted the onlymellb/refine-charts branch April 26, 2019 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants