daemonsetspec.go 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by applyconfiguration-gen. DO NOT EDIT.
  14. package v1
  15. import (
  16. corev1 "k8s.io/client-go/applyconfigurations/core/v1"
  17. v1 "k8s.io/client-go/applyconfigurations/meta/v1"
  18. )
  19. // DaemonSetSpecApplyConfiguration represents an declarative configuration of the DaemonSetSpec type for use
  20. // with apply.
  21. type DaemonSetSpecApplyConfiguration struct {
  22. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
  23. Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
  24. UpdateStrategy *DaemonSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
  25. MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
  26. RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
  27. }
  28. // DaemonSetSpecApplyConfiguration constructs an declarative configuration of the DaemonSetSpec type for use with
  29. // apply.
  30. func DaemonSetSpec() *DaemonSetSpecApplyConfiguration {
  31. return &DaemonSetSpecApplyConfiguration{}
  32. }
  33. // WithSelector sets the Selector field in the declarative configuration to the given value
  34. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  35. // If called multiple times, the Selector field is set to the value of the last call.
  36. func (b *DaemonSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  37. b.Selector = value
  38. return b
  39. }
  40. // WithTemplate sets the Template field in the declarative configuration to the given value
  41. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  42. // If called multiple times, the Template field is set to the value of the last call.
  43. func (b *DaemonSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  44. b.Template = value
  45. return b
  46. }
  47. // WithUpdateStrategy sets the UpdateStrategy field in the declarative configuration to the given value
  48. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  49. // If called multiple times, the UpdateStrategy field is set to the value of the last call.
  50. func (b *DaemonSetSpecApplyConfiguration) WithUpdateStrategy(value *DaemonSetUpdateStrategyApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  51. b.UpdateStrategy = value
  52. return b
  53. }
  54. // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
  55. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  56. // If called multiple times, the MinReadySeconds field is set to the value of the last call.
  57. func (b *DaemonSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *DaemonSetSpecApplyConfiguration {
  58. b.MinReadySeconds = &value
  59. return b
  60. }
  61. // WithRevisionHistoryLimit sets the RevisionHistoryLimit field in the declarative configuration to the given value
  62. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  63. // If called multiple times, the RevisionHistoryLimit field is set to the value of the last call.
  64. func (b *DaemonSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DaemonSetSpecApplyConfiguration {
  65. b.RevisionHistoryLimit = &value
  66. return b
  67. }