Skip to content

Commit

Permalink
Add Extensions Async API and other fixes (Azure#13709)
Browse files Browse the repository at this point in the history
* Add Extensions Async API and other fixes

* Re-add missed out changes

* Fix validation errors, remove UpdateExtension.json

* Update Readme.md

* Add back files removed accidentally

* Revert accidental changes & fix readme.md

* Remove SourceControlConfig from this api version

* Fix Readme.md error for go package

* Fix Go readme issues

* Fix Go readme issues - revert accidental change

* Fix Go readme issues

* Add kubernetesconfiguration GA version to this version Tag for SDK

* Fix Operations api descriptions

* Fix spelling mistakes

* Update ApiVersionParameter reference in kubernetesconfiguration

* Fix review suggestions

* Add SourceControlConfiguration resourceType to this api-version

* Updated readme files for the added SourceControlConfiguration resource type

* Fix readme files to revert to previous + additions for new api-version

* Consolidated common definitions to avoid duplication errors

* Rename definitions folder - fix Avocado error

* Consolidated common definitions reference

* Fix definitions.json

* Fix go readme
  • Loading branch information
NarayanThiru authored Apr 15, 2021
1 parent 2db34d9 commit b78af6e
Show file tree
Hide file tree
Showing 19 changed files with 745 additions and 689 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"swagger": "2.0",
"info": {
"version": "2021-05-01-preview",
"title": "Common types and definitions",
"description": "Definitions and parameters common for all resource types of KubernetesConfiguration RP"
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {},
"definitions": {},
"parameters": {
"ClusterRpParameter": {
"name": "clusterRp",
"in": "path",
"required": true,
"type": "string",
"enum": [
"Microsoft.ContainerService",
"Microsoft.Kubernetes"
],
"description": "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).",
"x-ms-parameter-location": "method"
},
"ClusterResourceNameParameter": {
"name": "clusterResourceName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"managedClusters",
"connectedClusters"
],
"description": "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).",
"x-ms-parameter-location": "method"
},
"ClusterNameParameter": {
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the kubernetes cluster.",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"resourceGroupName": "rg1",
"clusterRp": "Microsoft.Kubernetes",
"clusterResourceName": "connectedClusters",
"extensionInstanceName": "ClusterMonitor",
"extensionName": "ClusterMonitor",
"api-version": "2021-05-01-preview",
"clusterName": "clusterName1",
"extensionInstance": {
"extension": {
"properties": {
"extensionType": "azuremonitor-containers",
"autoUpgradeMinorVersion": true,
Expand All @@ -28,13 +28,61 @@
}
},
"responses": {
"201": {
"headers": {
"Operation-Location": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/{operationId}",
"x-ms-async-operation-timeout": "PT48H"
},
"description": "Details of the Kubernetes Extension's current status.",
"body": {
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor",
"type": "Microsoft.KubernetesConfiguration/extensions",
"name": "ClusterMonitor",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-05-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-05-08T05:10:57.027Z"
},
"properties": {
"extensionType": "azuremonitor-containers",
"autoUpgradeMinorVersion": true,
"releaseTrain": "Preview",
"version": "0.1.4",
"scope": {
"cluster": {
"releaseNamespace": "kube-system"
}
},
"configurationSettings": {
"omsagent.secret.wsid": "a38cef99-5a89-52ed-b6db-22095c23664b",
"omsagent.env.clusterName": "clusterName1"
},
"provisioningState": "Creating",
"statuses": []
}
}
},
"200": {
"headers": {},
"headers": {
"Operation-Location": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/{operationId}",
"x-ms-async-operation-timeout": "PT48H"
},
"description": "Details of the Kubernetes Extension's current status.",
"body": {
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor",
"type": "Microsoft.KubernetesConfiguration/extensions",
"name": "ClusterMonitor",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-05-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-05-08T05:10:57.027Z"
},
"properties": {
"extensionType": "azuremonitor-containers",
"autoUpgradeMinorVersion": true,
Expand All @@ -49,11 +97,8 @@
"omsagent.secret.wsid": "a38cef99-5a89-52ed-b6db-22095c23664b",
"omsagent.env.clusterName": "clusterName1"
},
"installState": "Pending",
"statuses": [],
"creationTime": "2020-06-08T05:10:57.027Z",
"lastModifiedTime": "2020-06-08T05:10:57.027Z",
"lastStatusTime": "2020-06-08T05:10:57.027Z"
"provisioningState": "Creating",
"statuses": []
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"protectedSetting1Key": "protectedSetting1Value"
},
"enableHelmOperator": true,
"sshKnownHostsContents": "c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=",
"helmOperatorProperties": {
"chartVersion": "0.3.0",
"chartValues": "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"
Expand All @@ -34,6 +35,14 @@
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/SRS_GitHubConfig",
"type": "Microsoft.KubernetesConfiguration/sourceControlConfigurations",
"name": "SRS_GitHubConfig",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-09-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-09-08T05:10:57.027Z"
},
"properties": {
"repositoryUrl": "git@github.com:k8sdeveloper425/flux-get-started",
"operatorNamespace": "SRS_Namespace",
Expand All @@ -47,10 +56,11 @@
"chartValues": "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"
},
"repositoryPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAqvTzeL+BWgcHnC1CTBRMg2ZfCh9khlrvb2avFHiGG24rRvjLHlKqtfiiw+cZNCKskUyVKqamD2RHrhyn/wXvJ9fFRt0LhYLKn4hJhJaPx4IawdWnW1MUv4U+Mr8o3Cxps4EmiZemqri3fOrhzEIlPL272whKpzlDLV7L4W1XQIGmVPwQ93HTzKEd5uHuEuw6JyFftDDLlCnd3Q1kQ7HOabFEfcSSr9cMx2MU4j/Pjuf3Rd/CzeksvKtU009KSXSnWKm8LL1fihSc1H1WDTi8iuZtT63hsNYH1yxrPRpMVScs3ufLViAGO9NEHQSgDdl/OERQQqKisUn2Qm6adgmftw== rsa-key-20190909",
"sshKnownHostsContents": "c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=",
"provisioningState": "Succeeded",
"complianceStatus": {
"complianceState": "Pending",
"lastConfigApplied": "2020-06-08T05:25:32.122Z",
"lastConfigApplied": "2020-09-08T05:25:32.122Z",
"message": "Configuration successfully created",
"messageLevel": "Info"
}
Expand All @@ -64,6 +74,14 @@
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/SRS_GitHubConfig",
"type": "Microsoft.KubernetesConfiguration/sourceControlConfigurations",
"name": "SRS_GitHubConfig",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-09-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-09-08T05:10:57.027Z"
},
"properties": {
"repositoryUrl": "git@github.com:k8sdeveloper425/flux-get-started",
"operatorNamespace": "SRS_Namespace",
Expand All @@ -77,10 +95,11 @@
"chartValues": "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"
},
"repositoryPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAqvTzeL+BWgcHnC1CTBRMg2ZfCh9khlrvb2avFHiGG24rRvjLHlKqtfiiw+cZNCKskUyVKqamD2RHrhyn/wXvJ9fFRt0LhYLKn4hJhJaPx4IawdWnW1MUv4U+Mr8o3Cxps4EmiZemqri3fOrhzEIlPL272whKpzlDLV7L4W1XQIGmVPwQ93HTzKEd5uHuEuw6JyFftDDLlCnd3Q1kQ7HOabFEfcSSr9cMx2MU4j/Pjuf3Rd/CzeksvKtU009KSXSnWKm8LL1fihSc1H1WDTi8iuZtT63hsNYH1yxrPRpMVScs3ufLViAGO9NEHQSgDdl/OERQQqKisUn2Qm6adgmftw== rsa-key-20190909",
"sshKnownHostsContents": "c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=",
"provisioningState": "Succeeded",
"complianceStatus": {
"complianceState": "Pending",
"lastConfigApplied": "2020-06-08T05:25:32.122Z",
"lastConfigApplied": "2020-09-08T05:25:32.122Z",
"message": "Configuration successfully created",
"messageLevel": "Info"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"resourceGroupName": "rg1",
"clusterRp": "Microsoft.Kubernetes",
"clusterResourceName": "connectedClusters",
"extensionInstanceName": "ClusterMonitor",
"extensionName": "ClusterMonitor",
"api-version": "2021-05-01-preview",
"clusterName": "clusterName1"
},
"responses": {
"202": {
"headers": {
"Operation-Location": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/{operationId}",
"x-ms-async-operation-timeout": "PT1H"
},
"description": "Details of the Kubernetes Extension's current status."
},
"200": {},
"204": {}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "subId1",
"resourceGroupName": "rg1",
"clusterRp": "Microsoft.Kubernetes",
"clusterResourceName": "connectedClusters",
"extensionName": "ClusterMonitor",
"api-version": "2021-05-01-preview",
"clusterName": "clusterName1",
"operationId": "99999999-9999-9999-9999-999999999999"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/99999999-9999-9999-9999-999999999999",
"name": "99999999-9999-9999-9999-999999999999",
"status": "Succeeded",
"properties": {},
"error": null
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "rg1",
"clusterRp": "Microsoft.Kubernetes",
"clusterResourceName": "connectedClusters",
"extensionInstanceName": "ClusterMonitor",
"extensionName": "ClusterMonitor",
"api-version": "2021-05-01-preview",
"clusterName": "clusterName1"
},
Expand All @@ -16,6 +16,14 @@
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor",
"type": "Microsoft.KubernetesConfiguration/extensions",
"name": "ClusterMonitor",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-05-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-05-08T05:10:57.027Z"
},
"properties": {
"extensionType": "azuremonitor-containers",
"autoUpgradeMinorVersion": true,
Expand All @@ -30,11 +38,8 @@
"omsagent.secret.wsid": "a38cef99-5a89-52ed-b6db-22095c23664b",
"omsagent.env.clusterName": "clusterName1"
},
"installState": "Pending",
"statuses": [],
"creationTime": "2020-06-08T05:10:57.027Z",
"lastModifiedTime": "2020-06-08T05:10:57.027Z",
"lastStatusTime": "2020-06-08T05:10:57.027Z"
"provisioningState": "Creating",
"statuses": []
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/SRS_GitHubConfig",
"type": "Microsoft.KubernetesConfiguration/sourceControlConfigurations",
"name": "SRS_GitHubConfig",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-09-08T05:10:57.027Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-09-08T05:10:57.027Z"
},
"properties": {
"repositoryUrl": "git@github.com:k8sdeveloper425/flux-get-started",
"operatorNamespace": "SRS_Namespace",
Expand All @@ -28,10 +36,11 @@
"chartValues": "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"
},
"repositoryPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAqvTzeL+BWgcHnC1CTBRMg2ZfCh9khlrvb2avFHiGG24rRvjLHlKqtfiiw+cZNCKskUyVKqamD2RHrhyn/wXvJ9fFRt0LhYLKn4hJhJaPx4IawdWnW1MUv4U+Mr8o3Cxps4EmiZemqri3fOrhzEIlPL272whKpzlDLV7L4W1XQIGmVPwQ93HTzKEd5uHuEuw6JyFftDDLlCnd3Q1kQ7HOabFEfcSSr9cMx2MU4j/Pjuf3Rd/CzeksvKtU009KSXSnWKm8LL1fihSc1H1WDTi8iuZtT63hsNYH1yxrPRpMVScs3ufLViAGO9NEHQSgDdl/OERQQqKisUn2Qm6adgmftw== rsa-key-20190909",
"sshKnownHostsContents": "c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=",
"provisioningState": "Succeeded",
"complianceStatus": {
"complianceState": "Pending",
"lastConfigApplied": "2020-06-08T05:25:32.122Z",
"lastConfigApplied": "2020-09-08T05:25:32.122Z",
"message": "Configuration successfully created",
"messageLevel": "Info"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"subscriptionId": "subId1",
"resourceGroupName": "rg1",
"clusterRp": "Microsoft.Kubernetes",
"clusterResourceName": "connectedClusters",
"extensionName": "ClusterMonitor",
"api-version": "2021-05-01-preview",
"clusterName": "clusterName1"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/99999999-9999-9999-9999-999999999999",
"name": "99999999-9999-9999-9999-999999999999",
"status": "Deleting",
"properties": {},
"error": null
},
{
"id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/88888888-8888-8888-8888-888888888888",
"name": "88888888-8888-8888-8888-888888888888",
"status": "Creating",
"properties": {},
"error": null
}
],
"nextLink": null
}
}
}
}
Loading

0 comments on commit b78af6e

Please sign in to comment.