Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Remove deprecated pkg/client options #1112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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