update helm controller

This commit is contained in:
galal-hussein 2019-12-19 00:55:36 +02:00 committed by Craig Jellick
parent 0f92707432
commit ab273a7f1c
6 changed files with 22 additions and 7 deletions

2
go.mod
View File

@ -98,7 +98,7 @@ require (
github.com/pkg/errors v0.8.1
github.com/rakelkar/gonetsh v0.0.0-20190719023240-501daadcadf8 // indirect
github.com/rancher/dynamiclistener v0.2.0
github.com/rancher/helm-controller v0.3.0
github.com/rancher/helm-controller v0.4.0
github.com/rancher/kine v0.3.2
github.com/rancher/remotedialer v0.2.0
github.com/rancher/wrangler v0.4.0

2
go.sum
View File

@ -715,6 +715,8 @@ github.com/rancher/flannel v0.11.0-k3s.1 h1:mIwnfWDafjzQgFkZeJ1AkFrrAT3EdBaA1giE
github.com/rancher/flannel v0.11.0-k3s.1/go.mod h1:Hn4ZV+eq0LhLZP63xZnxdGwXEoRSxs5sxELxu27M3UA=
github.com/rancher/helm-controller v0.3.0 h1:sYRpOiJc4+NmSEkft3lR2pwaEPOrPzZOTo2UjFnVF4I=
github.com/rancher/helm-controller v0.3.0/go.mod h1:194LHuZRrxcD82bG1rJtOWsw98U4JbPhDWqvL7l3PAw=
github.com/rancher/helm-controller v0.4.0 h1:VO7TqMsMWh3TJK7U38LLht1uHiDy0fSYWSywT0bE5lY=
github.com/rancher/helm-controller v0.4.0/go.mod h1:194LHuZRrxcD82bG1rJtOWsw98U4JbPhDWqvL7l3PAw=
github.com/rancher/kine v0.3.2 h1:2kP48ojBWVoZ6vlzixc9jc9uKRk7Yn1a7kWoOsJi7Sg=
github.com/rancher/kine v0.3.2/go.mod h1:xEMl0tLCva9/9me7mXJ3m9Vo6yqHgC4OU3NiK4CPrGQ=
github.com/rancher/kubernetes v1.17.0-k3s.1 h1:g1xvTHOHMJxwWtseblor0gighLRHpL7Bf9MwX8HR3W0=

View File

@ -18,5 +18,4 @@ limitations under the License.
// +k8s:deepcopy-gen=package
// +groupName=helm.cattle.io
package v1

View File

@ -23,6 +23,7 @@ type HelmChartSpec struct {
Repo string `json:"repo,omitempty"`
Set map[string]intstr.IntOrString `json:"set,omitempty"`
ValuesContent string `json:"valuesContent,omitempty"`
HelmVersion string `json:"helmVersion,omitempty"`
}
type HelmChartStatus struct {

View File

@ -39,7 +39,7 @@ type Controller struct {
}
const (
image = "rancher/klipper-helm:v0.1.5"
image = "rancher/klipper-helm:v0.2.0"
label = "helmcharts.helm.cattle.io/chart"
name = "helm-controller"
)
@ -199,6 +199,22 @@ func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap) {
Name: "VALUES_HASH",
Value: hex.EncodeToString(valuesHash[:]),
},
{
Name: "HELM_DRIVER",
Value: "secret",
},
{
Name: "CHART_NAMESPACE",
Value: chart.Namespace,
},
{
Name: "CHART",
Value: chart.Spec.Chart,
},
{
Name: "HELM_VERSION",
Value: chart.Spec.HelmVersion,
},
},
},
},
@ -298,15 +314,12 @@ func args(chart *helmv1.HelmChart) []string {
if chart.DeletionTimestamp != nil {
return []string{
"delete",
"--purge", chart.Name,
}
}
spec := chart.Spec
args := []string{
"install",
"--name", chart.Name,
spec.Chart,
}
if spec.TargetNamespace != "" {
args = append(args, "--namespace", spec.TargetNamespace)

2
vendor/modules.txt vendored
View File

@ -711,7 +711,7 @@ github.com/rancher/dynamiclistener/factory
github.com/rancher/dynamiclistener/storage/file
github.com/rancher/dynamiclistener/storage/kubernetes
github.com/rancher/dynamiclistener/storage/memory
# github.com/rancher/helm-controller v0.3.0
# github.com/rancher/helm-controller v0.4.0
github.com/rancher/helm-controller/pkg/apis/helm.cattle.io
github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1
github.com/rancher/helm-controller/pkg/generated/clientset/versioned