|
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> |
|
363 | 363 | md="6" |
364 | 364 | > |
365 | 365 | <v-switch |
366 | | - v-model="buildpack.run.readOnlyAppStorage" |
367 | | - label="Read only app storage" |
| 366 | + v-model="buildpack.run.securityContext.readOnlyRootFilesystem" |
| 367 | + label="Read only root filesystem" |
368 | 368 | color="primary" |
369 | 369 | ></v-switch> |
370 | 370 | </v-col> |
|
373 | 373 | md="6" |
374 | 374 | > |
375 | 375 | <v-switch |
376 | | - v-model="buildpack.run.securityContext.readOnlyRootFilesystem" |
377 | | - label="Read only root filesystem" |
| 376 | + v-model="security.vulnerabilityScans" |
| 377 | + label="Enable Trivy vulnerabfility scans" |
378 | 378 | color="primary" |
379 | 379 | ></v-switch> |
380 | 380 | </v-col> |
@@ -1324,6 +1324,11 @@ export default { |
1324 | 1324 | if (this.cronjobs.length > 0) { |
1325 | 1325 | this.panel.push(4) |
1326 | 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 | + } |
1327 | 1332 | }); |
1328 | 1333 | }, |
1329 | 1334 | changeName(name) { |
@@ -1363,6 +1368,11 @@ export default { |
1363 | 1368 | */ |
1364 | 1369 | } |
1365 | 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 | +
|
1366 | 1376 | }); |
1367 | 1377 | }, |
1368 | 1378 | loadStorageClasses() { |
@@ -1491,6 +1501,11 @@ export default { |
1491 | 1501 | this.addons= response.data.spec.addons || []; |
1492 | 1502 | this.security.vulnerabilityScans = response.data.spec.vulnerabilityscan.enabled; |
1493 | 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 | + } |
1494 | 1509 | }); |
1495 | 1510 | } |
1496 | 1511 | }, |
@@ -1599,34 +1614,7 @@ export default { |
1599 | 1614 | security: this.security, |
1600 | 1615 | ingress: this.ingress, |
1601 | 1616 | } |
1602 | | -/* |
1603 | | - if (this.security.vulnerabilityScans) { |
1604 | | - postdata.vulnerabilityscan = { |
1605 | | - enabled: true, |
1606 | | - image: { |
1607 | | - repository: "aquasec/trivy", |
1608 | | - tag: "latest", |
1609 | | - }, |
1610 | | - } |
1611 | | - } else { |
1612 | | - postdata.vulnerabilityscan = { |
1613 | | - enabled: false, |
1614 | | - } |
1615 | | - } |
1616 | | -*/ |
1617 | 1617 |
|
1618 | | -/* |
1619 | | - postdata.image.run.securityContext = { |
1620 | | - readOnlyRootFilesystem: this.security.readOnlyRootFilesystem, |
1621 | | - runAsNonRoot: this.security.runAsNonRoot, |
1622 | | - runAsUser: parseInt(this.security.runAsUser), |
1623 | | - runAsGroup: parseInt(this.security.runAsGroup), |
1624 | | - capabilities: { |
1625 | | - add: this.security.capabilities.add, |
1626 | | - drop: this.security.capabilities.drop, |
1627 | | - }, |
1628 | | - } |
1629 | | -*/ |
1630 | 1618 | axios.put(`/api/pipelines/${this.pipeline}/${this.phase}/${this.app}`, postdata |
1631 | 1619 | // eslint-disable-next-line no-unused-vars |
1632 | 1620 | ).then(response => { |
|
0 commit comments