Skip to content

Commit

Permalink
Merge pull request #1112 from vincepri/remove-deprecated-pkg-client
Browse files Browse the repository at this point in the history
⚠️ Remove deprecated pkg/client options
  • Loading branch information
k8s-ci-robot committed Aug 4, 2020
2 parents 75e899c + 5ccb7cb commit e639487
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
8 changes: 4 additions & 4 deletions pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ var _ = Describe("Client", func() {
Expect(cl).NotTo(BeNil())

By("creating the object (with DryRun)")
err = cl.Create(context.TODO(), dep, client.CreateDryRunAll)
err = cl.Create(context.TODO(), dep, client.DryRunAll)
Expect(err).NotTo(HaveOccurred())

actual, err := clientset.AppsV1().Deployments(ns).Get(ctx, dep.Name, metav1.GetOptions{})
Expand Down Expand Up @@ -422,7 +422,7 @@ var _ = Describe("Client", func() {
})

By("creating the object")
err = cl.Create(context.TODO(), u, client.CreateDryRunAll)
err = cl.Create(context.TODO(), u, client.DryRunAll)
Expect(err).NotTo(HaveOccurred())

actual, err := clientset.AppsV1().Deployments(ns).Get(ctx, dep.Name, metav1.GetOptions{})
Expand Down Expand Up @@ -1339,7 +1339,7 @@ var _ = Describe("Client", func() {
Expect(err).NotTo(HaveOccurred())

By("patching the Deployment with dry-run")
err = cl.Patch(context.TODO(), dep, client.RawPatch(types.MergePatchType, mergePatch), client.PatchDryRunAll)
err = cl.Patch(context.TODO(), dep, client.RawPatch(types.MergePatchType, mergePatch), client.DryRunAll)
Expect(err).NotTo(HaveOccurred())

By("validating patched Deployment doesn't have the new annotation")
Expand Down Expand Up @@ -1470,7 +1470,7 @@ var _ = Describe("Client", func() {
Kind: "Deployment",
Version: "v1",
})
err = cl.Patch(context.TODO(), u, client.RawPatch(types.MergePatchType, mergePatch), client.PatchDryRunAll)
err = cl.Patch(context.TODO(), u, client.RawPatch(types.MergePatchType, mergePatch), client.DryRunAll)
Expect(err).NotTo(HaveOccurred())

By("validating patched Deployment does not have the new annotation")
Expand Down
23 changes: 0 additions & 23 deletions pkg/client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ func (o *CreateOptions) ApplyToCreate(co *CreateOptions) {

var _ CreateOption = &CreateOptions{}

// CreateDryRunAll sets the "dry run" option to "all".
//
// Deprecated: Use DryRunAll
var CreateDryRunAll = DryRunAll

// }}}

// {{{ Delete Options
Expand Down Expand Up @@ -460,14 +455,6 @@ func (m MatchingLabelsSelector) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
m.ApplyToList(&opts.ListOptions)
}

// MatchingField filters the list operation on the given field selector
// (or index in the case of cached lists).
//
// Deprecated: Use MatchingFields
func MatchingField(name, val string) MatchingFields {
return MatchingFields{name: val}
}

// MatchingFields filters the list/delete operation on the given field Set
// (or index in the case of cached lists).
type MatchingFields fields.Set
Expand Down Expand Up @@ -595,11 +582,6 @@ func (o *UpdateOptions) ApplyToUpdate(uo *UpdateOptions) {
}
}

// UpdateDryRunAll sets the "dry run" option to "all".
//
// Deprecated: Use DryRunAll
var UpdateDryRunAll = DryRunAll

// }}}

// {{{ Patch Options
Expand Down Expand Up @@ -682,11 +664,6 @@ func (forceOwnership) ApplyToPatch(opts *PatchOptions) {
opts.Force = &definitelyTrue
}

// PatchDryRunAll sets the "dry run" option to "all".
//
// Deprecated: Use DryRunAll
var PatchDryRunAll = DryRunAll

// }}}

// {{{ DeleteAllOf Options
Expand Down

0 comments on commit e639487

Please sign in to comment.