From c0ef24c2ea7986b6463f7cc3225ddbc61e52cf6e Mon Sep 17 00:00:00 2001 From: prakhar katiyar Date: Tue, 7 Oct 2025 14:36:47 +0530 Subject: [PATCH] more apis Added --- specs/application/get-app.yaml | 98 ++++- specs/ent-only/lock-configuration.yaml | 209 ++++++++++ specs/ent-only/protect.yaml | 289 +++++++++++++- .../app-config-autocomplete.yaml} | 0 ...p-endpoints.yaml => app-env-template.yaml} | 0 specs/template/config-maps.yaml | 360 ------------------ ...t-corrected.yaml => configmap-secret.yaml} | 0 .../template/deployment-template-config.yaml | 225 ----------- 8 files changed, 593 insertions(+), 588 deletions(-) create mode 100644 specs/ent-only/lock-configuration.yaml rename specs/{environment/config-diff.yaml => template/app-config-autocomplete.yaml} (100%) rename specs/template/{orchestrator-app-endpoints.yaml => app-env-template.yaml} (100%) delete mode 100644 specs/template/config-maps.yaml rename specs/template/{configmap-secret-corrected.yaml => configmap-secret.yaml} (100%) diff --git a/specs/application/get-app.yaml b/specs/application/get-app.yaml index 591fab915a..6b05f0311a 100644 --- a/specs/application/get-app.yaml +++ b/specs/application/get-app.yaml @@ -201,6 +201,58 @@ paths: schema: $ref: '#/components/schemas/Error' + /orchestrator/app/other-env/min: + get: + description: Fetch minimal details of other environments for a specific application. Returns a list of environments where the application is deployed with minimal information including environment name, cluster details, and deployment status. + operationId: FetchMinDetailOtherEnvironment + parameters: + - name: app-id + in: query + required: true + description: The ID of the application to fetch environment details for + schema: + type: integer + example: 26 + responses: + '200': + description: Successfully retrieved minimal environment details + content: + application/json: + schema: + type: object + properties: + code: + type: integer + description: HTTP status code + example: 200 + status: + type: string + description: Response status + example: "OK" + result: + type: array + description: List of environments with minimal details + items: + $ref: '#/components/schemas/EnvironmentMinDetail' + '400': + description: Bad Request. Invalid app-id parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: Forbidden. User does not have permission to access this application. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + components: schemas: App: @@ -827,4 +879,48 @@ components: type: string description: Name of environment Values: - $ref: '#/components/schemas/EnvironmentOverride' \ No newline at end of file + $ref: '#/components/schemas/EnvironmentOverride' + + EnvironmentMinDetail: + type: object + description: Minimal environment details for an application deployment + properties: + environmentId: + type: integer + description: Unique identifier for the environment + example: 1 + environmentName: + type: string + description: Name of the environment + example: "production" + clusterId: + type: integer + description: ID of the cluster where environment is deployed + example: 1 + prod: + type: boolean + description: Whether this is a production environment + example: true + description: + type: string + description: Description of the environment + maxLength: 40 + example: "Production environment" + isVirtualEnvironment: + type: boolean + description: Whether this is a virtual environment + example: false + deploymentAppDeleteRequest: + type: boolean + description: Whether there is a pending delete request for the deployment + example: false + appMetrics: + type: boolean + nullable: true + description: Whether application metrics are enabled + example: true + infraMetrics: + type: boolean + nullable: true + description: Whether infrastructure metrics are enabled + example: true \ No newline at end of file diff --git a/specs/ent-only/lock-configuration.yaml b/specs/ent-only/lock-configuration.yaml new file mode 100644 index 0000000000..84d8dd9b7f --- /dev/null +++ b/specs/ent-only/lock-configuration.yaml @@ -0,0 +1,209 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Lock Configuration API + description: API for managing deployment template lock configurations that restrict which paths can be modified in deployment templates +paths: + /orchestrator/config/lock: + get: + description: Get lock configuration for an application and environment. Returns paths that are locked or allowed for modification in deployment templates. + parameters: + - name: appId + in: query + required: false + schema: + type: integer + description: Application ID. If not provided, returns global lock configuration. + - name: envId + in: query + required: false + schema: + type: integer + description: Environment ID. If not provided with appId, returns app-level lock configuration. Use -1 for base deployment template. + responses: + '200': + description: Successfully retrieved lock configuration + content: + application/json: + schema: + $ref: '#/components/schemas/LockConfigResponse' + examples: + withLockConfig: + summary: Lock configuration exists + value: + id: 1 + allowed: true + config: + - "spec.replicas" + - "spec.template.spec.containers[0].resources" + emptyLockConfig: + summary: No lock configuration + value: + config: [] + '400': + description: Bad Request. Invalid appId or envId parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have required permissions (must be admin/manager or have config approver access). + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + description: Create or update lock configuration. Requires super admin permissions. + requestBody: + description: Lock configuration request + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LockConfigRequest' + examples: + allowSpecificPaths: + summary: Allow only specific paths to be modified + value: + allowed: true + config: + - "spec.replicas" + - "spec.template.spec.containers[0].image" + denySpecificPaths: + summary: Deny specific paths from being modified + value: + allowed: false + config: + - "spec.template.spec.securityContext" + - "spec.template.spec.serviceAccountName" + responses: + '200': + description: Successfully created/updated lock configuration + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: ID of the created/updated lock configuration + '400': + description: Bad Request. Validation error or invalid request body. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have super admin permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + description: Delete active lock configuration. Requires super admin permissions. + responses: + '200': + description: Successfully deleted lock configuration + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have super admin permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +components: + schemas: + LockConfigRequest: + type: object + required: + - allowed + - config + properties: + allowed: + type: boolean + description: If true, only paths in 'config' can be modified (allowlist). If false, paths in 'config' cannot be modified (denylist). + config: + type: array + items: + type: string + description: List of JSON paths in the deployment template. Supports array indexing (e.g., "spec.containers[0].image") + example: + - "spec.replicas" + - "spec.template.spec.containers[0].resources.limits.cpu" + - "spec.template.spec.containers[0].resources.limits.memory" + LockConfigResponse: + type: object + properties: + id: + type: integer + description: Lock configuration ID + allowed: + type: boolean + description: If true, only paths in 'config' can be modified (allowlist). If false, paths in 'config' cannot be modified (denylist). + config: + type: array + items: + type: string + description: List of JSON paths that are locked or allowed + example: + - "spec.replicas" + - "spec.template.spec.containers[0].resources" + LockValidateErrorResponse: + type: object + description: Response when lock configuration validation fails + properties: + isLockConfigError: + type: boolean + description: Indicates if the error is due to lock configuration violation + changedPaths: + type: array + items: + type: string + description: List of paths that were changed but are locked + Error: + required: + - code + - message + properties: + code: + type: integer + description: Error code + message: + type: string + description: Error message + diff --git a/specs/ent-only/protect.yaml b/specs/ent-only/protect.yaml index 6150eb2c23..baed0a579d 100644 --- a/specs/ent-only/protect.yaml +++ b/specs/ent-only/protect.yaml @@ -1,11 +1,11 @@ openapi: "3.0.0" info: - version: 1.0.0 + version: 2.0.0 title: Resource Protection API paths: /orchestrator/protect: post: - description: enable/disable resource protection + description: enable/disable resource protection (deprecated) requestBody: description: A JSON object containing the app configuration required: true @@ -34,6 +34,178 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + get: + description: Get resource protection metadata for an application (v1) + parameters: + - name: appId + in: query + required: true + schema: + type: integer + description: Application ID + responses: + '200': + description: Successfully retrieved resource protection metadata + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceProtectModel' + '400': + description: Bad Request. Invalid appId parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have access to this application. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /orchestrator/protect/env: + get: + description: Get resource protection metadata for all apps in an environment (v1) + parameters: + - name: envId + in: query + required: true + schema: + type: integer + description: Environment ID + responses: + '200': + description: Successfully retrieved resource protection status for apps in environment + content: + application/json: + schema: + type: object + additionalProperties: + type: boolean + description: Map of appId to protection enabled status + '400': + description: Bad Request. Invalid envId parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have access to any apps in this environment. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /orchestrator/protect/v2: + get: + description: Get enhanced resource protection metadata for an application with approval configurations (v2) + parameters: + - name: appId + in: query + required: true + schema: + type: integer + description: Application ID + responses: + '200': + description: Successfully retrieved enhanced resource protection metadata + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceProtectModel' + '400': + description: Bad Request. Invalid appId parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have access to this application. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /orchestrator/protect/v2/env: + get: + description: Get enhanced resource protection metadata for all apps in an environment with approval configurations (v2) + parameters: + - name: envId + in: query + required: true + schema: + type: integer + description: Environment ID + responses: + '200': + description: Successfully retrieved enhanced resource protection metadata for apps in environment + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceProtectModel' + '400': + description: Bad Request. Invalid envId parameter. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. User not authenticated. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden. User does not have access to any apps in this environment. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' components: schemas: ResourceProtectRequest: @@ -45,6 +217,119 @@ components: type: integer state: $ref: '#/components/schemas/ProtectionState' + ResourceProtectModel: + type: object + properties: + appId: + type: integer + description: Application identifier + envId: + type: integer + description: Environment identifier (-1 for app-level configurations) + state: + type: integer + description: Protection state (1=Enabled, 2=Disabled, 3=Migrated) + enum: [1, 2, 3] + approvalConfigurations: + type: array + description: List of approval configurations for different resource kinds + items: + $ref: '#/components/schemas/UserApprovalConfigDTO' + UserApprovalConfigDTO: + type: object + properties: + kind: + type: string + description: Resource kind requiring approval + enum: + - configuration/config-map + - configuration/config-secret + - configuration/deployment-template + - approval/deployment + requiredCount: + type: integer + description: Total number of approvals required + currentCount: + type: integer + description: Current number of approvals received + anyUserApprovedInfo: + $ref: '#/components/schemas/ApprovalUsersInfo' + nullable: true + description: Approval info for "any user" approvers + specificUsersApprovedInfo: + $ref: '#/components/schemas/ApprovalUsersInfo' + nullable: true + description: Approval info for specific users + userGroupsApprovedInfo: + $ref: '#/components/schemas/UserGroupsApprovalInfo' + nullable: true + description: Approval info for user groups + isExceptionUser: + type: boolean + description: Whether the current user is an exception user who can bypass approvals + ApprovalUsersInfo: + type: object + properties: + requiredCount: + type: integer + description: Number of approvals required from this category + currentCount: + type: integer + description: Current number of approvals from this category + approverList: + type: array + description: List of users who can approve + items: + $ref: '#/components/schemas/UserApprovalStatusInfo' + UserApprovalStatusInfo: + type: object + properties: + identifier: + type: string + description: User email or identifier + hasApproved: + type: boolean + description: Whether this user has already approved + canApprove: + type: boolean + description: Whether this user can approve + userDeleted: + type: boolean + description: Whether this user has been deleted + UserGroupsApprovalInfo: + type: object + properties: + requiredCount: + type: integer + description: Total approvals required from all groups + currentCount: + type: integer + description: Current approvals from all groups + userGroups: + type: array + description: List of user groups with approval info + items: + $ref: '#/components/schemas/UserGroupInfo' + UserGroupInfo: + type: object + properties: + groupName: + type: string + description: Display name of the user group + groupIdentifier: + type: string + description: Unique identifier of the user group + requiredCount: + type: integer + description: Approvals required from this group + currentCount: + type: integer + description: Current approvals from this group + approverList: + type: array + description: List of users in this group who can approve + items: + $ref: '#/components/schemas/UserApprovalStatusInfo' ProtectionState: description: 0 for enabled, 1 for disabled type: integer diff --git a/specs/environment/config-diff.yaml b/specs/template/app-config-autocomplete.yaml similarity index 100% rename from specs/environment/config-diff.yaml rename to specs/template/app-config-autocomplete.yaml diff --git a/specs/template/orchestrator-app-endpoints.yaml b/specs/template/app-env-template.yaml similarity index 100% rename from specs/template/orchestrator-app-endpoints.yaml rename to specs/template/app-env-template.yaml diff --git a/specs/template/config-maps.yaml b/specs/template/config-maps.yaml deleted file mode 100644 index 5e44e49c11..0000000000 --- a/specs/template/config-maps.yaml +++ /dev/null @@ -1,360 +0,0 @@ -openapi: "3.0.3" -info: - title: Devtron ConfigMap and Secret Management API - description: API specifications for ConfigMap and Secret management in Devtron orchestrator - version: "1.0.0" - contact: - name: Devtron Support - email: support@devtron.ai - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - -servers: - - url: /orchestrator - description: Devtron Orchestrator API Server - -security: - - bearerAuth: [] - -components: - securitySchemes: - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT - - schemas: - ApiResponse: - type: object - properties: - code: - type: integer - status: - type: string - result: - type: object - - ErrorResponse: - type: object - properties: - code: - type: integer - status: - type: string - errors: - type: array - items: - type: string - - ConfigDataRequest: - type: object - required: - - appId - - configData - properties: - id: - type: integer - example: 0 - appId: - type: integer - example: 123 - environmentId: - type: integer - example: 456 - configData: - type: array - items: - $ref: '#/components/schemas/ConfigData' - isDeletable: - type: boolean - default: true - - ConfigData: - type: object - required: - - name - - type - properties: - name: - type: string - example: "global-configmap" - type: - type: string - enum: ["CONFIGMAP", "SECRET"] - example: "CONFIGMAP" - external: - type: boolean - default: false - mountPath: - type: string - example: "/etc/config" - data: - type: object - additionalProperties: - type: string - example: - key1: "value1" - key2: "value2" - global: - type: boolean - default: true - subPath: - type: boolean - default: false - filePermission: - type: string - example: "0644" - - ConfigsList: - type: object - properties: - maps: - type: array - items: - $ref: '#/components/schemas/ConfigData' - -tags: - - name: Global ConfigMaps - description: Global ConfigMap management - - name: Global Secrets - description: Global Secret management - - name: Environment ConfigMaps - description: Environment-specific ConfigMap operations - - name: Environment Secrets - description: Environment-specific Secret operations - -paths: - /config/global/cm: - post: - tags: - - Global ConfigMaps - summary: Create or update global ConfigMap - description: Creates a new global ConfigMap or updates an existing one - operationId: CMGlobalAddUpdate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigDataRequest' - example: - id: 0 - appId: 123 - configData: - - name: "global-configmap" - type: "CONFIGMAP" - external: false - mountPath: "/etc/config" - data: - key1: "value1" - key2: "value2" - global: true - subPath: false - filePermission: "0644" - isDeletable: true - responses: - '200': - description: ConfigMap created/updated successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - '400': - description: Invalid request parameters - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /config/global/cs: - post: - tags: - - Global Secrets - summary: Create or update global Secret - description: Creates a new global Secret or updates an existing one - operationId: CSGlobalAddUpdate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigDataRequest' - example: - id: 0 - appId: 123 - configData: - - name: "global-secret" - type: "SECRET" - external: false - mountPath: "/etc/secrets" - data: - username: "admin" - password: "s3cr3t" - global: true - subPath: false - filePermission: "0600" - isDeletable: true - responses: - '200': - description: Secret created/updated successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - '400': - description: Invalid request parameters - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /config/global/cm/{appId}: - get: - tags: - - Global ConfigMaps - summary: Get global ConfigMaps for application - description: Retrieves all global ConfigMaps for the specified application - operationId: CMGlobalFetch - parameters: - - name: appId - in: path - required: true - schema: - type: integer - example: 123 - responses: - '200': - description: Global ConfigMaps retrieved successfully - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/ApiResponse' - - type: object - properties: - result: - $ref: '#/components/schemas/ConfigsList' - '400': - description: Invalid application ID - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: Application not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /config/global/cs/{appId}: - get: - tags: - - Global Secrets - summary: Get global Secrets for application - description: Retrieves all global Secrets for the specified application - operationId: CSGlobalFetch - parameters: - - name: appId - in: path - required: true - schema: - type: integer - example: 123 - responses: - '200': - description: Global Secrets retrieved successfully - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/ApiResponse' - - type: object - properties: - result: - $ref: '#/components/schemas/ConfigsList' - '400': - description: Invalid application ID - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: Application not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' diff --git a/specs/template/configmap-secret-corrected.yaml b/specs/template/configmap-secret.yaml similarity index 100% rename from specs/template/configmap-secret-corrected.yaml rename to specs/template/configmap-secret.yaml diff --git a/specs/template/deployment-template-config.yaml b/specs/template/deployment-template-config.yaml index bd5138f026..f069c848c3 100644 --- a/specs/template/deployment-template-config.yaml +++ b/specs/template/deployment-template-config.yaml @@ -1027,70 +1027,6 @@ paths: security: - bearerAuth: [] - /config/environment: - get: - tags: - - Environment Configuration - summary: Get environment configuration - description: Retrieves environment configuration details - operationId: getEnvironmentConfiguration - parameters: - - name: environmentId - in: query - description: Environment ID to filter by - required: false - schema: - type: integer - format: int64 - - name: clusterId - in: query - description: Cluster ID to filter by - required: false - schema: - type: integer - format: int64 - - name: appId - in: query - description: Application ID to filter by - required: false - schema: - type: integer - format: int64 - responses: - '200': - description: Environment configuration retrieved successfully - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/ApiResponse' - - type: object - properties: - result: - type: array - items: - $ref: '#/components/schemas/EnvironmentConfig' - '400': - description: Invalid request parameters - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - security: - - bearerAuth: [] - /app/env/{appId}/{envId}: get: tags: @@ -1356,114 +1292,6 @@ paths: security: - bearerAuth: [] - put: - tags: - - Environment Configuration - summary: Update environment configuration with chart values - description: | - Updates environment-specific configuration with chart values including: - - Modified chart values - - Updated environment settings - - Chart version changes - - Environment override updates - operationId: updateEnvConfigOverrideWithChart - parameters: - - name: appId - in: path - description: Application ID - required: true - schema: - type: integer - format: int64 - minimum: 1 - example: 123 - - name: envId - in: path - description: Environment ID - required: true - schema: - type: integer - format: int64 - minimum: 1 - example: 456 - - name: chartId - in: path - description: Chart ID - required: true - schema: - type: integer - format: int64 - minimum: 1 - example: 789 - requestBody: - description: Environment values configuration request - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EnvironmentValuesRequest' - examples: - production_values: - summary: Production environment values - value: - appId: 123 - envId: 456 - chartId: 789 - values: - replicaCount: 3 - image: "my-app:v1.2.0" - resources: - limits: - cpu: "500m" - memory: "512Mi" - requests: - cpu: "250m" - memory: "256Mi" - responses: - '200': - description: Environment configuration updated successfully - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/ApiResponse' - - type: object - properties: - result: - $ref: '#/components/schemas/EnvironmentConfig' - '400': - description: Invalid request format or validation error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '403': - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: Application, environment, or chart not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - security: - - bearerAuth: [] - /app/env: put: tags: @@ -1560,56 +1388,3 @@ paths: $ref: '#/components/schemas/ErrorResponse' security: - bearerAuth: [] - - /config/update: - put: - tags: - - Deployment Configuration - summary: Update deployment configuration - description: Updates deployment configuration for an application in a specific environment - operationId: updateDeploymentConfiguration - requestBody: - description: Deployment configuration update request - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateDeploymentConfigRequest' - responses: - '200': - description: Deployment configuration updated successfully - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/ApiResponse' - - type: object - properties: - result: - $ref: '#/components/schemas/DeploymentConfig' - '400': - description: Invalid request format or validation error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '401': - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: Application or environment not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - security: - - bearerAuth: []