Skip to content

Commit fc5542c

Browse files
authored
Merge pull request kubernetes-sigs#605 from alvaroaleman/release-0-2-2
:Running: Release v0.2.2
2 parents 1592b5e + c32f967 commit fc5542c

File tree

10 files changed

+342
-43
lines changed

10 files changed

+342
-43
lines changed

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Gopkg.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hack/release/release-notes.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ NEWLINE="
2121
"
2222
head_commit=$(git rev-parse HEAD)
2323
while read commit_word commit; do
24+
if [[ -z ${commit_word} ]]; then
25+
# skip terminating blank lines
26+
continue
27+
fi
2428
read title
29+
if [[ ${title} == "Merge branch '"*"' into release-"* ]]; then
30+
# skip temporary merge commits for calculating release notes
31+
continue
32+
fi
33+
2534
read # skip the blank line
2635
read prefix body
2736

pkg/client/options.go

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,21 @@ func (o *CreateOptions) ApplyOptions(opts []CreateOption) *CreateOptions {
142142
return o
143143
}
144144

145+
// ApplyToCreate implements CreateOption
146+
func (o *CreateOptions) ApplyToCreate(co *CreateOptions) {
147+
if o.DryRun != nil {
148+
co.DryRun = o.DryRun
149+
}
150+
if o.FieldManager != "" {
151+
co.FieldManager = o.FieldManager
152+
}
153+
if o.Raw != nil {
154+
co.Raw = o.Raw
155+
}
156+
}
157+
158+
var _ CreateOption = &CreateOptions{}
159+
145160
// CreateDryRunAll sets the "dry run" option to "all".
146161
//
147162
// Deprecated: Use DryRunAll
@@ -211,6 +226,27 @@ func (o *DeleteOptions) ApplyOptions(opts []DeleteOption) *DeleteOptions {
211226
return o
212227
}
213228

229+
var _ DeleteOption = &DeleteOptions{}
230+
231+
// ApplyToDelete implements DeleteOption
232+
func (o *DeleteOptions) ApplyToDelete(do *DeleteOptions) {
233+
if o.GracePeriodSeconds != nil {
234+
do.GracePeriodSeconds = o.GracePeriodSeconds
235+
}
236+
if o.Preconditions != nil {
237+
do.Preconditions = o.Preconditions
238+
}
239+
if o.PropagationPolicy != nil {
240+
do.PropagationPolicy = o.PropagationPolicy
241+
}
242+
if o.Raw != nil {
243+
do.Raw = o.Raw
244+
}
245+
if o.DryRun != nil {
246+
do.DryRun = o.DryRun
247+
}
248+
}
249+
214250
// GracePeriodSeconds sets the grace period for the deletion
215251
// to the given number of seconds.
216252
type GracePeriodSeconds int64
@@ -273,6 +309,24 @@ type ListOptions struct {
273309
Raw *metav1.ListOptions
274310
}
275311

312+
var _ ListOption = &ListOptions{}
313+
314+
// ApplyToList implements ListOption for ListOptions
315+
func (o *ListOptions) ApplyToList(lo *ListOptions) {
316+
if o.LabelSelector != nil {
317+
lo.LabelSelector = o.LabelSelector
318+
}
319+
if o.FieldSelector != nil {
320+
lo.FieldSelector = o.FieldSelector
321+
}
322+
if o.Namespace != "" {
323+
lo.Namespace = o.Namespace
324+
}
325+
if o.Raw != nil {
326+
lo.Raw = o.Raw
327+
}
328+
}
329+
276330
// AsListOptions returns these options as a flattened metav1.ListOptions.
277331
// This may mutate the Raw field.
278332
func (o *ListOptions) AsListOptions() *metav1.ListOptions {
@@ -422,6 +476,21 @@ func (o *UpdateOptions) ApplyOptions(opts []UpdateOption) *UpdateOptions {
422476
return o
423477
}
424478

479+
var _ UpdateOption = &UpdateOptions{}
480+
481+
// ApplyToUpdate implements UpdateOption
482+
func (o *UpdateOptions) ApplyToUpdate(uo *UpdateOptions) {
483+
if o.DryRun != nil {
484+
uo.DryRun = o.DryRun
485+
}
486+
if o.FieldManager != "" {
487+
uo.FieldManager = o.FieldManager
488+
}
489+
if o.Raw != nil {
490+
uo.Raw = o.Raw
491+
}
492+
}
493+
425494
// UpdateDryRunAll sets the "dry run" option to "all".
426495
//
427496
// Deprecated: Use DryRunAll
@@ -479,6 +548,24 @@ func (o *PatchOptions) AsPatchOptions() *metav1.PatchOptions {
479548
return o.Raw
480549
}
481550

551+
var _ PatchOption = &PatchOptions{}
552+
553+
// ApplyToPatch implements PatchOptions
554+
func (o *PatchOptions) ApplyToPatch(po *PatchOptions) {
555+
if o.DryRun != nil {
556+
po.DryRun = o.DryRun
557+
}
558+
if o.Force != nil {
559+
po.Force = o.Force
560+
}
561+
if o.FieldManager != "" {
562+
po.FieldManager = o.FieldManager
563+
}
564+
if o.Raw != nil {
565+
po.Raw = o.Raw
566+
}
567+
}
568+
482569
// ForceOwnership indicates that in case of conflicts with server-side apply,
483570
// the client should acquire ownership of the conflicting field. Most
484571
// controllers should use this.
@@ -518,4 +605,12 @@ func (o *DeleteAllOfOptions) ApplyOptions(opts []DeleteAllOfOption) *DeleteAllOf
518605
return o
519606
}
520607

608+
var _ DeleteAllOfOption = &DeleteAllOfOptions{}
609+
610+
// ApplyToDeleteAllOf implements DeleteAllOfOption
611+
func (o *DeleteAllOfOptions) ApplyToDeleteAllOf(do *DeleteAllOfOptions) {
612+
o.ApplyToList(&do.ListOptions)
613+
o.ApplyToDelete(&do.DeleteOptions)
614+
}
615+
521616
// }}}

0 commit comments

Comments
 (0)