|
339 | 339 | <v-expansion-panel-header class="text-uppercase text-caption-2 font-weight-medium secondary">Security</v-expansion-panel-header> |
340 | 340 | <v-expansion-panel-content class="secondary"> |
341 | 341 |
|
342 | | - <v-row> |
| 342 | + <v-row v-if="deploymentstrategy == 'git'"> |
343 | 343 | <v-col |
344 | 344 | cols="12" |
345 | 345 | md="6" |
346 | 346 | > |
347 | 347 | <v-switch |
348 | | - v-model="security.vulnerabilityScans" |
349 | | - label="Enable Trivy vulnerabfility scans" |
| 348 | + v-model="buildpack.run.readOnlyAppStorage" |
| 349 | + label="Read only app volume" |
350 | 350 | color="primary" |
351 | 351 | ></v-switch> |
352 | 352 | </v-col> |
| 353 | + <v-col |
| 354 | + cols="12" |
| 355 | + md="6" |
| 356 | + > |
| 357 | + </v-col> |
| 358 | + </v-row> |
| 359 | + |
| 360 | + <v-row> |
353 | 361 | <v-col |
354 | 362 | cols="12" |
355 | 363 | md="6" |
|
360 | 368 | color="primary" |
361 | 369 | ></v-switch> |
362 | 370 | </v-col> |
| 371 | + <v-col |
| 372 | + cols="12" |
| 373 | + md="6" |
| 374 | + > |
| 375 | + <v-switch |
| 376 | + v-model="security.vulnerabilityScans" |
| 377 | + label="Enable Trivy vulnerabfility scans" |
| 378 | + color="primary" |
| 379 | + ></v-switch> |
| 380 | + </v-col> |
363 | 381 | </v-row> |
364 | 382 |
|
365 | 383 | <v-row> |
@@ -1029,6 +1047,7 @@ export default { |
1029 | 1047 | }, |
1030 | 1048 | image: { |
1031 | 1049 | run: { |
| 1050 | + readOnlyAppStorage: true, |
1032 | 1051 | command: '', |
1033 | 1052 | securityContext: { |
1034 | 1053 | readOnlyRootFilesystem: true, |
@@ -1305,6 +1324,11 @@ export default { |
1305 | 1324 | if (this.cronjobs.length > 0) { |
1306 | 1325 | this.panel.push(4) |
1307 | 1326 | } |
| 1327 | +
|
| 1328 | + // Backward compability older v1.11.1 |
| 1329 | + if (this.buildpack.run && this.buildpack.run.readOnlyAppStorage === undefined) { |
| 1330 | + this.buildpack.run.readOnlyAppStorage = true; |
| 1331 | + } |
1308 | 1332 | }); |
1309 | 1333 | }, |
1310 | 1334 | changeName(name) { |
@@ -1344,6 +1368,11 @@ export default { |
1344 | 1368 | */ |
1345 | 1369 | } |
1346 | 1370 |
|
| 1371 | + // Backward compability older v1.11.1 |
| 1372 | + if (this.buildpack.run && this.buildpack.run.readOnlyAppStorage === undefined) { |
| 1373 | + this.buildpack.run.readOnlyAppStorage = true; |
| 1374 | + } |
| 1375 | +
|
1347 | 1376 | }); |
1348 | 1377 | }, |
1349 | 1378 | loadStorageClasses() { |
@@ -1472,6 +1501,11 @@ export default { |
1472 | 1501 | this.addons= response.data.spec.addons || []; |
1473 | 1502 | this.security.vulnerabilityScans = response.data.spec.vulnerabilityscan.enabled; |
1474 | 1503 | this.ingress = response.data.spec.ingress || {}; |
| 1504 | +
|
| 1505 | + // Backward compability older v1.11.1 |
| 1506 | + if (this.buildpack.run && this.buildpack.run.readOnlyAppStorage === undefined) { |
| 1507 | + this.buildpack.run.readOnlyAppStorage = true; |
| 1508 | + } |
1475 | 1509 | }); |
1476 | 1510 | } |
1477 | 1511 | }, |
@@ -1580,34 +1614,7 @@ export default { |
1580 | 1614 | security: this.security, |
1581 | 1615 | ingress: this.ingress, |
1582 | 1616 | } |
1583 | | -/* |
1584 | | - if (this.security.vulnerabilityScans) { |
1585 | | - postdata.vulnerabilityscan = { |
1586 | | - enabled: true, |
1587 | | - image: { |
1588 | | - repository: "aquasec/trivy", |
1589 | | - tag: "latest", |
1590 | | - }, |
1591 | | - } |
1592 | | - } else { |
1593 | | - postdata.vulnerabilityscan = { |
1594 | | - enabled: false, |
1595 | | - } |
1596 | | - } |
1597 | | -*/ |
1598 | 1617 |
|
1599 | | -/* |
1600 | | - postdata.image.run.securityContext = { |
1601 | | - readOnlyRootFilesystem: this.security.readOnlyRootFilesystem, |
1602 | | - runAsNonRoot: this.security.runAsNonRoot, |
1603 | | - runAsUser: parseInt(this.security.runAsUser), |
1604 | | - runAsGroup: parseInt(this.security.runAsGroup), |
1605 | | - capabilities: { |
1606 | | - add: this.security.capabilities.add, |
1607 | | - drop: this.security.capabilities.drop, |
1608 | | - }, |
1609 | | - } |
1610 | | -*/ |
1611 | 1618 | axios.put(`/api/pipelines/${this.pipeline}/${this.phase}/${this.app}`, postdata |
1612 | 1619 | // eslint-disable-next-line no-unused-vars |
1613 | 1620 | ).then(response => { |
|
0 commit comments