|
53 | 53 | constraints: { |
54 | 54 | '#containers':: d.obj(help='"Containers defines constraints for the containers."'), |
55 | 55 | containers: { |
56 | | - '#limits':: d.obj(help='"Limits defines the constraints for the limits of the container."'), |
57 | | - limits: { |
58 | | - '#withMaxAllowed':: d.fn(help='"MaxAllowed is the upper limit for the requests of the container."', args=[d.arg(name='maxAllowed', type=d.T.object)]), |
59 | | - withMaxAllowed(maxAllowed): { limits+: { maxAllowed: maxAllowed } }, |
60 | | - '#withMaxAllowedMixin':: d.fn(help='"MaxAllowed is the upper limit for the requests of the container."\n\n**Note:** This function appends passed data to existing values', args=[d.arg(name='maxAllowed', type=d.T.object)]), |
61 | | - withMaxAllowedMixin(maxAllowed): { limits+: { maxAllowed+: maxAllowed } }, |
62 | | - '#withMinAllowed':: d.fn(help='"MinAllowed is the lower limit for the requests of the container."', args=[d.arg(name='minAllowed', type=d.T.object)]), |
63 | | - withMinAllowed(minAllowed): { limits+: { minAllowed: minAllowed } }, |
64 | | - '#withMinAllowedMixin':: d.fn(help='"MinAllowed is the lower limit for the requests of the container."\n\n**Note:** This function appends passed data to existing values', args=[d.arg(name='minAllowed', type=d.T.object)]), |
65 | | - withMinAllowedMixin(minAllowed): { limits+: { minAllowed+: minAllowed } }, |
66 | | - }, |
67 | 56 | '#requests':: d.obj(help='"Requests defines the constraints for the requests of the container."'), |
68 | 57 | requests: { |
69 | 58 | '#withMaxAllowed':: d.fn(help='"MaxAllowed is the upper limit for the requests of the container."', args=[d.arg(name='maxAllowed', type=d.T.object)]), |
|
75 | 64 | '#withMinAllowedMixin':: d.fn(help='"MinAllowed is the lower limit for the requests of the container."\n\n**Note:** This function appends passed data to existing values', args=[d.arg(name='minAllowed', type=d.T.object)]), |
76 | 65 | withMinAllowedMixin(minAllowed): { requests+: { minAllowed+: minAllowed } }, |
77 | 66 | }, |
78 | | - '#withEnabled':: d.fn(help='"Enabled false allows to disable resources autoscaling for the container. Default to true."', args=[d.arg(name='enabled', type=d.T.boolean)]), |
| 67 | + '#withEnabled':: d.fn(help='"Enabled, if false, allows one to disable resource autoscaling for the container. Defaults to true."', args=[d.arg(name='enabled', type=d.T.boolean)]), |
79 | 68 | withEnabled(enabled): { enabled: enabled }, |
80 | 69 | '#withName':: d.fn(help='"Name is the name of the container. Can be \\"*\\" to apply to all containers."', args=[d.arg(name='name', type=d.T.string)]), |
81 | 70 | withName(name): { name: name }, |
|
86 | 75 | withContainersMixin(containers): { spec+: { constraints+: { containers+: if std.isArray(v=containers) then containers else [containers] } } }, |
87 | 76 | '#withMaxReplicas':: d.fn(help='"MaxReplicas is the upper limit for the number of POD replicas. Needs to be >= minReplicas."', args=[d.arg(name='maxReplicas', type=d.T.integer)]), |
88 | 77 | withMaxReplicas(maxReplicas): { spec+: { constraints+: { maxReplicas: maxReplicas } } }, |
89 | | - '#withMinReplicas':: d.fn(help='"MinReplicas is the lower limit for the number of POD replicas. Needs to be >= 1. Default to 1."', args=[d.arg(name='minReplicas', type=d.T.integer)]), |
| 78 | + '#withMinReplicas':: d.fn(help='"MinReplicas is the lower limit for the number of pod replicas. Needs to be >= 1. Defaults to 1."', args=[d.arg(name='minReplicas', type=d.T.integer)]), |
90 | 79 | withMinReplicas(minReplicas): { spec+: { constraints+: { minReplicas: minReplicas } } }, |
91 | 80 | }, |
92 | 81 | '#policy':: d.obj(help='"Policy defines how recommendations should be applied."'), |
|
95 | 84 | downscale: { |
96 | 85 | '#rules':: d.obj(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"'), |
97 | 86 | rules: { |
98 | | - '#withMatch':: d.fn(help='"Match defines if the rule should be considered or not in the calculation.\\nDefault to Always if not set."', args=[d.arg(name='match', type=d.T.string)]), |
99 | | - withMatch(match): { match: match }, |
100 | | - '#withPeriodSeconds':: d.fn(help='"PeriodSeconds specifies the window of time for which the policy should hold true.\\nPeriodSeconds must be greater than zero and less than or equal to 1800 (30 min)."', args=[d.arg(name='periodSeconds', type=d.T.integer)]), |
| 87 | + '#withPeriodSeconds':: d.fn(help='"PeriodSeconds specifies the window of time for which the policy should hold true.\\nPeriodSeconds must be greater than zero and less than or equal to 3600 (1 hour)."', args=[d.arg(name='periodSeconds', type=d.T.integer)]), |
101 | 88 | withPeriodSeconds(periodSeconds): { periodSeconds: periodSeconds }, |
102 | 89 | '#withType':: d.fn(help='"Type is used to specify the scaling policy."', args=[d.arg(name='type', type=d.T.string)]), |
103 | 90 | withType(type): { type: type }, |
104 | | - '#withValue':: d.fn(help='"Value contains the amount of change which is permitted by the policy.\\nSetting it to 0 will prevent any scaling in this direction and should not be used unless Match is set to IfScalingEvent."', args=[d.arg(name='value', type=d.T.integer)]), |
| 91 | + '#withValue':: d.fn(help='"Value contains the amount of change which is permitted by the policy.\\nSetting it to 0 will prevent any scaling in this direction."', args=[d.arg(name='value', type=d.T.integer)]), |
105 | 92 | withValue(value): { value: value }, |
106 | 93 | }, |
107 | 94 | '#withRules':: d.fn(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"', args=[d.arg(name='rules', type=d.T.array)]), |
108 | 95 | withRules(rules): { spec+: { policy+: { downscale+: { rules: if std.isArray(v=rules) then rules else [rules] } } } }, |
109 | 96 | '#withRulesMixin':: d.fn(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"\n\n**Note:** This function appends passed data to existing values', args=[d.arg(name='rules', type=d.T.array)]), |
110 | 97 | withRulesMixin(rules): { spec+: { policy+: { downscale+: { rules+: if std.isArray(v=rules) then rules else [rules] } } } }, |
| 98 | + '#withStabilizationWindowSeconds':: d.fn(help='"StabilizationWindowSeconds is the number of seconds the controller should lookback at previous recommendations\\nbefore deciding to apply a new one. Defaults to 0."', args=[d.arg(name='stabilizationWindowSeconds', type=d.T.integer)]), |
| 99 | + withStabilizationWindowSeconds(stabilizationWindowSeconds): { spec+: { policy+: { downscale+: { stabilizationWindowSeconds: stabilizationWindowSeconds } } } }, |
111 | 100 | '#withStrategy':: d.fn(help='"Strategy is used to specify which policy should be used.\\nIf not set, the default value Max is used."', args=[d.arg(name='strategy', type=d.T.string)]), |
112 | 101 | withStrategy(strategy): { spec+: { policy+: { downscale+: { strategy: strategy } } } }, |
113 | 102 | }, |
114 | 103 | '#update':: d.obj(help='"Update defines the policy to update target resource."'), |
115 | 104 | update: { |
116 | | - '#withStrategy':: d.fn(help='"Mode defines the mode of the update policy."', args=[d.arg(name='strategy', type=d.T.string)]), |
| 105 | + '#withStrategy':: d.fn(help='"Strategy defines the mode of the update policy."', args=[d.arg(name='strategy', type=d.T.string)]), |
117 | 106 | withStrategy(strategy): { spec+: { policy+: { update+: { strategy: strategy } } } }, |
118 | 107 | }, |
119 | 108 | '#upscale':: d.obj(help='"Upscale defines the policy to scale up the target resource."'), |
120 | 109 | upscale: { |
121 | 110 | '#rules':: d.obj(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"'), |
122 | 111 | rules: { |
123 | | - '#withMatch':: d.fn(help='"Match defines if the rule should be considered or not in the calculation.\\nDefault to Always if not set."', args=[d.arg(name='match', type=d.T.string)]), |
124 | | - withMatch(match): { match: match }, |
125 | | - '#withPeriodSeconds':: d.fn(help='"PeriodSeconds specifies the window of time for which the policy should hold true.\\nPeriodSeconds must be greater than zero and less than or equal to 1800 (30 min)."', args=[d.arg(name='periodSeconds', type=d.T.integer)]), |
| 112 | + '#withPeriodSeconds':: d.fn(help='"PeriodSeconds specifies the window of time for which the policy should hold true.\\nPeriodSeconds must be greater than zero and less than or equal to 3600 (1 hour)."', args=[d.arg(name='periodSeconds', type=d.T.integer)]), |
126 | 113 | withPeriodSeconds(periodSeconds): { periodSeconds: periodSeconds }, |
127 | 114 | '#withType':: d.fn(help='"Type is used to specify the scaling policy."', args=[d.arg(name='type', type=d.T.string)]), |
128 | 115 | withType(type): { type: type }, |
129 | | - '#withValue':: d.fn(help='"Value contains the amount of change which is permitted by the policy.\\nSetting it to 0 will prevent any scaling in this direction and should not be used unless Match is set to IfScalingEvent."', args=[d.arg(name='value', type=d.T.integer)]), |
| 116 | + '#withValue':: d.fn(help='"Value contains the amount of change which is permitted by the policy.\\nSetting it to 0 will prevent any scaling in this direction."', args=[d.arg(name='value', type=d.T.integer)]), |
130 | 117 | withValue(value): { value: value }, |
131 | 118 | }, |
132 | 119 | '#withRules':: d.fn(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"', args=[d.arg(name='rules', type=d.T.array)]), |
133 | 120 | withRules(rules): { spec+: { policy+: { upscale+: { rules: if std.isArray(v=rules) then rules else [rules] } } } }, |
134 | 121 | '#withRulesMixin':: d.fn(help='"Rules is a list of potential scaling polices which can be used during scaling.\\nAt least one policy must be specified, otherwise the DatadogPodAutoscalerScalingPolicy will be discarded as invalid"\n\n**Note:** This function appends passed data to existing values', args=[d.arg(name='rules', type=d.T.array)]), |
135 | 122 | withRulesMixin(rules): { spec+: { policy+: { upscale+: { rules+: if std.isArray(v=rules) then rules else [rules] } } } }, |
| 123 | + '#withStabilizationWindowSeconds':: d.fn(help='"StabilizationWindowSeconds is the number of seconds the controller should lookback at previous recommendations\\nbefore deciding to apply a new one. Defaults to 0."', args=[d.arg(name='stabilizationWindowSeconds', type=d.T.integer)]), |
| 124 | + withStabilizationWindowSeconds(stabilizationWindowSeconds): { spec+: { policy+: { upscale+: { stabilizationWindowSeconds: stabilizationWindowSeconds } } } }, |
136 | 125 | '#withStrategy':: d.fn(help='"Strategy is used to specify which policy should be used.\\nIf not set, the default value Max is used."', args=[d.arg(name='strategy', type=d.T.string)]), |
137 | 126 | withStrategy(strategy): { spec+: { policy+: { upscale+: { strategy: strategy } } } }, |
138 | 127 | }, |
|
150 | 139 | }, |
151 | 140 | '#targets':: d.obj(help='"Targets are objectives to reach and maintain for the target resource.\\nDefault to a single target to maintain 80% POD CPU utilization."'), |
152 | 141 | targets: { |
153 | | - '#containerResource':: d.obj(help='"ContainerResource allows to set a container-level resource target."'), |
| 142 | + '#containerResource':: d.obj(help='"ContainerResource allows to set a container-level resource objective."'), |
154 | 143 | containerResource: { |
155 | | - '#value':: d.obj(help='"Value is the value of the target."'), |
| 144 | + '#value':: d.obj(help='"Value is the value of the objective"'), |
156 | 145 | value: { |
157 | | - '#withAbsolute':: d.fn(help='"Absolute defines the absolute value of the target (for instance 500 millicores)."', args=[d.arg(name='absolute', type=d.T.any)]), |
158 | | - withAbsolute(absolute): { containerResource+: { value+: { absolute: absolute } } }, |
159 | | - '#withType':: d.fn(help='"Type specifies how the value is expressed (Absolute or Utilization)."', args=[d.arg(name='type', type=d.T.string)]), |
| 146 | + '#withType':: d.fn(help='"Type specifies how the value is expressed (possible values: Utilization)."', args=[d.arg(name='type', type=d.T.string)]), |
160 | 147 | withType(type): { containerResource+: { value+: { type: type } } }, |
161 | | - '#withUtilization':: d.fn(help='"Utilization defines a percentage of the target compared to requested resource"', args=[d.arg(name='utilization', type=d.T.integer)]), |
| 148 | + '#withUtilization':: d.fn(help='"Utilization defines a percentage of the target compared to requested workload"', args=[d.arg(name='utilization', type=d.T.integer)]), |
162 | 149 | withUtilization(utilization): { containerResource+: { value+: { utilization: utilization } } }, |
163 | 150 | }, |
164 | 151 | '#withContainer':: d.fn(help='"Container is the name of the container."', args=[d.arg(name='container', type=d.T.string)]), |
165 | 152 | withContainer(container): { containerResource+: { container: container } }, |
166 | 153 | '#withName':: d.fn(help='"Name is the name of the resource."', args=[d.arg(name='name', type=d.T.string)]), |
167 | 154 | withName(name): { containerResource+: { name: name } }, |
168 | 155 | }, |
169 | | - '#podResource':: d.obj(help='"PodResource allows to set a POD-level resource target."'), |
| 156 | + '#podResource':: d.obj(help='"PodResource allows to set a pod-level resource objective."'), |
170 | 157 | podResource: { |
171 | | - '#value':: d.obj(help='"Value is the value of the target."'), |
| 158 | + '#value':: d.obj(help='"Value is the value of the objective."'), |
172 | 159 | value: { |
173 | | - '#withAbsolute':: d.fn(help='"Absolute defines the absolute value of the target (for instance 500 millicores)."', args=[d.arg(name='absolute', type=d.T.any)]), |
174 | | - withAbsolute(absolute): { podResource+: { value+: { absolute: absolute } } }, |
175 | | - '#withType':: d.fn(help='"Type specifies how the value is expressed (Absolute or Utilization)."', args=[d.arg(name='type', type=d.T.string)]), |
| 160 | + '#withType':: d.fn(help='"Type specifies how the value is expressed (possible values: Utilization)."', args=[d.arg(name='type', type=d.T.string)]), |
176 | 161 | withType(type): { podResource+: { value+: { type: type } } }, |
177 | | - '#withUtilization':: d.fn(help='"Utilization defines a percentage of the target compared to requested resource"', args=[d.arg(name='utilization', type=d.T.integer)]), |
| 162 | + '#withUtilization':: d.fn(help='"Utilization defines a percentage of the target compared to requested workload"', args=[d.arg(name='utilization', type=d.T.integer)]), |
178 | 163 | withUtilization(utilization): { podResource+: { value+: { utilization: utilization } } }, |
179 | 164 | }, |
180 | 165 | '#withName':: d.fn(help='"Name is the name of the resource."', args=[d.arg(name='name', type=d.T.string)]), |
181 | 166 | withName(name): { podResource+: { name: name } }, |
182 | 167 | }, |
183 | | - '#withType':: d.fn(help='"Type sets the type of the target."', args=[d.arg(name='type', type=d.T.string)]), |
| 168 | + '#withType':: d.fn(help='"Type sets the type of the objective."', args=[d.arg(name='type', type=d.T.string)]), |
184 | 169 | withType(type): { type: type }, |
185 | 170 | }, |
186 | 171 | '#withOwner':: d.fn(help='"Owner defines the source of truth for this object (local or remote)\\nValue needs to be set when a DatadogPodAutoscaler object is created."', args=[d.arg(name='owner', type=d.T.string)]), |
|
0 commit comments