From b46a2d3b9e27ddd6c0de643686375b35311eb893 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 13 Oct 2021 05:18:47 +0000 Subject: [PATCH] CodeGen from PR 15999 in Azure/azure-rest-api-specs [KubernetesConfiguration] Release 2021-11-01-preview with FluxConfigurations (#15999) * Adds base for updating Microsoft.KubernetesConfiguration from version stable/2021-03-01 to version 2021-10-01-preview * Updates readme * Updates API version in new specs and examples * Reference common definitions * Add fluxConfiguration to initial commit * Update readmes to new version * Add 409 conflict to scc * Update example api-versions * Add path example * Run prettier * Update dependsOn object body * Update readmes with 2021-09-01 * Change to lastSourceSyncedCommitID * Change to 2021-11-01-previe --- .../Microsoft.KubernetesConfiguration.json | 846 ++++++++++++++++++ 1 file changed, 846 insertions(+) create mode 100644 schemas/2021-11-01-preview/Microsoft.KubernetesConfiguration.json diff --git a/schemas/2021-11-01-preview/Microsoft.KubernetesConfiguration.json b/schemas/2021-11-01-preview/Microsoft.KubernetesConfiguration.json new file mode 100644 index 0000000000..61fa273b15 --- /dev/null +++ b/schemas/2021-11-01-preview/Microsoft.KubernetesConfiguration.json @@ -0,0 +1,846 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-11-01-preview/Microsoft.KubernetesConfiguration.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.KubernetesConfiguration", + "description": "Microsoft KubernetesConfiguration Resource Types", + "resourceDefinitions": {}, + "extension_resourceDefinitions": { + "extensions": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "identity": { + "oneOf": [ + { + "$ref": "#/definitions/Identity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Identity for the resource." + }, + "name": { + "type": "string", + "description": "Name of the Extension." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExtensionProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of an Extension resource" + }, + "systemData": { + "oneOf": [ + { + "$ref": "#/definitions/SystemData" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.KubernetesConfiguration/extensions" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.KubernetesConfiguration/extensions" + }, + "fluxConfigurations": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Name of the Flux Configuration." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/FluxConfigurationProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties to create a Flux Configuration resource" + }, + "systemData": { + "oneOf": [ + { + "$ref": "#/definitions/SystemData" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.KubernetesConfiguration/fluxConfigurations" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.KubernetesConfiguration/fluxConfigurations" + }, + "sourceControlConfigurations": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-11-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Name of the Source Control Configuration." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/SourceControlConfigurationProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties to create a Source Control Configuration resource" + }, + "systemData": { + "oneOf": [ + { + "$ref": "#/definitions/SystemData" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + } + }, + "definitions": { + "DependsOnDefinition": { + "type": "object", + "properties": { + "kustomizationName": { + "type": "string", + "description": "Name of the kustomization to claim dependency on" + } + }, + "description": "Specify which kustomizations must succeed reconciliation on the cluster prior to reconciling this kustomization" + }, + "ExtensionProperties": { + "type": "object", + "properties": { + "aksAssignedIdentity": { + "oneOf": [ + { + "$ref": "#/definitions/ExtensionPropertiesAksAssignedIdentity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Identity of the Extension resource in an AKS cluster" + }, + "autoUpgradeMinorVersion": { + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Flag to note if this extension participates in auto upgrade of minor version, or not." + }, + "configurationProtectedSettings": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration settings that are sensitive, as name-value pairs for configuring this extension." + }, + "configurationSettings": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Configuration settings, as name-value pairs for configuring this extension." + }, + "extensionType": { + "type": "string", + "description": "Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher." + }, + "releaseTrain": { + "type": "string", + "default": "Stable", + "description": "ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'." + }, + "scope": { + "oneOf": [ + { + "$ref": "#/definitions/Scope" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Scope of the extension. It can be either Cluster or Namespace; but not both." + }, + "statuses": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ExtensionStatus" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Status from this extension." + }, + "version": { + "type": "string", + "description": "Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'." + } + }, + "description": "Properties of an Extension resource" + }, + "ExtensionPropertiesAksAssignedIdentity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "SystemAssigned" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The identity type." + } + }, + "description": "Identity of the Extension resource in an AKS cluster" + }, + "ExtensionStatus": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Status code provided by the Extension" + }, + "displayStatus": { + "type": "string", + "description": "Short description of status of the extension." + }, + "level": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Error", + "Warning", + "Information" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Level of the status." + }, + "message": { + "type": "string", + "description": "Detailed message of the status from the Extension." + }, + "time": { + "type": "string", + "description": "DateLiteral (per ISO8601) noting the time of installation status." + } + }, + "description": "Status from the extension." + }, + "FluxConfigurationProperties": { + "type": "object", + "properties": { + "configurationProtectedSettings": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Key-value pairs of protected configuration settings for the configuration" + }, + "gitRepository": { + "oneOf": [ + { + "$ref": "#/definitions/GitRepositoryDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Parameters to reconcile to the GitRepository source kind type." + }, + "kustomizations": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/KustomizationDefinition" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster." + }, + "namespace": { + "type": "string", + "default": "default", + "description": "The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only." + }, + "scope": { + "oneOf": [ + { + "type": "string", + "enum": [ + "cluster", + "namespace" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Scope at which the operator will be installed." + }, + "sourceKind": { + "oneOf": [ + { + "type": "string", + "enum": [ + "GitRepository" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Source Kind to pull the configuration data from." + }, + "suspend": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether this configuration should suspend its reconciliation of its kustomizations and sources." + } + }, + "description": "Properties to create a Flux Configuration resource" + }, + "GitRepositoryDefinition": { + "type": "object", + "properties": { + "httpsCAFile": { + "type": "string", + "description": "Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS" + }, + "httpsUser": { + "type": "string", + "description": "Base64-encoded HTTPS username used to access private git repositories over HTTPS" + }, + "localAuthRef": { + "type": "string", + "description": "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets." + }, + "repositoryRef": { + "oneOf": [ + { + "$ref": "#/definitions/RepositoryRefDefinition" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The source reference for the GitRepository object." + }, + "sshKnownHosts": { + "type": "string", + "description": "Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH" + }, + "syncIntervalInSeconds": { + "oneOf": [ + { + "type": "integer", + "default": "600" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The interval at which to re-reconcile the cluster git repository source with the remote." + }, + "timeoutInSeconds": { + "oneOf": [ + { + "type": "integer", + "default": "600" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The maximum time to attempt to reconcile the cluster git repository source with the remote." + }, + "url": { + "type": "string", + "description": "The URL to sync for the flux configuration git repository." + } + }, + "description": "Parameters to reconcile to the GitRepository source kind type." + }, + "HelmOperatorProperties": { + "type": "object", + "properties": { + "chartValues": { + "type": "string", + "description": "Values override for the operator Helm chart." + }, + "chartVersion": { + "type": "string", + "description": "Version of the operator Helm chart." + } + }, + "description": "Properties for Helm operator." + }, + "Identity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "SystemAssigned" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The identity type." + } + }, + "description": "Identity for the resource." + }, + "KustomizationDefinition": { + "type": "object", + "properties": { + "dependsOn": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/DependsOnDefinition" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation." + }, + "force": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change." + }, + "path": { + "type": "string", + "default": "", + "description": "The path in the source reference to reconcile on the cluster." + }, + "prune": { + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Enable/disable garbage collections of Kubernetes objects created by this Kustomization." + }, + "retryIntervalInSeconds": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation." + }, + "syncIntervalInSeconds": { + "oneOf": [ + { + "type": "integer", + "default": "600" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The interval at which to re-reconcile the Kustomization on the cluster." + }, + "timeoutInSeconds": { + "oneOf": [ + { + "type": "integer", + "default": "600" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The maximum time to attempt to reconcile the Kustomization on the cluster." + }, + "validation": { + "oneOf": [ + { + "type": "string", + "enum": [ + "none", + "client", + "server" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster." + } + }, + "description": "The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster." + }, + "RepositoryRefDefinition": { + "type": "object", + "properties": { + "branch": { + "type": "string", + "description": "The git repository branch name to checkout." + }, + "commit": { + "type": "string", + "description": "The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver." + }, + "semver": { + "type": "string", + "description": "The semver range used to match against git repository tags. This takes precedence over tag." + }, + "tag": { + "type": "string", + "description": "The git repository tag name to checkout. This takes precedence over branch." + } + }, + "description": "The source reference for the GitRepository object." + }, + "Scope": { + "type": "object", + "properties": { + "cluster": { + "oneOf": [ + { + "$ref": "#/definitions/ScopeCluster" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies that the scope of the extension is Cluster" + }, + "namespace": { + "oneOf": [ + { + "$ref": "#/definitions/ScopeNamespace" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies that the scope of the extension is Namespace" + } + }, + "description": "Scope of the extension. It can be either Cluster or Namespace; but not both." + }, + "ScopeCluster": { + "type": "object", + "properties": { + "releaseNamespace": { + "type": "string", + "description": "Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created" + } + }, + "description": "Specifies that the scope of the extension is Cluster" + }, + "ScopeNamespace": { + "type": "object", + "properties": { + "targetNamespace": { + "type": "string", + "description": "Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created" + } + }, + "description": "Specifies that the scope of the extension is Namespace" + }, + "SourceControlConfigurationProperties": { + "type": "object", + "properties": { + "configurationProtectedSettings": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Name-value pairs of protected configuration settings for the configuration" + }, + "enableHelmOperator": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Option to enable Helm Operator for this git configuration." + }, + "helmOperatorProperties": { + "oneOf": [ + { + "$ref": "#/definitions/HelmOperatorProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties for Helm operator." + }, + "operatorInstanceName": { + "type": "string", + "description": "Instance name of the operator - identifying the specific configuration." + }, + "operatorNamespace": { + "type": "string", + "default": "default", + "description": "The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only." + }, + "operatorParams": { + "type": "string", + "description": "Any Parameters for the Operator instance in string format." + }, + "operatorScope": { + "oneOf": [ + { + "type": "string", + "enum": [ + "cluster", + "namespace" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Scope at which the operator will be installed." + }, + "operatorType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Flux" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of the operator." + }, + "repositoryUrl": { + "type": "string", + "description": "Url of the SourceControl Repository." + }, + "sshKnownHostsContents": { + "type": "string", + "description": "Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances" + } + }, + "description": "Properties to create a Source Control Configuration resource" + }, + "SystemData": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity that created the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity that last modified the resource." + } + }, + "description": "Metadata pertaining to creation and last modification of the resource." + } + } +} \ No newline at end of file