|
| 1 | +--- |
| 2 | +apiVersion: apiextensions.k8s.io/v1 |
| 3 | +kind: CustomResourceDefinition |
| 4 | +metadata: |
| 5 | + annotations: |
| 6 | + controller-gen.kubebuilder.io/version: v0.18.0 |
| 7 | + helm.sh/resource-policy: keep |
| 8 | + name: etcddefrags.etcd-operator.cozystack.io |
| 9 | +spec: |
| 10 | + group: etcd-operator.cozystack.io |
| 11 | + names: |
| 12 | + kind: EtcdDefrag |
| 13 | + listKind: EtcdDefragList |
| 14 | + plural: etcddefrags |
| 15 | + singular: etcddefrag |
| 16 | + scope: Namespaced |
| 17 | + versions: |
| 18 | + - additionalPrinterColumns: |
| 19 | + - jsonPath: .spec.clusterRef.name |
| 20 | + name: Cluster |
| 21 | + type: string |
| 22 | + - jsonPath: .status.phase |
| 23 | + name: Phase |
| 24 | + type: string |
| 25 | + - jsonPath: .status.defragmented |
| 26 | + name: Defragmented |
| 27 | + type: integer |
| 28 | + - jsonPath: .metadata.creationTimestamp |
| 29 | + name: Age |
| 30 | + type: date |
| 31 | + name: v1alpha2 |
| 32 | + schema: |
| 33 | + openAPIV3Schema: |
| 34 | + description: |- |
| 35 | + EtcdDefrag is the Schema for the etcddefrags API. It requests a one-shot, |
| 36 | + run-to-completion defragmentation of an EtcdCluster's members. Like |
| 37 | + EtcdSnapshot it is a record: the operator drives it through status.phase and |
| 38 | + it never re-runs. |
| 39 | + properties: |
| 40 | + apiVersion: |
| 41 | + description: |- |
| 42 | + APIVersion defines the versioned schema of this representation of an object. |
| 43 | + Servers should convert recognized schemas to the latest internal value, and |
| 44 | + may reject unrecognized values. |
| 45 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 46 | + type: string |
| 47 | + kind: |
| 48 | + description: |- |
| 49 | + Kind is a string value representing the REST resource this object represents. |
| 50 | + Servers may infer this from the endpoint the client submits requests to. |
| 51 | + Cannot be updated. |
| 52 | + In CamelCase. |
| 53 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 54 | + type: string |
| 55 | + metadata: |
| 56 | + type: object |
| 57 | + spec: |
| 58 | + description: |- |
| 59 | + EtcdDefragSpec is the desired state of an EtcdDefrag: a one-shot request to |
| 60 | + defragment an EtcdCluster's members. |
| 61 | + properties: |
| 62 | + clusterRef: |
| 63 | + description: ClusterRef names the EtcdCluster (same namespace) to |
| 64 | + defragment. |
| 65 | + properties: |
| 66 | + name: |
| 67 | + default: "" |
| 68 | + description: |- |
| 69 | + Name of the referent. |
| 70 | + This field is effectively required, but due to backwards compatibility is |
| 71 | + allowed to be empty. Instances of this type with an empty value here are |
| 72 | + almost certainly wrong. |
| 73 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 74 | + type: string |
| 75 | + type: object |
| 76 | + x-kubernetes-map-type: atomic |
| 77 | + rule: |
| 78 | + description: |- |
| 79 | + Rule decides which members this run touches. Absent is equivalent to an |
| 80 | + empty rule: the default gate (freeSpaceAbove 200Mi). To defragment every |
| 81 | + member unconditionally, set rule.all: true. |
| 82 | + properties: |
| 83 | + all: |
| 84 | + description: |- |
| 85 | + All defragments every member unconditionally, regardless of size — the |
| 86 | + explicit "do it now". Mutually exclusive with the threshold fields below. |
| 87 | + type: boolean |
| 88 | + freeSpaceAbove: |
| 89 | + anyOf: |
| 90 | + - type: integer |
| 91 | + - type: string |
| 92 | + description: |- |
| 93 | + FreeSpaceAbove defragments a member whose reclaimable space |
| 94 | + (DbSize-DbSizeInUse) exceeds this. The primary, always-applied gate. |
| 95 | + Absent means the built-in default (200Mi). |
| 96 | + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ |
| 97 | + x-kubernetes-int-or-string: true |
| 98 | + minReclaim: |
| 99 | + anyOf: |
| 100 | + - type: integer |
| 101 | + - type: string |
| 102 | + description: |- |
| 103 | + MinReclaim floors the quota arm: even under quota pressure, skip a member |
| 104 | + that would reclaim less than this. Only meaningful with QuotaUsageAbove, |
| 105 | + and must not exceed FreeSpaceAbove. Absent means the built-in default |
| 106 | + (32Mi). |
| 107 | + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ |
| 108 | + x-kubernetes-int-or-string: true |
| 109 | + quotaUsageAbove: |
| 110 | + description: |- |
| 111 | + QuotaUsageAbove: when DbSize exceeds this fraction of the backend quota |
| 112 | + (approaching NOSPACE), lower the reclaimable floor to MinReclaim so small |
| 113 | + wins are taken under pressure. A member is never defragmented when its |
| 114 | + reclaimable space is below MinReclaim. Integer percent 1..99 with a "%" |
| 115 | + suffix, e.g. "80%"; 100% is rejected because a backend never exceeds its |
| 116 | + quota (etcd raises NOSPACE first), so the arm could never fire. |
| 117 | + pattern: ^[1-9][0-9]?%$ |
| 118 | + type: string |
| 119 | + type: object |
| 120 | + x-kubernetes-validations: |
| 121 | + - message: rule.all cannot be combined with freeSpaceAbove/quotaUsageAbove/minReclaim |
| 122 | + rule: '!(has(self.all) && self.all) || (!has(self.freeSpaceAbove) |
| 123 | + && !has(self.quotaUsageAbove) && !has(self.minReclaim))' |
| 124 | + - message: freeSpaceAbove must be greater than 0 |
| 125 | + rule: '!has(self.freeSpaceAbove) || quantity(string(self.freeSpaceAbove)).isGreaterThan(quantity(''0''))' |
| 126 | + - message: minReclaim must be greater than 0 |
| 127 | + rule: '!has(self.minReclaim) || quantity(string(self.minReclaim)).isGreaterThan(quantity(''0''))' |
| 128 | + - message: minReclaim is only meaningful with quotaUsageAbove |
| 129 | + rule: '!has(self.minReclaim) || has(self.quotaUsageAbove)' |
| 130 | + - message: minReclaim must not exceed freeSpaceAbove |
| 131 | + rule: '!(has(self.minReclaim) && has(self.freeSpaceAbove)) || quantity(string(self.minReclaim)).compareTo(quantity(string(self.freeSpaceAbove))) |
| 132 | + <= 0' |
| 133 | + ttlSecondsAfterFinished: |
| 134 | + description: |- |
| 135 | + TTLSecondsAfterFinished records how long after a terminal phase this |
| 136 | + object should be garbage-collected — meaningful for objects a scheduler |
| 137 | + stamps out. Acted on by the reconciling controller; the API server does not |
| 138 | + garbage-collect custom resources on its own. Absent means the record is kept. |
| 139 | + format: int32 |
| 140 | + minimum: 0 |
| 141 | + type: integer |
| 142 | + required: |
| 143 | + - clusterRef |
| 144 | + type: object |
| 145 | + x-kubernetes-validations: |
| 146 | + - message: spec.clusterRef.name is required |
| 147 | + rule: size(self.clusterRef.name) != 0 |
| 148 | + status: |
| 149 | + description: EtcdDefragStatus is the observed state of an EtcdDefrag. |
| 150 | + properties: |
| 151 | + completedAt: |
| 152 | + description: CompletedAt is when the sweep reached a terminal phase. |
| 153 | + format: date-time |
| 154 | + type: string |
| 155 | + conditions: |
| 156 | + description: |- |
| 157 | + Conditions represent the latest available observations — including why a |
| 158 | + Pending run is being deferred (e.g. the cluster is not fully healthy). |
| 159 | + items: |
| 160 | + description: Condition contains details for one aspect of the current |
| 161 | + state of this API Resource. |
| 162 | + properties: |
| 163 | + lastTransitionTime: |
| 164 | + description: |- |
| 165 | + lastTransitionTime is the last time the condition transitioned from one status to another. |
| 166 | + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
| 167 | + format: date-time |
| 168 | + type: string |
| 169 | + message: |
| 170 | + description: |- |
| 171 | + message is a human readable message indicating details about the transition. |
| 172 | + This may be an empty string. |
| 173 | + maxLength: 32768 |
| 174 | + type: string |
| 175 | + observedGeneration: |
| 176 | + description: |- |
| 177 | + observedGeneration represents the .metadata.generation that the condition was set based upon. |
| 178 | + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date |
| 179 | + with respect to the current state of the instance. |
| 180 | + format: int64 |
| 181 | + minimum: 0 |
| 182 | + type: integer |
| 183 | + reason: |
| 184 | + description: |- |
| 185 | + reason contains a programmatic identifier indicating the reason for the condition's last transition. |
| 186 | + Producers of specific condition types may define expected values and meanings for this field, |
| 187 | + and whether the values are considered a guaranteed API. |
| 188 | + The value should be a CamelCase string. |
| 189 | + This field may not be empty. |
| 190 | + maxLength: 1024 |
| 191 | + minLength: 1 |
| 192 | + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ |
| 193 | + type: string |
| 194 | + status: |
| 195 | + description: status of the condition, one of True, False, Unknown. |
| 196 | + enum: |
| 197 | + - "True" |
| 198 | + - "False" |
| 199 | + - Unknown |
| 200 | + type: string |
| 201 | + type: |
| 202 | + description: type of condition in CamelCase or in foo.example.com/CamelCase. |
| 203 | + maxLength: 316 |
| 204 | + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ |
| 205 | + type: string |
| 206 | + required: |
| 207 | + - lastTransitionTime |
| 208 | + - message |
| 209 | + - reason |
| 210 | + - status |
| 211 | + - type |
| 212 | + type: object |
| 213 | + type: array |
| 214 | + defragmented: |
| 215 | + description: Defragmented counts members actually defragmented this |
| 216 | + run. |
| 217 | + format: int32 |
| 218 | + type: integer |
| 219 | + members: |
| 220 | + description: Members holds the per-member outcome of the sweep, keyed |
| 221 | + by member name. |
| 222 | + items: |
| 223 | + description: MemberDefragStatus is the outcome of defragmenting |
| 224 | + a single member. |
| 225 | + properties: |
| 226 | + dbSizeAfter: |
| 227 | + description: DBSizeAfter is the physical backend size after |
| 228 | + defragmenting. |
| 229 | + format: int64 |
| 230 | + type: integer |
| 231 | + dbSizeBefore: |
| 232 | + description: DBSizeBefore is the member's physical backend size |
| 233 | + before defragmenting. |
| 234 | + format: int64 |
| 235 | + type: integer |
| 236 | + finishedAt: |
| 237 | + description: FinishedAt is when this member was processed. |
| 238 | + format: date-time |
| 239 | + type: string |
| 240 | + name: |
| 241 | + description: Name is the EtcdMember this row describes. |
| 242 | + type: string |
| 243 | + outcome: |
| 244 | + description: Outcome is the result of processing this member. |
| 245 | + type: string |
| 246 | + reason: |
| 247 | + description: |- |
| 248 | + Reason qualifies the outcome (e.g. BelowThreshold, ClusterNotHealthy, |
| 249 | + RPCError), in condition-reason style. |
| 250 | + type: string |
| 251 | + reclaimedBytes: |
| 252 | + description: ReclaimedBytes is DBSizeBefore-DBSizeAfter for |
| 253 | + a completed defrag. |
| 254 | + format: int64 |
| 255 | + type: integer |
| 256 | + role: |
| 257 | + description: Role is the member's raft role at the time it was |
| 258 | + processed. |
| 259 | + type: string |
| 260 | + required: |
| 261 | + - name |
| 262 | + type: object |
| 263 | + type: array |
| 264 | + x-kubernetes-list-map-keys: |
| 265 | + - name |
| 266 | + x-kubernetes-list-type: map |
| 267 | + phase: |
| 268 | + description: Phase is the high-level lifecycle phase. |
| 269 | + type: string |
| 270 | + startedAt: |
| 271 | + description: StartedAt is when the sweep began. |
| 272 | + format: date-time |
| 273 | + type: string |
| 274 | + type: object |
| 275 | + type: object |
| 276 | + served: true |
| 277 | + storage: true |
| 278 | + subresources: |
| 279 | + status: {} |
0 commit comments