hm4: own hosting operator CRDs and RBAC

This commit is contained in:
Andrew Stoltz
2026-06-17 13:47:40 -05:00
parent 4f7a5f3d20
commit a0d79eeb8c
13 changed files with 1217 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
{
"apiVersion": "apiextensions.k8s.io/v1",
"kind": "CustomResourceDefinition",
"metadata": {
"name": "mysqlinstancecrds.flowercore.io"
},
"spec": {
"group": "flowercore.io",
"names": {
"kind": "MySqlInstanceCrd",
"listKind": "MySqlInstanceCrdList",
"plural": "mysqlinstancecrds",
"singular": "mysqlinstancecrd",
"shortNames": [
"mysql",
"mysqlinst"
]
},
"scope": "Namespaced",
"versions": [
{
"name": "v1",
"served": true,
"storage": true,
"schema": {
"openAPIV3Schema": {
"type": "object",
"properties": {
"spec": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "Action to execute (e.g., provision, backup, restore, scale, decommission, healthcheck). Dispatched by the reconciler when this value changes."
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Key-value labels for provisioning config (image-tag, mysql-version [deprecated], storage-size, replicas, port, max-connections) and billing/filtering."
}
}
},
"status": {
"type": "object",
"properties": {
"lastAction": {
"type": "string",
"description": "Name of the last action dispatched for this resource."
},
"lastActionStatus": {
"type": "string",
"description": "Outcome of the last action (Completed, Failed)."
},
"lastActionTimestamp": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp when the last action was dispatched."
},
"message": {
"type": "string",
"description": "Human-readable message, typically populated on failure."
},
"ready": {
"type": "string",
"description": "Convenience field mirroring the Ready condition status (True, False, Unknown). Used by printer columns since JSONPath cannot filter condition arrays."
},
"retryCount": {
"type": "integer",
"description": "Number of consecutive transient failure retries for the current action. Reset to zero on success or when a new action is dispatched."
},
"nextRetryAt": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp for the next retry attempt. Set on transient failure using exponential backoff (2^retryCount seconds, max 5 minutes)."
},
"conditions": {
"type": "array",
"description": "Kubernetes-style status conditions.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Condition type (e.g., Ready, Degraded)."
},
"status": {
"type": "string",
"description": "Condition status (True, False, Unknown)."
},
"lastTransitionTime": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp of last status transition."
},
"reason": {
"type": "string",
"description": "Machine-readable reason code."
},
"message": {
"type": "string",
"description": "Human-readable details about the condition."
}
}
}
}
}
}
}
}
},
"subresources": {
"status": {}
},
"additionalPrinterColumns": [
{
"name": "Ready",
"type": "string",
"jsonPath": ".status.ready",
"description": "Whether the instance is ready"
},
{
"name": "Action",
"type": "string",
"jsonPath": ".spec.action",
"description": "Current action"
},
{
"name": "Status",
"type": "string",
"jsonPath": ".status.lastActionStatus",
"description": "Last action status"
},
{
"name": "Message",
"type": "string",
"jsonPath": ".status.message",
"description": "Status message",
"priority": 1
},
{
"name": "Age",
"type": "date",
"jsonPath": ".metadata.creationTimestamp"
}
]
}
]
}
}