Skip to content

Commit

Permalink
chore: add script to generate deploy/static/starboard.yaml (aquasecur…
Browse files Browse the repository at this point in the history
…ity#996)

Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
  • Loading branch information
danielpacak authored Mar 3, 2022
1 parent 8233e5a commit 9f726da
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 18 deletions.
1 change: 1 addition & 0 deletions deploy/crd/ciskubebenchreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crd/clusterconfigauditreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crd/clustervulnerabilityreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crd/configauditreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crd/kubehunterreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 1 addition & 0 deletions deploy/crd/vulnerabilityreports.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
46 changes: 28 additions & 18 deletions deploy/static/starboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,21 +265,26 @@ spec:
type: date
name: Age
description: The age of the report
- jsonPath: .report.summary.dangerCount
- jsonPath: .report.summary.criticalCount
type: integer
name: Danger
name: Critial
priority: 1
description: The number of checks that failed with Danger status
- jsonPath: .report.summary.warningCount
description: The number of failed checks with critial severity
- jsonPath: .report.summary.highCount
type: integer
name: Warning
name: High
priority: 1
description: The number of checks that failed with Warning status
- jsonPath: .report.summary.passCount
description: The number of failed checks with high severity
- jsonPath: .report.summary.mediumCount
type: integer
name: Pass
name: Medium
priority: 1
description: The number of failed checks with medium severity
- jsonPath: .report.summary.lowCount
type: integer
name: Low
priority: 1
description: The number of checks that passed
description: The number of failed checks with low severity
schema:
openAPIV3Schema:
x-kubernetes-preserve-unknown-fields: true
Expand Down Expand Up @@ -317,21 +322,26 @@ spec:
type: date
name: Age
description: The age of the report
- jsonPath: .report.summary.dangerCount
- jsonPath: .report.summary.criticalCount
type: integer
name: Danger
name: Critial
priority: 1
description: The number of checks that failed with Danger status
- jsonPath: .report.summary.warningCount
description: The number of failed checks with critial severity
- jsonPath: .report.summary.highCount
type: integer
name: Warning
name: High
priority: 1
description: The number of checks that failed with Warning status
- jsonPath: .report.summary.passCount
description: The number of failed checks with high severity
- jsonPath: .report.summary.mediumCount
type: integer
name: Pass
name: Medium
priority: 1
description: The number of failed checks with medium severity
- jsonPath: .report.summary.lowCount
type: integer
name: Low
priority: 1
description: The number of checks that passed
description: The number of failed checks with low severity
schema:
openAPIV3Schema:
x-kubernetes-preserve-unknown-fields: true
Expand Down
15 changes: 15 additions & 0 deletions hack/update-starboard.yaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

CRD_ROOT=$SCRIPT_ROOT/deploy/crd
STATIC_ROOT=$SCRIPT_ROOT/deploy/static

cat $CRD_ROOT/vulnerabilityreports.crd.yaml \
$CRD_ROOT/configauditreports.crd.yaml \
$CRD_ROOT/clusterconfigauditreports.crd.yaml \
$CRD_ROOT/ciskubebenchreports.crd.yaml \
$STATIC_ROOT/01-starboard-operator.ns.yaml \
$STATIC_ROOT/02-starboard-operator.rbac.yaml \
$STATIC_ROOT/03-starboard-operator.config.yaml \
$STATIC_ROOT/04-starboard-operator.deployment.yaml > $STATIC_ROOT/starboard.yaml

0 comments on commit 9f726da

Please sign in to comment.