Skip to content

Commit e639487

Browse files
authored
Merge pull request #1112 from vincepri/remove-deprecated-pkg-client
⚠️ Remove deprecated pkg/client options
2 parents 75e899c + 5ccb7cb commit e639487

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

pkg/client/client_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ var _ = Describe("Client", func() {
283283
Expect(cl).NotTo(BeNil())
284284

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

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

424424
By("creating the object")
425-
err = cl.Create(context.TODO(), u, client.CreateDryRunAll)
425+
err = cl.Create(context.TODO(), u, client.DryRunAll)
426426
Expect(err).NotTo(HaveOccurred())
427427

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

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

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

14761476
By("validating patched Deployment does not have the new annotation")

pkg/client/options.go

-23
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,6 @@ func (o *CreateOptions) ApplyToCreate(co *CreateOptions) {
173173

174174
var _ CreateOption = &CreateOptions{}
175175

176-
// CreateDryRunAll sets the "dry run" option to "all".
177-
//
178-
// Deprecated: Use DryRunAll
179-
var CreateDryRunAll = DryRunAll
180-
181176
// }}}
182177

183178
// {{{ Delete Options
@@ -460,14 +455,6 @@ func (m MatchingLabelsSelector) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
460455
m.ApplyToList(&opts.ListOptions)
461456
}
462457

463-
// MatchingField filters the list operation on the given field selector
464-
// (or index in the case of cached lists).
465-
//
466-
// Deprecated: Use MatchingFields
467-
func MatchingField(name, val string) MatchingFields {
468-
return MatchingFields{name: val}
469-
}
470-
471458
// MatchingFields filters the list/delete operation on the given field Set
472459
// (or index in the case of cached lists).
473460
type MatchingFields fields.Set
@@ -595,11 +582,6 @@ func (o *UpdateOptions) ApplyToUpdate(uo *UpdateOptions) {
595582
}
596583
}
597584

598-
// UpdateDryRunAll sets the "dry run" option to "all".
599-
//
600-
// Deprecated: Use DryRunAll
601-
var UpdateDryRunAll = DryRunAll
602-
603585
// }}}
604586

605587
// {{{ Patch Options
@@ -682,11 +664,6 @@ func (forceOwnership) ApplyToPatch(opts *PatchOptions) {
682664
opts.Force = &definitelyTrue
683665
}
684666

685-
// PatchDryRunAll sets the "dry run" option to "all".
686-
//
687-
// Deprecated: Use DryRunAll
688-
var PatchDryRunAll = DryRunAll
689-
690667
// }}}
691668

692669
// {{{ DeleteAllOf Options

0 commit comments

Comments
 (0)