diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6abc5f214696..4ad93c2f65aa 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -8383,6 +8383,12 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} @@ -12331,7 +12337,7 @@ packages: dev: false file:projects/arm-kubernetesconfiguration.tgz: - resolution: {integrity: sha512-dz4iJqMjsf1DZuz3dO/uRMjsmYU8HuhnhBXm5CTyUQATCLH7HrwIHUeiUH1sONVQ8axfdwXd4/DuddX72XahjA==, tarball: file:projects/arm-kubernetesconfiguration.tgz} + resolution: {integrity: sha512-gztxFB5lkzElOm8+78cziVLY6F/CXeyRgqcBkl72/8beybFl1RwqsdWxLmZEu/jrBwoyJ5xmoGdWJUjE/JYb1Q==, tarball: file:projects/arm-kubernetesconfiguration.tgz} name: '@rush-temp/arm-kubernetesconfiguration' version: 0.0.0 dependencies: @@ -12352,7 +12358,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_ehqevut6loiv2j3zjuhqc62mru tslib: 2.5.2 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/CHANGELOG.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/CHANGELOG.md index 9e908b253888..4f8b8946da94 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/CHANGELOG.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/CHANGELOG.md @@ -1,15 +1,19 @@ # Release History + +## 6.1.0 (2023-05-30) + +**Features** -## 6.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface PostBuildDefinition + - Added Interface SubstituteFromDefinition + - Interface FluxConfiguration has a new optional parameter reconciliationWaitDuration + - Interface FluxConfiguration has a new optional parameter waitForReconciliation + - Interface KustomizationDefinition has a new optional parameter postBuild + - Interface KustomizationDefinition has a new optional parameter wait + - Interface KustomizationPatchDefinition has a new optional parameter postBuild + - Interface KustomizationPatchDefinition has a new optional parameter wait + + ## 6.0.0 (2023-05-11) **Features** diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json index 87c8024f33b8..40a0d2030872 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json @@ -1,8 +1,8 @@ { - "commit": "fb9c8e2ca33e9723c2b2fc849f627329067feb54", + "commit": "d8243c38202bfa0f73a75089b4c8aba3047b1f3f", "readme": "specification/kubernetesconfiguration/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\kubernetesconfiguration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/kubernetesconfiguration/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json index 12dc39e63033..b25b4fe018d2 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SourceControlConfigurationClient.", - "version": "6.0.1", + "version": "6.1.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration" +} \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/review/arm-kubernetesconfiguration.api.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/review/arm-kubernetesconfiguration.api.md index 2b2392a8dfb0..08b72fef7c47 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/review/arm-kubernetesconfiguration.api.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/review/arm-kubernetesconfiguration.api.md @@ -233,6 +233,7 @@ export interface FluxConfiguration extends ProxyResource { }; namespace?: string; readonly provisioningState?: ProvisioningState; + reconciliationWaitDuration?: string; readonly repositoryPublicKey?: string; scope?: ScopeType; sourceKind?: SourceKindType; @@ -242,6 +243,7 @@ export interface FluxConfiguration extends ProxyResource { readonly statusUpdatedAt?: Date; suspend?: boolean; readonly systemData?: SystemData; + waitForReconciliation?: boolean; } // @public @@ -468,10 +470,12 @@ export interface KustomizationDefinition { force?: boolean; readonly name?: string; path?: string; + postBuild?: PostBuildDefinition; prune?: boolean; retryIntervalInSeconds?: number; syncIntervalInSeconds?: number; timeoutInSeconds?: number; + wait?: boolean; } // @public @@ -479,10 +483,12 @@ export interface KustomizationPatchDefinition { dependsOn?: string[]; force?: boolean; path?: string; + postBuild?: PostBuildDefinition; prune?: boolean; retryIntervalInSeconds?: number; syncIntervalInSeconds?: number; timeoutInSeconds?: number; + wait?: boolean; } // @public @@ -621,6 +627,14 @@ export interface Plan { version?: string; } +// @public +export interface PostBuildDefinition { + substitute?: { + [propertyName: string]: string; + }; + substituteFrom?: (SubstituteFromDefinition | null)[]; +} + // @public export type ProvisioningState = string; @@ -809,6 +823,13 @@ export type SourceControlConfigurationsListResponse = SourceControlConfiguration // @public export type SourceKindType = string; +// @public +export interface SubstituteFromDefinition { + kind?: string; + name?: string; + optional?: boolean; +} + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts index 0e5802dc3dcb..16d9da7c33fd 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts @@ -332,6 +332,28 @@ export interface KustomizationDefinition { prune?: boolean; /** Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. */ force?: boolean; + /** Enable/disable health check for all Kubernetes objects created by this Kustomization. */ + wait?: boolean; + /** Used for variable substitution for this Kustomization after kustomize build. */ + postBuild?: PostBuildDefinition; +} + +/** The postBuild definitions defining variable substitutions for this Kustomization after kustomize build. */ +export interface PostBuildDefinition { + /** Key/value pairs holding the variables to be substituted in this Kustomization. */ + substitute?: { [propertyName: string]: string }; + /** Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization. */ + substituteFrom?: (SubstituteFromDefinition | null)[]; +} + +/** Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization. */ +export interface SubstituteFromDefinition { + /** Define whether it is ConfigMap or Secret that holds the variables to be used in substitution. */ + kind?: string; + /** Name of the ConfigMap/Secret that holds the variables to be used in substitution. */ + name?: string; + /** Set to True to proceed without ConfigMap/Secret, if it is not present. */ + optional?: boolean; } /** Statuses of objects deployed by the user-specified kustomizations from the git repository. */ @@ -506,6 +528,10 @@ export interface KustomizationPatchDefinition { prune?: boolean; /** Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. */ force?: boolean; + /** Enable/disable health check for all Kubernetes objects created by this Kustomization. */ + wait?: boolean; + /** Used for variable substitution for this Kustomization after kustomize build. */ + postBuild?: PostBuildDefinition; } /** Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get the next set of results. */ @@ -728,6 +754,10 @@ export interface FluxConfiguration extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly statusUpdatedAt?: Date; + /** Whether flux configuration deployment should wait for cluster to reconcile the kustomizations. */ + waitForReconciliation?: boolean; + /** Maximum duration to wait for flux configuration reconciliation. E.g PT1H, PT5M, P1D */ + reconciliationWaitDuration?: string; /** * Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. * NOTE: This property will not be serialized. It can only be populated by the server. diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts index b43824e71936..66987873b539 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts @@ -863,6 +863,78 @@ export const KustomizationDefinition: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + wait: { + defaultValue: true, + serializedName: "wait", + type: { + name: "Boolean" + } + }, + postBuild: { + serializedName: "postBuild", + type: { + name: "Composite", + className: "PostBuildDefinition" + } + } + } + } +}; + +export const PostBuildDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PostBuildDefinition", + modelProperties: { + substitute: { + serializedName: "substitute", + nullable: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + substituteFrom: { + serializedName: "substituteFrom", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubstituteFromDefinition" + } + } + } + } + } + } +}; + +export const SubstituteFromDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubstituteFromDefinition", + modelProperties: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + optional: { + defaultValue: false, + serializedName: "optional", + type: { + name: "Boolean" + } } } } @@ -1417,6 +1489,20 @@ export const KustomizationPatchDefinition: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + wait: { + serializedName: "wait", + nullable: true, + type: { + name: "Boolean" + } + }, + postBuild: { + serializedName: "postBuild", + type: { + name: "Composite", + className: "PostBuildDefinition" + } } } } @@ -1944,6 +2030,20 @@ export const FluxConfiguration: coreClient.CompositeMapper = { name: "DateTime" } }, + waitForReconciliation: { + serializedName: "properties.waitForReconciliation", + nullable: true, + type: { + name: "Boolean" + } + }, + reconciliationWaitDuration: { + serializedName: "properties.reconciliationWaitDuration", + nullable: true, + type: { + name: "String" + } + }, complianceState: { defaultValue: "Unknown", serializedName: "properties.complianceState", diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts index 30bb397bcbf0..99ba697de975 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts @@ -136,7 +136,7 @@ export const extensionName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01", + defaultValue: "2023-05-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts index e915a3e94afd..af6ac03dce2d 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts @@ -64,7 +64,7 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-kubernetesconfiguration/6.0.1`; + const packageDetails = `azsdk-js-arm-kubernetesconfiguration/6.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -117,7 +117,7 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01"; + this.apiVersion = options.apiVersion || "2023-05-01"; this.extensions = new ExtensionsImpl(this); this.operationStatus = new OperationStatusImpl(this); this.fluxConfigurations = new FluxConfigurationsImpl(this); diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json index 5341a8d13163..3e6ae96443f3 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-kubernetesconfiguration": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"