Skip to content

Commit ceee36f

Browse files
yxd-ymarttor
authored andcommitted
Move config to initialization.
1 parent d8b9e29 commit ceee36f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pkg/helm/chart.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"path/filepath"
77

8+
"github.com/arttor/helmify/pkg/cluster"
89
"github.com/arttor/helmify/pkg/helmify"
910
"github.com/pkg/errors"
1011
"github.com/sirupsen/logrus"
@@ -35,6 +36,7 @@ func (o output) Create(chartDir, chartName string, templates []helmify.Template)
3536
// group templates into files
3637
files := map[string][]helmify.Template{}
3738
values := helmify.Values{}
39+
values[cluster.DomainKey] = cluster.DefaultDomain
3840
for _, template := range templates {
3941
file := files[template.Filename()]
4042
file = append(file, template)

pkg/processor/webhook/cert.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,20 @@ func (c cert) Process(appMeta helmify.AppMetadata, obj *unstructured.Unstructure
8080
return true, &certResult{
8181
name: name,
8282
data: []byte(res),
83-
values: helmify.Values{
84-
cluster.DomainKey: cluster.DefaultDomain,
85-
},
8683
}, nil
8784
}
8885

8986
type certResult struct {
90-
name string
91-
data []byte
92-
values helmify.Values
87+
name string
88+
data []byte
9389
}
9490

9591
func (r *certResult) Filename() string {
9692
return r.name + ".yaml"
9793
}
9894

9995
func (r *certResult) Values() helmify.Values {
100-
return r.values
96+
return helmify.Values{}
10197
}
10298

10399
func (r *certResult) Write(writer io.Writer) error {

0 commit comments

Comments
 (0)