sigs.k8s.io/cluster-api@v1.7.1/docs/proposals/images/topology-mutation-hook/runtime-sdk-openapi.yaml (about) 1 components: 2 schemas: 3 k8s.io.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON: 4 type: object 5 k8s.io.apimachinery.pkg.runtime.RawExtension: 6 type: object 7 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesRequest: 8 description: GeneratePatchesRequest is the request of the GeneratePatches hook. 9 properties: 10 apiVersion: 11 description: 'APIVersion defines the versioned schema of this representation 12 of an object. Servers should convert recognized schemas to the latest 13 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 14 type: string 15 items: 16 description: Items is the list of templates to generate patches for. 17 items: 18 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesRequestItem' 19 default: {} 20 type: array 21 kind: 22 description: 'Kind is a string value representing the REST resource this 23 object represents. Servers may infer this from the endpoint the client 24 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 25 type: string 26 variables: 27 description: Variables are global variables for all templates. 28 items: 29 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.Variable' 30 default: {} 31 type: array 32 required: 33 - variables 34 - items 35 type: object 36 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesRequestItem: 37 description: GeneratePatchesRequestItem represents a template to generate patches 38 for. 39 properties: 40 holderReference: 41 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.HolderReference' 42 default: {} 43 description: HolderReference is a reference to the object where the template 44 is used. 45 object: 46 $ref: '#/components/schemas/k8s.io.apimachinery.pkg.runtime.RawExtension' 47 default: {} 48 description: Object contains the template as a raw object. 49 uid: 50 default: "" 51 description: UID is an identifier for this template. It allows us to correlate 52 the template in the request with the corresponding generates patches in 53 the response. 54 type: string 55 variables: 56 description: Variables are variables specific for the current template. 57 For example some builtin variables like MachineDeployment replicas and 58 version are context-sensitive and thus are only added to templates for 59 MachineDeployments and with values which correspond to the current MachineDeployment. 60 items: 61 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.Variable' 62 default: {} 63 type: array 64 required: 65 - uid 66 - holderReference 67 - object 68 - variables 69 type: object 70 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesResponse: 71 description: 'GeneratePatchesResponse is the response of the GeneratePatches 72 hook. NOTE: The patches in GeneratePatchesResponse will be applied in the 73 order in which they are defined to the templates of the request. Thus applying 74 changes consecutively when iterating through internal and external patches.' 75 properties: 76 items: 77 description: Items is the list of generated patches. 78 items: 79 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesResponseItem' 80 default: {} 81 type: array 82 message: 83 description: A human-readable description of the status of the call. 84 type: string 85 status: 86 default: "" 87 description: |- 88 Status of the call. One of: "Success" or "Failure". 89 90 Possible enum values: 91 - `"Failure"` 92 - `"Success"` 93 enum: 94 - Failure 95 - Success 96 type: string 97 required: 98 - status 99 - items 100 type: object 101 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesResponseItem: 102 description: GeneratePatchesResponseItem is a generated patch. 103 properties: 104 patch: 105 description: Patch contains the patch which should be applied to the template. 106 It must be of the corresponding PatchType. 107 format: byte 108 type: string 109 patchType: 110 default: "" 111 description: |- 112 PatchType defines the type of the patch. One of: "JSONPatch" or "JSONMergePatch". 113 114 Possible enum values: 115 - `"JSONMergePatch"` identifies a https://datatracker.ietf.org/doc/html/rfc7386 JSON merge patch. 116 - `"JSONPatch"` identifies a https://datatracker.ietf.org/doc/html/rfc6902 JSON patch. 117 enum: 118 - JSONMergePatch 119 - JSONPatch 120 type: string 121 uid: 122 default: "" 123 description: UID identifies the corresponding template in the request on 124 which the patch should be applied. 125 type: string 126 required: 127 - uid 128 - patchType 129 - patch 130 type: object 131 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.HolderReference: 132 description: HolderReference represents a reference to an object which holds 133 a template. 134 properties: 135 apiVersion: 136 default: "" 137 description: API version of the referent. 138 type: string 139 fieldPath: 140 default: "" 141 description: FieldPath is the path to the field of the object which references 142 the template. 143 type: string 144 kind: 145 default: "" 146 description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 147 type: string 148 name: 149 default: "" 150 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' 151 type: string 152 namespace: 153 default: "" 154 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' 155 type: string 156 required: 157 - apiVersion 158 - kind 159 - namespace 160 - name 161 - fieldPath 162 type: object 163 sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.Variable: 164 description: Variable represents a variable value. 165 properties: 166 name: 167 default: "" 168 description: Name of the variable. 169 type: string 170 value: 171 $ref: '#/components/schemas/k8s.io.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON' 172 default: {} 173 description: Value of the variable. 174 required: 175 - name 176 - value 177 type: object 178 info: 179 description: Open API specification for Cluster API Runtime SDK 180 license: 181 name: Apache 2.0 182 url: http://www.apache.org/licenses/LICENSE-2.0.html 183 title: Cluster API - Runtime SDK 184 version: v1.1.0-beta.2 185 openapi: 3.0.0 186 paths: 187 /hooks.runtime.cluster.x-k8s.io/v1alpha1/generatepatches/{name}: 188 post: 189 description: A GeneratePatches call generates patches for the entire Cluster 190 topology. Accordingly the request contains all templates, the global variables 191 and the template-specific variables. The response contains generated patches. 192 operationId: hooksRuntimeClusterV1alpha1GeneratePatches 193 parameters: 194 - in: path 195 name: name 196 required: true 197 schema: 198 type: string 199 requestBody: 200 content: 201 application/json: 202 schema: 203 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesRequest' 204 responses: 205 "200": 206 content: 207 application/json: 208 schema: 209 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesResponse' 210 description: OK 211 summary: GeneratePatches generates patches during topology reconciliation for 212 the entire Cluster topology. 213 tags: 214 - Topology Mutation Hook 215 /hooks.runtime.cluster.x-k8s.io/v1alpha1/validatetopology/{name}: 216 post: 217 description: A ValidateTopology call validates the Cluster topology after all 218 patches have been applied. The request contains all templates of the Cluster 219 topology, the global variables and the template-specific variables. The response 220 contains the result of the validation. 221 operationId: hooksRuntimeClusterV1alpha1ValidateTopology 222 parameters: 223 - in: path 224 name: name 225 required: true 226 schema: 227 type: string 228 requestBody: 229 content: 230 application/json: 231 schema: 232 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesRequest' 233 responses: 234 "200": 235 content: 236 application/json: 237 schema: 238 $ref: '#/components/schemas/sigs.k8s.io.cluster-api.exp.runtime.hooks.api.v1alpha1.GeneratePatchesResponse' 239 description: OK 240 summary: ValidateTopology validates the Cluster topology after all patches have 241 been applied. 242 tags: 243 - Topology Mutation Hook