deploymentspec.go 5.9 KB

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