Skip to content

Commit 1ddddd8

Browse files
jonathan-innisFredericHeem
authored andcommitted
[Microsoft.KubernetesConfiguration] Add 200 OK to PATCH apis (Azure#18977)
* Add response codes to patch apis * Examples for patch of extension and configuration
1 parent 732d6d2 commit 1ddddd8

File tree

4 files changed

+148
-1
lines changed

4 files changed

+148
-1
lines changed

specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchExtension.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@
2222
}
2323
},
2424
"responses": {
25+
"200": {
26+
"description": "Extension properties from not updating any property values.",
27+
"body": {
28+
"properties": {
29+
"extensionType": "azuremonitor-containers",
30+
"autoUpgradeMinorVersion": true,
31+
"releaseTrain": "Preview",
32+
"version": "0.1.4",
33+
"scope": {
34+
"cluster": {
35+
"releaseNamespace": "kube-system"
36+
}
37+
},
38+
"configurationSettings": {
39+
"omsagent.secret.wsid": "a38cef99-5a89-52ed-b6db-22095c23664b",
40+
"omsagent.env.clusterName": "clusterName1"
41+
},
42+
"provisioningState": "Succeeded",
43+
"statuses": []
44+
}
45+
}
46+
},
2547
"202": {
2648
"headers": {
2749
"Operation-Location": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/operationId",

specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchFluxConfiguration.json

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,126 @@
2929
}
3030
},
3131
"responses": {
32+
"200": {
33+
"description": "FluxConfiguration properties from not updating any property values.",
34+
"body": {
35+
"properties": {
36+
"scope": "cluster",
37+
"namespace": "srs-namespace",
38+
"sourceKind": "GitRepository",
39+
"suspend": false,
40+
"gitRepository": {
41+
"url": "https://github.com/jonathan-innis/flux2-kustomize-helm-example.git",
42+
"timeoutInSeconds": 600,
43+
"syncIntervalInSeconds": 600,
44+
"repositoryRef": {
45+
"branch": "master",
46+
"tag": null,
47+
"semver": null,
48+
"commit": null
49+
}
50+
},
51+
"kustomizations": {
52+
"srs-kustomization2": {
53+
"path": "./test/alt-path",
54+
"timeoutInSeconds": 600,
55+
"syncIntervalInSeconds": 300,
56+
"retryIntervalInSeconds": 600,
57+
"prune": false
58+
},
59+
"srs-kustomization3": {
60+
"path": "./test/another-path",
61+
"timeoutInSeconds": 600,
62+
"syncIntervalInSeconds": 300,
63+
"retryIntervalInSeconds": null,
64+
"prune": false
65+
}
66+
},
67+
"statuses": [
68+
{
69+
"name": "srs-fluxconfig",
70+
"kind": "GitRepository",
71+
"complianceState": "Compliant",
72+
"appliedBy": null,
73+
"helmReleaseProperties": null,
74+
"statusConditions": [
75+
{
76+
"lastTransitionTime": "2021-05-19T18:12:40Z",
77+
"message": "'Fetched revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'",
78+
"reason": "GitOperationSucceed",
79+
"status": "True",
80+
"type": "Ready"
81+
}
82+
]
83+
},
84+
{
85+
"name": "srs-fluxconfig-srs-kustomization1",
86+
"kind": "Kustomization",
87+
"complianceState": "Compliant",
88+
"appliedBy": null,
89+
"helmReleaseProperties": {
90+
"lastRevisionApplied": 1,
91+
"helmChartRef": {
92+
"name": "myname",
93+
"namespace": "mynamespace"
94+
},
95+
"failureCount": null,
96+
"upgradeFailureCount": null,
97+
"installFailureCount": null
98+
},
99+
"statusConditions": [
100+
{
101+
"lastTransitionTime": "2021-05-19T18:12:40Z",
102+
"message": "'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'",
103+
"reason": "ReconciliationSucceeded",
104+
"status": "True",
105+
"type": "Ready"
106+
}
107+
]
108+
},
109+
{
110+
"name": "srs-fluxconfig-srs-kustomization2",
111+
"kind": "Kustomization",
112+
"complianceState": "Compliant",
113+
"appliedBy": null,
114+
"helmReleaseProperties": {
115+
"lastRevisionApplied": 1,
116+
"helmChartRef": {
117+
"name": "myname",
118+
"namespace": "mynamespace"
119+
},
120+
"failureCount": null,
121+
"upgradeFailureCount": null,
122+
"installFailureCount": null
123+
},
124+
"statusConditions": [
125+
{
126+
"lastTransitionTime": "2021-05-19T18:12:40Z",
127+
"message": "'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'",
128+
"reason": "ReconciliationSucceeded",
129+
"status": "True",
130+
"type": "Ready"
131+
}
132+
]
133+
}
134+
],
135+
"repositoryPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF",
136+
"sourceSyncedCommitId": "master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590",
137+
"sourceUpdatedAt": "2021-05-19T18:17:12Z",
138+
"statusUpdatedAt": "2021-05-19T18:17:12Z",
139+
"complianceState": "Compliant",
140+
"provisioningState": "Succeeded",
141+
"errorMessage": ""
142+
}
143+
}
144+
},
32145
"202": {
33146
"headers": {
34147
"Operation-Location": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig/operations/operationId",
35148
"x-ms-async-operation-timeout": "PT48H",
36149
"Azure-AsyncOperation": "http://management.azure.com/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Kubernetes/ConnectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig/operations/operationId?api-version=2022-03-01"
37150
},
38-
"description": "Extension properties and details of the Patch operation, including AsyncOperation url.",
151+
"description": "FluxConfiguration properties and details of the Patch operation, including AsyncOperation url.",
39152
"body": {
40153
"properties": {
41154
"scope": "cluster",

specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@
268268
"$ref": "#/definitions/Extension"
269269
}
270270
},
271+
"200": {
272+
"description": "No update is done to extension so return OK.",
273+
"schema": {
274+
"$ref": "#/definitions/Extension"
275+
}
276+
},
271277
"default": {
272278
"description": "Error response describing why the operation failed.",
273279
"schema": {

specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/fluxconfiguration.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@
208208
"$ref": "#/definitions/FluxConfiguration"
209209
}
210210
},
211+
"200": {
212+
"description": "No update is done to fluxConfiguration so return OK.",
213+
"schema": {
214+
"$ref": "#/definitions/FluxConfiguration"
215+
}
216+
},
211217
"default": {
212218
"description": "Error response describing why the operation failed.",
213219
"schema": {

0 commit comments

Comments
 (0)