|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + controller-gen.kubebuilder.io/version: v0.18.0 |
| 6 | + creationTimestamp: null |
| 7 | + name: podremediators.remediation.openstack.org |
| 8 | +spec: |
| 9 | + group: remediation.openstack.org |
| 10 | + names: |
| 11 | + kind: PodRemediator |
| 12 | + listKind: PodRemediatorList |
| 13 | + plural: podremediators |
| 14 | + singular: podremediator |
| 15 | + scope: Namespaced |
| 16 | + versions: |
| 17 | + - additionalPrinterColumns: |
| 18 | + - description: Status |
| 19 | + jsonPath: .status.conditions[?(@.type=='Ready')].status |
| 20 | + name: Status |
| 21 | + type: string |
| 22 | + - description: Message |
| 23 | + jsonPath: .status.conditions[?(@.type=='Ready')].message |
| 24 | + name: Message |
| 25 | + type: string |
| 26 | + name: v1beta1 |
| 27 | + schema: |
| 28 | + openAPIV3Schema: |
| 29 | + description: |- |
| 30 | + PodRemediator is the Schema for the podremediators API. |
| 31 | + When present, the controller watches worker nodes and PVCs in spec.namespaces |
| 32 | + (or only the CR's namespace when the field is empty). When NHC/SNR mark a node |
| 33 | + for remediation, it deletes eligible PVCs so workloads can respawn. |
| 34 | + NHC and SNR must be installed and configured; otherwise the controller sets ReadyCondition False. |
| 35 | + properties: |
| 36 | + apiVersion: |
| 37 | + description: |- |
| 38 | + APIVersion defines the versioned schema of this representation of an object. |
| 39 | + Servers should convert recognized schemas to the latest internal value, and |
| 40 | + may reject unrecognized values. |
| 41 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 42 | + type: string |
| 43 | + kind: |
| 44 | + description: |- |
| 45 | + Kind is a string value representing the REST resource this object represents. |
| 46 | + Servers may infer this from the endpoint the client submits requests to. |
| 47 | + Cannot be updated. |
| 48 | + In CamelCase. |
| 49 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 50 | + type: string |
| 51 | + metadata: |
| 52 | + type: object |
| 53 | + spec: |
| 54 | + description: PodRemediatorSpec defines the desired state of PodRemediator |
| 55 | + properties: |
| 56 | + consentPollInterval: |
| 57 | + description: |- |
| 58 | + ConsentPollInterval controls how often the controller re-checks PVCs waiting |
| 59 | + for SNR fencing confirmation or app-operator safe-to-delete consent. |
| 60 | + Lower values reduce recovery latency; higher values reduce |
| 61 | + API load. Overrides the PODREMEDIATOR_CONSENT_POLL_INTERVAL env var. |
| 62 | + Format: Go duration string, e.g. "2m", "90s". Default: "2m". |
| 63 | + type: string |
| 64 | + x-kubernetes-validations: |
| 65 | + - message: must be a valid duration of at least 1s |
| 66 | + rule: duration(self) >= duration('1s') |
| 67 | + disabled: |
| 68 | + default: false |
| 69 | + description: |- |
| 70 | + Disabled stops annotation and deletion and clears pending remediation consent. |
| 71 | + Default false: applying the CR enables PVC remediation when NHC/SNR are present; set disabled to true to turn it off. |
| 72 | + type: boolean |
| 73 | + namespaces: |
| 74 | + description: |- |
| 75 | + Namespaces lists the namespaces where this PodRemediator scans eligible |
| 76 | + PVCs and may remediate those PVCs and their associated Pods. If empty, it |
| 77 | + uses the namespace containing this CR. Node health and SNR fencing events |
| 78 | + remain cluster-wide; this setting only scopes PVC processing. |
| 79 | + The effective namespace scope is immutable after CR creation. Delete and |
| 80 | + recreate the CR to change its scope; deletion cleanup clears pending |
| 81 | + handshakes in the configured namespaces. |
| 82 | + items: |
| 83 | + minLength: 1 |
| 84 | + type: string |
| 85 | + type: array |
| 86 | + x-kubernetes-list-type: set |
| 87 | + periodicPollInterval: |
| 88 | + description: |- |
| 89 | + PeriodicPollInterval is the safety-net requeue interval when the controller |
| 90 | + is idle (no unhealthy nodes, disabled, or NHC/SNR missing). Guarantees the |
| 91 | + controller re-evaluates node health after a pod restart when nodes are already |
| 92 | + NotReady and no node-transition event fires. Overrides the |
| 93 | + PODREMEDIATOR_PERIODIC_POLL_INTERVAL env var. |
| 94 | + Format: Go duration string, e.g. "5m", "2m". Default: "5m". |
| 95 | + type: string |
| 96 | + x-kubernetes-validations: |
| 97 | + - message: must be a valid duration of at least 1s |
| 98 | + rule: duration(self) >= duration('1s') |
| 99 | + remediationPaused: |
| 100 | + default: false |
| 101 | + description: |- |
| 102 | + RemediationPaused keeps detecting and tagging stuck PVCs but prevents new PVC and Pod deletion transactions. |
| 103 | + Pending requests and consent are retained and revalidated when remediation resumes. |
| 104 | + Deletions already in progress or past the durable commit boundary continue to completion. |
| 105 | + type: boolean |
| 106 | + type: object |
| 107 | + status: |
| 108 | + description: PodRemediatorStatus defines the observed state of PodRemediator |
| 109 | + properties: |
| 110 | + conditions: |
| 111 | + description: Conditions |
| 112 | + items: |
| 113 | + description: Condition defines an observation of a API resource |
| 114 | + operational state. |
| 115 | + properties: |
| 116 | + lastTransitionTime: |
| 117 | + description: |- |
| 118 | + Last time the condition transitioned from one status to another. |
| 119 | + This should be when the underlying condition changed. If that is not known, then using the time when |
| 120 | + the API field changed is acceptable. |
| 121 | + format: date-time |
| 122 | + type: string |
| 123 | + message: |
| 124 | + description: A human readable message indicating details about |
| 125 | + the transition. |
| 126 | + type: string |
| 127 | + reason: |
| 128 | + description: The reason for the condition's last transition |
| 129 | + in CamelCase. |
| 130 | + type: string |
| 131 | + severity: |
| 132 | + description: |- |
| 133 | + Severity provides a classification of Reason code, so the current situation is immediately |
| 134 | + understandable and could act accordingly. |
| 135 | + It is meant for situations where Status=False and it should be indicated if it is just |
| 136 | + informational, warning (next reconciliation might fix it) or an error (e.g. DB create issue |
| 137 | + and no actions to automatically resolve the issue can/should be done). |
| 138 | + For conditions where Status=Unknown or Status=True the Severity should be SeverityNone. |
| 139 | + type: string |
| 140 | + status: |
| 141 | + description: Status of the condition, one of True, False, Unknown. |
| 142 | + type: string |
| 143 | + type: |
| 144 | + description: Type of condition in CamelCase. |
| 145 | + type: string |
| 146 | + required: |
| 147 | + - lastTransitionTime |
| 148 | + - status |
| 149 | + - type |
| 150 | + type: object |
| 151 | + type: array |
| 152 | + observedGeneration: |
| 153 | + description: ObservedGeneration is the most recent generation successfully |
| 154 | + reconciled by the controller. |
| 155 | + format: int64 |
| 156 | + type: integer |
| 157 | + type: object |
| 158 | + type: object |
| 159 | + x-kubernetes-validations: |
| 160 | + - message: namespace scope cannot be changed after creation; delete and recreate |
| 161 | + the PodRemediator |
| 162 | + rule: (has(self.spec) && has(self.spec.namespaces) && size(self.spec.namespaces) |
| 163 | + > 0) == (has(oldSelf.spec) && has(oldSelf.spec.namespaces) && size(oldSelf.spec.namespaces) |
| 164 | + > 0) && (!(has(self.spec) && has(self.spec.namespaces) && size(self.spec.namespaces) |
| 165 | + > 0) || self.spec.namespaces == oldSelf.spec.namespaces) |
| 166 | + served: true |
| 167 | + storage: true |
| 168 | + subresources: |
| 169 | + status: {} |
| 170 | +status: |
| 171 | + acceptedNames: |
| 172 | + kind: "" |
| 173 | + plural: "" |
| 174 | + conditions: null |
| 175 | + storedVersions: null |
0 commit comments