Commit b67207a1 authored by William Zhang's avatar William Zhang

Update helm-controller to v0.2.2

parent 70a42477
......@@ -230,7 +230,7 @@ import:
version: c08b499d17195fbc2c1764b21c322951811629a5
repo: https://github.com/erikwilson/rancher-dynamiclistener.git
- package: github.com/rancher/helm-controller
version: v0.2.1
version: v0.2.2
- package: github.com/rancher/remotedialer
version: 7c71ffa8f5d7a181704d92bb8a33b0c7d07dccaa
repo: https://github.com/erikwilson/rancher-remotedialer.git
......
......@@ -16,7 +16,7 @@ github.com/rancher/wrangler 7737c167e16514a38229bc64c839cee8cd14e6d3
github.com/rancher/wrangler-api v0.1.4
github.com/rancher/dynamiclistener c08b499d17195fbc2c1764b21c322951811629a5 https://github.com/erikwilson/rancher-dynamiclistener.git
github.com/rancher/remotedialer 7c71ffa8f5d7a181704d92bb8a33b0c7d07dccaa https://github.com/erikwilson/rancher-remotedialer.git
github.com/rancher/helm-controller v0.2.1
github.com/rancher/helm-controller v0.2.2
github.com/matryer/moq ee5226d43009 https://github.com/rancher/moq.git
github.com/coreos/flannel 823afe66b2266bf71f5bec24e6e28b26d70cfc7c https://github.com/ibuildthecloud/flannel.git
github.com/natefinch/lumberjack aee4629129445bbdfb69aa565537dcfa16544311
......
......@@ -8,6 +8,7 @@ import (
"os"
"sort"
"k8s.io/apimachinery/pkg/types"
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"
batchcontroller "github.com/rancher/wrangler-api/pkg/generated/controllers/batch/v1"
......@@ -21,6 +22,7 @@ import (
rbac "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/errors"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
)
......@@ -50,7 +52,13 @@ func Register(ctx context.Context, apply apply.Apply,
cm corecontroller.ConfigMapController) {
apply = apply.WithSetID(name).
WithCacheTypes(helms, jobs, crbs, sas, cm).
WithStrictCaching()
WithStrictCaching().WithPatcher(batch.SchemeGroupVersion.WithKind("Job"), func(namespace, name string, pt types.PatchType, data []byte) (runtime.Object, error) {
err := jobs.Delete(namespace, name, &metav1.DeleteOptions{})
if err == nil {
return nil, fmt.Errorf("replace job")
}
return nil, err
})
relatedresource.Watch(ctx, "helm-pod-watch",
func(namespace, name string, obj runtime.Object) ([]relatedresource.Key, error) {
......
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