daemonsetspec.go 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 v1beta1
  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. TemplateGeneration *int64 `json:"templateGeneration,omitempty"`
  27. RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
  28. }
  29. // DaemonSetSpecApplyConfiguration constructs an declarative configuration of the DaemonSetSpec type for use with
  30. // apply.
  31. func DaemonSetSpec() *DaemonSetSpecApplyConfiguration {
  32. return &DaemonSetSpecApplyConfiguration{}
  33. }
  34. // WithSelector sets the Selector field in the declarative configuration to the given value
  35. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  36. // If called multiple times, the Selector field is set to the value of the last call.
  37. func (b *DaemonSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  38. b.Selector = value
  39. return b
  40. }
  41. // WithTemplate sets the Template field in the declarative configuration to the given value
  42. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  43. // If called multiple times, the Template field is set to the value of the last call.
  44. func (b *DaemonSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  45. b.Template = value
  46. return b
  47. }
  48. // WithUpdateStrategy sets the UpdateStrategy field in the declarative configuration to the given value
  49. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  50. // If called multiple times, the UpdateStrategy field is set to the value of the last call.
  51. func (b *DaemonSetSpecApplyConfiguration) WithUpdateStrategy(value *DaemonSetUpdateStrategyApplyConfiguration) *DaemonSetSpecApplyConfiguration {
  52. b.UpdateStrategy = value
  53. return b
  54. }
  55. // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
  56. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  57. // If called multiple times, the MinReadySeconds field is set to the value of the last call.
  58. func (b *DaemonSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *DaemonSetSpecApplyConfiguration {
  59. b.MinReadySeconds = &value
  60. return b
  61. }
  62. // WithTemplateGeneration sets the TemplateGeneration field in the declarative configuration to the given value
  63. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  64. // If called multiple times, the TemplateGeneration field is set to the value of the last call.
  65. func (b *DaemonSetSpecApplyConfiguration) WithTemplateGeneration(value int64) *DaemonSetSpecApplyConfiguration {
  66. b.TemplateGeneration = &value
  67. return b
  68. }
  69. // WithRevisionHistoryLimit sets the RevisionHistoryLimit field in the declarative configuration to the given value
  70. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  71. // If called multiple times, the RevisionHistoryLimit field is set to the value of the last call.
  72. func (b *DaemonSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DaemonSetSpecApplyConfiguration {
  73. b.RevisionHistoryLimit = &value
  74. return b
  75. }