|
5 | 5 | paths: |
6 | 6 | /orchestrator/core/v1beta1/application/{appId}: |
7 | 7 | get: |
8 | | - description: Get app details |
| 8 | + description: Get all details of an app by appId. These details include - metadata(appName, projectNamr, labels), gitMaterials, docker config, templates, workflows, configMaps, secrets, environment override configurations. |
9 | 9 | operationId: GetAppAllDetail |
10 | 10 | parameters: |
11 | 11 | - name: appId |
|
15 | 15 | type: integer |
16 | 16 | responses: |
17 | 17 | '200': |
18 | | - description: Successfully return all details of the app |
| 18 | + description: Successfully return all details of the app. |
19 | 19 | content: |
20 | 20 | application/json: |
21 | 21 | schema: |
|
40 | 40 | $ref: '#/components/schemas/Error' |
41 | 41 | /orchestrator/core/v1beta1/application: |
42 | 42 | post: |
43 | | - description: Creates a new app for the configurations provided |
| 43 | + description: Creates a new app for the configurations provided. The input json object is the same we get in response of GET method for fetching all details of an app |
44 | 44 | operationId: CreateApp |
45 | 45 | requestBody: |
46 | 46 | description: A JSON object containing the app configuration |
|
51 | 51 | $ref: '#/components/schemas/AppDetail' |
52 | 52 | responses: |
53 | 53 | '200': |
54 | | - description: Successfully return a message stating the operation is successful |
| 54 | + description: Successfully return a message stating the operation is successful. |
55 | 55 | content: |
56 | 56 | application/json: |
57 | 57 | schema: |
@@ -103,13 +103,181 @@ components: |
103 | 103 | items: |
104 | 104 | $ref: '#/components/schemas/Secret' |
105 | 105 | environmentOverrides: |
106 | | - type: object |
107 | | - properties: |
108 | | - Name: |
109 | | - type: string |
110 | | - description: Name of environment |
111 | | - Values: |
112 | | - $ref: '#/components/schemas/EnvironmentOverride' |
| 106 | + type: array |
| 107 | + items: |
| 108 | + type: object |
| 109 | + properties: |
| 110 | + Name: |
| 111 | + type: string |
| 112 | + description: Name of environment |
| 113 | + Values: |
| 114 | + $ref: '#/components/schemas/EnvironmentOverride' |
| 115 | + example: |
| 116 | + appMetadata: |
| 117 | + appName: example-app-2 |
| 118 | + projectName: devtron-demo |
| 119 | + labels: ["key1":"value1", "key2":"value2"] |
| 120 | + gitMaterials: |
| 121 | + - gitProviderUrl: "https://github.com" |
| 122 | + gitRepoUrl: "https://github.com/user1/example-repo" |
| 123 | + checkoutPath: "./" |
| 124 | + fetchSubmodules: true |
| 125 | + - gitProviderUrl: "https://gitlab.com" |
| 126 | + gitRepoUrl: "https://gitlab.com/user2/new-repo" |
| 127 | + checkoutPath: "./a" |
| 128 | + fetchSubmodules: false |
| 129 | + dockerConfig: |
| 130 | + dockerRegistry: "my-dockerhub" |
| 131 | + dockerRepository: "user/test" |
| 132 | + dockerBuildConfig: |
| 133 | + gitCheckoutPath: "./a" |
| 134 | + dockerfileRelativePath: "Dockerfile" |
| 135 | + args: ["File":"*"] |
| 136 | + globalDeploymentTemplate: |
| 137 | + chartRefId: 13 |
| 138 | + showAppMetrics: true |
| 139 | + isOverride: false |
| 140 | + template: |
| 141 | + ContainerPort: |
| 142 | + envoyPort: 8799 |
| 143 | + idleTimeout: 1800s |
| 144 | + name: app |
| 145 | + port: 8080 |
| 146 | + servicePort: 80 |
| 147 | + supportStreaming: true |
| 148 | + useHTTP2: true |
| 149 | + EnvVariables: [] |
| 150 | + GracePeriod: 30 |
| 151 | + LivenessProbe: |
| 152 | + Path: "" |
| 153 | + command: [] |
| 154 | + failureThreshold: 3 |
| 155 | + httpHeader: |
| 156 | + name: "" |
| 157 | + value: "" |
| 158 | + initialDelaySeconds: 20 |
| 159 | + periodSeconds: 10 |
| 160 | + port: 8080 |
| 161 | + scheme: "" |
| 162 | + successThreshold: 1 |
| 163 | + tcp: false |
| 164 | + timeoutSeconds: 5 |
| 165 | + appWorkflows: |
| 166 | + - name: "workflow-1" |
| 167 | + ciPipeline: |
| 168 | + name: "ci-pipeline-1" |
| 169 | + isManual: true |
| 170 | + vulnerabilityScanEnabled: false |
| 171 | + isExternal: fale |
| 172 | + ciPipelineMaterialsConfig: |
| 173 | + - type: "SOURCE_TYPE_BRANCH_FIXED" |
| 174 | + value: "master" |
| 175 | + checkoutPath: "./" |
| 176 | + - type: "SOURCE_TYPE_BRANCH_FIXED" |
| 177 | + value: "main" |
| 178 | + checkoutPath: "./a" |
| 179 | + dockerBuildArgs: ["File":"*"] |
| 180 | + cdPipelines: |
| 181 | + - name: "cd-pipeline-1" |
| 182 | + environmentName: "devtron-demo" |
| 183 | + triggerType: "AUTOMATIC" |
| 184 | + deploymentStrategies: |
| 185 | + - name: "BLUE-GREEN" |
| 186 | + config: |
| 187 | + deployment: |
| 188 | + strategy: |
| 189 | + blueGreen: |
| 190 | + autoPromotionSeconds: 30 |
| 191 | + "scaleDownDelaySeconds": 30 |
| 192 | + "previewReplicaCount": 1 |
| 193 | + "autoPromotionEnabled": false |
| 194 | + isDefault: false |
| 195 | + - name: "ROLLING" |
| 196 | + config: |
| 197 | + deployment: |
| 198 | + strategy: |
| 199 | + blueGreen: |
| 200 | + autoPromotionSeconds: 30 |
| 201 | + "maxSurge": "25%" |
| 202 | + "maxUnavailable": 1 |
| 203 | + isDefault: true |
| 204 | + preStage: |
| 205 | + name: "cd-1-pre" |
| 206 | + triggerType: "MANUAL" |
| 207 | + config: "version: 0.0.1\ncdPipelineConf:\n- beforeStages:\n- name: test-1\n script: |\n date > test.report\necho 'hello'\noutputLocation: ./test.report\n - name: test-2\nscript: |\n date > test2.report\n outputLocation: ./test2.report;" |
| 208 | + postStage: |
| 209 | + name: "cd-1-post" |
| 210 | + triggerType: "AUTO" |
| 211 | + config: "version: 0.0.1\ncdPipelineConf:\n- afterStages:\n- name: test-1\n script: |\n date > test.report\necho 'hello'\noutputLocation: ./test.report\n - name: test-2\nscript: |\n date > test2.report\n outputLocation: ./test2.report;" |
| 212 | + preStageConfigMapSecretNames: |
| 213 | + - configMaps: ["cm-1"] |
| 214 | + - secrets: ["secret-env-1"] |
| 215 | + postStageConfigMapSecretNames: |
| 216 | + - configMaps: ["cm-env-1"] |
| 217 | + - secrets: ["secret-1"] |
| 218 | + runPreStageInEnv: true |
| 219 | + runPostStageInEnv: true |
| 220 | + isClusterCdActive: true |
| 221 | + globalConfigMaps: |
| 222 | + - name: "cm-1" |
| 223 | + isExternal: false |
| 224 | + usageType: "volume" |
| 225 | + data: ["abc":"xyz"] |
| 226 | + dataVolumeUsageConfig: |
| 227 | + mountPath: "/cm" |
| 228 | + filePermission: "600" |
| 229 | + subPath: true |
| 230 | + globalSecrets: |
| 231 | + - name: "secret-1" |
| 232 | + isExternal: false |
| 233 | + usageType: "environment" |
| 234 | + data: ["user1":"password1"] |
| 235 | + environmentOverrides: |
| 236 | + - name: "devtron-demo" |
| 237 | + values: |
| 238 | + deploymentTemplate: |
| 239 | + chartRefId: 13 |
| 240 | + showAppMetrics: false |
| 241 | + isOverride: true |
| 242 | + template: |
| 243 | + ContainerPort: |
| 244 | + envoyPort: 8799 |
| 245 | + idleTimeout: 1800s |
| 246 | + name: app |
| 247 | + port: 8080 |
| 248 | + servicePort: 80 |
| 249 | + supportStreaming: true |
| 250 | + useHTTP2: true |
| 251 | + EnvVariables: [] |
| 252 | + GracePeriod: 35 |
| 253 | + LivenessProbe: |
| 254 | + Path: "" |
| 255 | + command: [] |
| 256 | + failureThreshold: 4 |
| 257 | + httpHeader: |
| 258 | + name: "" |
| 259 | + value: "" |
| 260 | + initialDelaySeconds: 21 |
| 261 | + periodSeconds: 11 |
| 262 | + port: 8080 |
| 263 | + scheme: "" |
| 264 | + successThreshold: 1 |
| 265 | + tcp: false |
| 266 | + timeoutSeconds: 10 |
| 267 | + configMaps: |
| 268 | + - name: "cm-env-1" |
| 269 | + isExternal: false |
| 270 | + usageType: "environment" |
| 271 | + data: ["userName":"new-user"] |
| 272 | + secrets: |
| 273 | + - name: "secret-env-1" |
| 274 | + isExternal: false |
| 275 | + usageType: "volume" |
| 276 | + data: ["new-user":"devtron123"] |
| 277 | + dataVolumeUsageConfig: |
| 278 | + mountPath: "/secret" |
| 279 | + filePermission: "400" |
| 280 | + subPath: false |
113 | 281 | AppMetadata: |
114 | 282 | type: object |
115 | 283 | properties: |
|
0 commit comments