Skip to content

Commit

Permalink
Merge pull request fluxcd#61 from dweomer/fix-toleration
Browse files Browse the repository at this point in the history
fix uninitialized toleration
  • Loading branch information
dweomer authored Aug 16, 2020
2 parents 2b44dc0 + ca65177 commit c078893
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/helm/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ 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/types"
"k8s.io/apimachinery/pkg/util/intstr"
Expand Down Expand Up @@ -54,7 +53,7 @@ func Register(ctx context.Context, apply apply.Apply,
apply = apply.WithSetID(Name).
WithCacheTypes(helms, jobs, crbs, sas, cm).
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{})
err := jobs.Delete(namespace, name, &meta.DeleteOptions{})
if err == nil {
return nil, fmt.Errorf("replace job")
}
Expand Down Expand Up @@ -238,7 +237,7 @@ func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap, *core.ConfigMap)
},
{
Key: "node.cloudprovider.kubernetes.io/uninitialized",
Operator: "=",
Operator: core.TolerationOpEqual,
Value: "true",
Effect: "NoSchedule",
},
Expand Down

0 comments on commit c078893

Please sign in to comment.