bugfix(tiller): replace + with - in Chart version to support Kubernetes constraint

parent 6f77869d
......@@ -97,7 +97,7 @@ kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
replicas: {{ .Values.replicaCount }}
template:
......@@ -128,7 +128,7 @@ kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
type: {{ .Values.service.type }}
ports:
......
......@@ -32,7 +32,7 @@ func TestCreate(t *testing.T) {
}
defer os.RemoveAll(tdir)
cf := &chart.Metadata{Name: "foo"}
cf := &chart.Metadata{Name: "foo", Version: "1.0.0+a056a76"}
c, err := Create(cf, tdir)
if err != nil {
......@@ -83,7 +83,7 @@ func TestCreateFrom(t *testing.T) {
}
defer os.RemoveAll(tdir)
cf := &chart.Metadata{Name: "foo"}
cf := &chart.Metadata{Name: "foo", Version: "1.0.0+a056a76"}
srcdir := "./testdata/mariner"
if err := CreateFrom(cf, tdir, srcdir); err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment