|
| 1 | +{ |
| 2 | + "openapi": "3.0.1", |
| 3 | + "info": { |
| 4 | + "title": "kubernetes Container Log API", |
| 5 | + "description": "API to manage container logs on AWS", |
| 6 | + "version": "1.0.0" |
| 7 | + }, |
| 8 | + "paths": { |
| 9 | + "/container/logs": { |
| 10 | + "post": { |
| 11 | + "summary": "Get a container log for provider GCP,AWS,Azure", |
| 12 | + "description": "This endpoint allows you to get a container log entry with AWS-specific details.", |
| 13 | + "requestBody": { |
| 14 | + "description": "AWS container log entry details", |
| 15 | + "required": true, |
| 16 | + "content": { |
| 17 | + "AWS": { |
| 18 | + "schema": { |
| 19 | + "$ref": "#/components/schemas/AWSPostRequest" |
| 20 | + } |
| 21 | + }, |
| 22 | + "GCP": { |
| 23 | + "schema": { |
| 24 | + "$ref": "#/components/schemas/GCPPostRequest" |
| 25 | + } |
| 26 | + }, |
| 27 | + "AZURE": { |
| 28 | + "schema": { |
| 29 | + "$ref": "#/components/schemas/AzurePostRequest" |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + }, |
| 34 | + "responses": { |
| 35 | + "200": { |
| 36 | + "description": "Successfully created the container log entry" |
| 37 | + }, |
| 38 | + "400": { |
| 39 | + "description": "Bad request. Invalid input data" |
| 40 | + }, |
| 41 | + "500": { |
| 42 | + "description": "Internal server error" |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + } |
| 47 | + }, |
| 48 | + "components": { |
| 49 | + "schemas": { |
| 50 | + "AWSPostRequest": { |
| 51 | + "type": "object", |
| 52 | + "properties": { |
| 53 | + "profileName": { |
| 54 | + "type": "string", |
| 55 | + "description": "Profile name", |
| 56 | + "example": "905417996850" |
| 57 | + }, |
| 58 | + "clusterName": { |
| 59 | + "type": "string", |
| 60 | + "description": "Name of the Kubernetes cluster", |
| 61 | + "example": "test-aws-2305" |
| 62 | + }, |
| 63 | + "namespaceName": { |
| 64 | + "type": "string", |
| 65 | + "description": "Name of the namespace", |
| 66 | + "example": "test-app" |
| 67 | + }, |
| 68 | + "cloudPlatform": { |
| 69 | + "type": "string", |
| 70 | + "description": "Name of the cloud platform", |
| 71 | + "example": "aws" |
| 72 | + }, |
| 73 | + "appRegion": { |
| 74 | + "type": "string", |
| 75 | + "description": "Region of the application", |
| 76 | + "example": "us-east-2" |
| 77 | + }, |
| 78 | + "credential": { |
| 79 | + "type": "object", |
| 80 | + "properties": { |
| 81 | + "aws_access_key_id": { |
| 82 | + "type": "string", |
| 83 | + "description": "AWS access key ID", |
| 84 | + "example": "fadfa" |
| 85 | + }, |
| 86 | + "aws_secret_access_key": { |
| 87 | + "type": "string", |
| 88 | + "description": "AWS secret access key", |
| 89 | + "example": "fafa/H1/fafa" |
| 90 | + } |
| 91 | + }, |
| 92 | + "required": [ |
| 93 | + "aws_access_key_id", |
| 94 | + "aws_secret_access_key" |
| 95 | + ] |
| 96 | + } |
| 97 | + }, |
| 98 | + "required": [ |
| 99 | + "profileName", |
| 100 | + "clusterName", |
| 101 | + "namespaceName", |
| 102 | + "cloudPlatform", |
| 103 | + "appRegion", |
| 104 | + "credential" |
| 105 | + ] |
| 106 | + }, |
| 107 | + "GCPPostRequest": { |
| 108 | + "type": "object", |
| 109 | + "properties": { |
| 110 | + "clusterName": { |
| 111 | + "type": "string", |
| 112 | + "description": "Name of the Kubernetes cluster", |
| 113 | + "example": "test-aws-2305" |
| 114 | + }, |
| 115 | + "namespaceName": { |
| 116 | + "type": "string", |
| 117 | + "description": "Name of the namespace", |
| 118 | + "example": "test-app" |
| 119 | + }, |
| 120 | + "cloudPlatform": { |
| 121 | + "type": "string", |
| 122 | + "description": "Name of the cloud platform", |
| 123 | + "example": "gcp" |
| 124 | + }, |
| 125 | + "appRegion": { |
| 126 | + "type": "string", |
| 127 | + "description": "Region of the application", |
| 128 | + "example": "us-east-2" |
| 129 | + }, |
| 130 | + "credential": { |
| 131 | + "type": "object", |
| 132 | + "properties": { |
| 133 | + "type": { |
| 134 | + "type": "string", |
| 135 | + "description": "Type of the credential", |
| 136 | + "example": "service_account" |
| 137 | + }, |
| 138 | + "project_id": { |
| 139 | + "type": "string", |
| 140 | + "description": "GCP project ID", |
| 141 | + "example": "titanium-campus-419705" |
| 142 | + }, |
| 143 | + "private_key_id": { |
| 144 | + "type": "string", |
| 145 | + "description": "Private key ID", |
| 146 | + "example": "b06d4afdbbee310003036e90b87833f5049fab45" |
| 147 | + }, |
| 148 | + "private_key": { |
| 149 | + "type": "string", |
| 150 | + "description": "Private key", |
| 151 | + "example": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD3DsU49spDArjb\nnG0advsbJjnajld2W3dxHujk4OjK0DbMo1fkVrtx0Uw9m7FWaDbEWl0SV3cjEhBb\nxktHs9qUFigAU+tYf7ahwhlw66iZ99roMafepuN5+8Ld71UTfVVu+GxADdzMteBw\n5uX5tY0GgJ6HHmlmFRu145HgyQd71n8VVFN6h/lBm4JSHIZctGefQBPzXufdf/GN\nRziRXrnTeZqnVjvoHqqGG0MczgVccsKjm2yG9uhiPr/037Sbd8TPYE6u3P69jAky\nr3wmlfNsQvtIuY9WZq3+JQ7V3IVwG9SuhVxb+5G/zYLIuISh+N0gMGHbBFHHwBU/\nsc0RoLGJAgMBAAECggEAQbASrien9ZM2tWVs+NljwH80aLDp/lUpd9FBGQHXw30C\n5PwVNWf+JLACdmr8Br5kuWZRUrwguBlocg5SG7ltR2xwrE2jyH8EfxPNkeGGjZGC\nCbSSLrfuyZMv57RnyWvMmFnC5nEJIQDGsR4jTXaBDZaLD9/9JCA+oujj84Ff1QPY\nPjH6REmaYP5oH4Jj/5tQxS3f/Z5Bayl0O9Qivm3wXeQI56CrKzS4rdQoRDywysEZ\nTPQzLD/Lti8opg5OUnMEjx8a0R0NXhS69ucMOymb5gJuBeRLMgyvNDdbvyundk8t\nWaHzhk48gZpHDbXeBwAg4ncFLVCK6HeEYcG7MOVBRQKBgQD+UggjUI4ODhxT8fvj\nUdB/yn4Q8+xfy+dxafo+A5O2RIV2tkDc9NOtF004CpE2H2TUPtgaBuW44scAU/M0\ng5bWcwaYQewVmiOHCbVYYLBvthOa0V+FdPjuq+LdLQKiDS3kYt+EErqbVfDfuzK9\nPVn4RoqyZLNcLFCsS7JlWsrggwKBgQD4sHW23eQEwXMWmxd9xSjcs8uWjWh3n239\n+z8Da1TS0HyZL2WEJrNB6qvtmB9DsRb6+8UZG8h+Dclcy6XBTEN/GYYJsafBJWAe\ncHdHv+AXqTjpQR7f31gh42cVwKkDz6qzVBOLU/8tNx7Xj3/vfPoZxmrZ3yi+0oHs\nbHOwfKKwAwKBgQD7Pz1s7gM5HXWc9P49CDGsXfcHdoM57K58nA8tvsjqE22q5sjT\nwUdxxAh0afQlfQRWrrM9mzzN17RzvXwSkEGvILoOJ2o9uSaKHOw8IGGOK1nY5Cmz\nJelbmRIqIXJteAmzjH528y3JkjDCRyUMUZUVs1MIhHWxhNI6NRpMCVNOUwKBgD6R\n3zwgPeN4bKVuZg2t0mcdEYcSkwst4LW7RhJtKc1UyVSdWTRTrFxUV+eSk6MrZjXF\nrMRxehNFErm3P0AQGRdca536xdNRvQpLj6dMvmwVlo0RZlw7TGhSV7hgXeXolPFD\noRs4CgbtTGQ95Zly31Ym1vF0NUM1oZzDeKQZ57DTAoGBAIJD1V3AA9N1vI8gr1dq\npeLM+dX9Vh4CXtEkpVDzIR56CdX07dXwiqI0d06Y9j4fuMx0g0C6EZNKTxccuKha\nwwif2aqcYyJgrgtK2oXuxrGkHageVkRWHKZijeYrradxbTWx0M9Kc3OUICQQ08iV\nsJhkR2vsB8FP37u1idrkGWCY" |
| 152 | + }, |
| 153 | + "client_email": { |
| 154 | + "type": "string", |
| 155 | + "description": "Client email", |
| 156 | + "example": "kops-20240408@titanium-campus-419705.iam.gserviceaccount.com" |
| 157 | + }, |
| 158 | + "client_id": { |
| 159 | + "type": "string", |
| 160 | + "description": "Client ID", |
| 161 | + "example": "117116239925621495953" |
| 162 | + }, |
| 163 | + "auth_uri": { |
| 164 | + "type": "string", |
| 165 | + "description": "Auth URI", |
| 166 | + "example": "https://accounts.google.com/o/oauth2/auth" |
| 167 | + }, |
| 168 | + "token_uri": { |
| 169 | + "type": "string", |
| 170 | + "description": "Token URI", |
| 171 | + "example": "https://oauth2.googleapis.com/token" |
| 172 | + }, |
| 173 | + "auth_provider_x509_cert_url": { |
| 174 | + "type": "string", |
| 175 | + "description": "Auth provider x509 cert URL", |
| 176 | + "example": "https://www.googleapis.com/oauth2/v1/certs" |
| 177 | + }, |
| 178 | + "client_x509_cert_url": { |
| 179 | + "type": "string", |
| 180 | + "description": "Client x509 cert URL", |
| 181 | + "example": "https://www.googleapis.com/robot/v1/metadata/x509/kops-20240408%40titanium-campus-419705.iam.gserviceaccount.com" |
| 182 | + }, |
| 183 | + "universe_domain": { |
| 184 | + "type": "string", |
| 185 | + "description": "Universe domain", |
| 186 | + "example": "googleapis.com" |
| 187 | + } |
| 188 | + }, |
| 189 | + "required": [ |
| 190 | + "type", |
| 191 | + "project_id", |
| 192 | + "private_key_id", |
| 193 | + "private_key", |
| 194 | + "client_email", |
| 195 | + "client_id", |
| 196 | + "auth_uri", |
| 197 | + "token_uri", |
| 198 | + "auth_provider_x509_cert_url", |
| 199 | + "client_x509_cert_url" |
| 200 | + ] |
| 201 | + } |
| 202 | + }, |
| 203 | + "required": [ |
| 204 | + "clusterName", |
| 205 | + "namespaceName", |
| 206 | + "cloudPlatform", |
| 207 | + "appRegion", |
| 208 | + "credential" |
| 209 | + ] |
| 210 | + }, |
| 211 | + "AzurePostRequest": { |
| 212 | + "type": "object", |
| 213 | + "properties": { |
| 214 | + "resourceGroup": { |
| 215 | + "type": "string", |
| 216 | + "description": "Name of the Azure resource group", |
| 217 | + "example": "test" |
| 218 | + }, |
| 219 | + "clusterName": { |
| 220 | + "type": "string", |
| 221 | + "description": "Name of the Kubernetes cluster", |
| 222 | + "example": "test-aws-2305" |
| 223 | + }, |
| 224 | + "namespaceName": { |
| 225 | + "type": "string", |
| 226 | + "description": "Name of the namespace", |
| 227 | + "example": "test-app" |
| 228 | + }, |
| 229 | + "cloudPlatform": { |
| 230 | + "type": "string", |
| 231 | + "description": "Name of the cloud platform", |
| 232 | + "example": "azure" |
| 233 | + }, |
| 234 | + "appRegion": { |
| 235 | + "type": "string", |
| 236 | + "description": "Region of the application", |
| 237 | + "example": "us-east-2" |
| 238 | + }, |
| 239 | + "credential": { |
| 240 | + "type": "object", |
| 241 | + "properties": { |
| 242 | + "subscriptionId": { |
| 243 | + "type": "string", |
| 244 | + "description": "Azure subscription ID", |
| 245 | + "example": "263f0185-28e5-44b4-95a0-e318720493ac" |
| 246 | + }, |
| 247 | + "tenantId": { |
| 248 | + "type": "string", |
| 249 | + "description": "Azure tenant ID", |
| 250 | + "example": "312a4e75-d8b6-45e3-b300-841b57a4a219" |
| 251 | + }, |
| 252 | + "appId": { |
| 253 | + "type": "string", |
| 254 | + "description": "Azure application (client) ID", |
| 255 | + "example": "27a25248-856e-4b62-b48a-15ffc9203232" |
| 256 | + }, |
| 257 | + "password": { |
| 258 | + "type": "string", |
| 259 | + "description": "Azure application password", |
| 260 | + "example": "xuE8Q~fasf" |
| 261 | + } |
| 262 | + }, |
| 263 | + "required": [ |
| 264 | + "subscriptionId", |
| 265 | + "tenantId", |
| 266 | + "appId", |
| 267 | + "password" |
| 268 | + ] |
| 269 | + } |
| 270 | + }, |
| 271 | + "required": [ |
| 272 | + "resourceGroup", |
| 273 | + "clusterName", |
| 274 | + "namespaceName", |
| 275 | + "cloudPlatform", |
| 276 | + "appRegion", |
| 277 | + "credential" |
| 278 | + ] |
| 279 | + } |
| 280 | + } |
| 281 | + } |
| 282 | +} |
0 commit comments