mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Update helm-controller
Related to https://github.com/rancher/rke2/issues/271 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
866dc94cea
commit
733d26816a
2
go.mod
2
go.mod
@ -97,7 +97,7 @@ require (
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rancher/dynamiclistener v0.2.1
|
||||
github.com/rancher/helm-controller v0.7.2
|
||||
github.com/rancher/helm-controller v0.7.3
|
||||
github.com/rancher/kine v0.4.0
|
||||
github.com/rancher/remotedialer v0.2.0
|
||||
github.com/rancher/spur v0.0.0-20200617165101-8702c8e4ce7a
|
||||
|
4
go.sum
4
go.sum
@ -648,8 +648,8 @@ github.com/rancher/go-powershell v0.0.0-20200701182037-6845e6fcfa79 h1:UeC0rjrIe
|
||||
github.com/rancher/go-powershell v0.0.0-20200701182037-6845e6fcfa79/go.mod h1:xi4WpK6Op4m1Lknq61/e+VSjYlTs9bulVOaDNyBdzvk=
|
||||
github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373 h1:BePi97poJ4hXnkP9yX96EmNQgMg+dGScvB1sqIheJ7w=
|
||||
github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373/go.mod h1:Vz8oLnHgttpo/aZrTpjbcpZEDzzElqNau2zmorToY0E=
|
||||
github.com/rancher/helm-controller v0.7.2 h1:noDPX08rnEoYhTGfgyLdEqG7DvihYbWJagbdS9OiA7s=
|
||||
github.com/rancher/helm-controller v0.7.2/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0=
|
||||
github.com/rancher/helm-controller v0.7.3 h1:WTQHcNF2vl9w6Xd1eBtXDe0JUsYMFFstqX9ghGhI5Ac=
|
||||
github.com/rancher/helm-controller v0.7.3/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0=
|
||||
github.com/rancher/kine v0.4.0 h1:1IhWy3TzjExG8xnj46eyUEWdzqNAD1WrgL4eEBKm6Uc=
|
||||
github.com/rancher/kine v0.4.0/go.mod h1:IImtCJ68AIkE+VY/kUI0NkyJL5q5WzO8QvMsSXqbrpA=
|
||||
github.com/rancher/kubernetes v1.18.8-k3s1 h1:dqukpA38pR5V7opoTDDslVYIxlM3sP5535u3Zd23W2I=
|
||||
|
1
vendor/github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1/types.go
generated
vendored
1
vendor/github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1/types.go
generated
vendored
@ -26,6 +26,7 @@ type HelmChartSpec struct {
|
||||
HelmVersion string `json:"helmVersion,omitempty"`
|
||||
Bootstrap bool `json:"bootstrap,omitempty"`
|
||||
ChartContent string `json:"chartContent,omitempty"`
|
||||
JobImage string `json:"jobImage,omitempty"`
|
||||
}
|
||||
|
||||
type HelmChartStatus struct {
|
||||
|
10
vendor/github.com/rancher/helm-controller/pkg/helm/controller.go
generated
vendored
10
vendor/github.com/rancher/helm-controller/pkg/helm/controller.go
generated
vendored
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
helmv1 "github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1"
|
||||
helmcontroller "github.com/rancher/helm-controller/pkg/generated/controllers/helm.cattle.io/v1"
|
||||
@ -38,7 +39,7 @@ type Controller struct {
|
||||
}
|
||||
|
||||
const (
|
||||
image = "rancher/klipper-helm:v0.3.0"
|
||||
DefaultJobImage = "rancher/klipper-helm:v0.3.0"
|
||||
Label = "helmcharts.helm.cattle.io/chart"
|
||||
Annotation = "helmcharts.helm.cattle.io/configHash"
|
||||
CRDName = "helmcharts.helm.cattle.io"
|
||||
@ -183,6 +184,11 @@ func (c *Controller) OnConfChange(key string, conf *helmv1.HelmChartConfig) (*he
|
||||
func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap, *core.ConfigMap) {
|
||||
oneThousand := int32(1000)
|
||||
|
||||
jobImage := strings.TrimSpace(chart.Spec.JobImage)
|
||||
if jobImage == "" {
|
||||
jobImage = DefaultJobImage
|
||||
}
|
||||
|
||||
action := "install"
|
||||
if chart.DeletionTimestamp != nil {
|
||||
action = "delete"
|
||||
@ -214,7 +220,7 @@ func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap, *core.ConfigMap)
|
||||
Containers: []core.Container{
|
||||
{
|
||||
Name: "helm",
|
||||
Image: image,
|
||||
Image: jobImage,
|
||||
ImagePullPolicy: core.PullIfNotPresent,
|
||||
Args: args(chart),
|
||||
Env: []core.EnvVar{
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -739,7 +739,7 @@ github.com/rancher/dynamiclistener/storage/memory
|
||||
# github.com/rancher/go-powershell v0.0.0-20200701182037-6845e6fcfa79
|
||||
github.com/rancher/go-powershell/backend
|
||||
github.com/rancher/go-powershell/utils
|
||||
# github.com/rancher/helm-controller v0.7.2
|
||||
# github.com/rancher/helm-controller v0.7.3
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user