deploymentspec.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. // DeploymentSpecApplyConfiguration represents an declarative configuration of the DeploymentSpec type for use
  20. // with apply.
  21. type DeploymentSpecApplyConfiguration struct {
  22. Replicas *int32 `json:"replicas,omitempty"`
  23. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
  24. Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
  25. Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"`
  26. MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
  27. RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
  28. Paused *bool `json:"paused,omitempty"`
  29. ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
  30. }
  31. // DeploymentSpecApplyConfiguration constructs an declarative configuration of the DeploymentSpec type for use with
  32. // apply.
  33. func DeploymentSpec() *DeploymentSpecApplyConfiguration {
  34. return &DeploymentSpecApplyConfiguration{}
  35. }
  36. // WithReplicas sets the Replicas field in the declarative configuration to the given value
  37. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  38. // If called multiple times, the Replicas field is set to the value of the last call.
  39. func (b *DeploymentSpecApplyConfiguration) WithReplicas(value int32) *DeploymentSpecApplyConfiguration {
  40. b.Replicas = &value
  41. return b
  42. }
  43. // WithSelector sets the Selector field in the declarative configuration to the given value
  44. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  45. // If called multiple times, the Selector field is set to the value of the last call.
  46. func (b *DeploymentSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DeploymentSpecApplyConfiguration {
  47. b.Selector = value
  48. return b
  49. }
  50. // WithTemplate sets the Template field in the declarative configuration to the given value
  51. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  52. // If called multiple times, the Template field is set to the value of the last call.
  53. func (b *DeploymentSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DeploymentSpecApplyConfiguration {
  54. b.Template = value
  55. return b
  56. }
  57. // WithStrategy sets the Strategy field in the declarative configuration to the given value
  58. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  59. // If called multiple times, the Strategy field is set to the value of the last call.
  60. func (b *DeploymentSpecApplyConfiguration) WithStrategy(value *DeploymentStrategyApplyConfiguration) *DeploymentSpecApplyConfiguration {
  61. b.Strategy = value
  62. return b
  63. }
  64. // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
  65. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  66. // If called multiple times, the MinReadySeconds field is set to the value of the last call.
  67. func (b *DeploymentSpecApplyConfiguration) WithMinReadySeconds(value int32) *DeploymentSpecApplyConfiguration {
  68. b.MinReadySeconds = &value
  69. return b
  70. }
  71. // WithRevisionHistoryLimit sets the RevisionHistoryLimit field in the declarative configuration to the given value
  72. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  73. // If called multiple times, the RevisionHistoryLimit field is set to the value of the last call.
  74. func (b *DeploymentSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DeploymentSpecApplyConfiguration {
  75. b.RevisionHistoryLimit = &value
  76. return b
  77. }
  78. // WithPaused sets the Paused field in the declarative configuration to the given value
  79. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  80. // If called multiple times, the Paused field is set to the value of the last call.
  81. func (b *DeploymentSpecApplyConfiguration) WithPaused(value bool) *DeploymentSpecApplyConfiguration {
  82. b.Paused = &value
  83. return b
  84. }
  85. // WithProgressDeadlineSeconds sets the ProgressDeadlineSeconds field in the declarative configuration to the given value
  86. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  87. // If called multiple times, the ProgressDeadlineSeconds field is set to the value of the last call.
  88. func (b *DeploymentSpecApplyConfiguration) WithProgressDeadlineSeconds(value int32) *DeploymentSpecApplyConfiguration {
  89. b.ProgressDeadlineSeconds = &value
  90. return b
  91. }