-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add chainsaw basic test (#1415)
* test: add chainsaw basic test Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix debug logs Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix debug logs Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix debug logs Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix debug logs Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix debug logs Signed-off-by: Charles-Edouard Brétéché <[email protected]> --------- Signed-off-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: Hubert Stefanski <[email protected]>
- Loading branch information
1 parent
e1aa86d
commit bbf504a
Showing
3 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: grafana-deployment | ||
ownerReferences: | ||
- apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
name: grafana | ||
spec: {} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: grafana-service | ||
ownerReferences: | ||
- apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
name: grafana | ||
spec: {} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: grafana-ini | ||
ownerReferences: | ||
- apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
name: grafana | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: grafana-plugins | ||
ownerReferences: | ||
- apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
name: grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
name: basic | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- apply: | ||
file: resources.yaml | ||
- assert: | ||
file: assertions.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
metadata: | ||
name: grafana | ||
labels: | ||
dashboards: "grafana" | ||
spec: | ||
config: | ||
log: | ||
mode: "console" | ||
auth: | ||
disable_login_form: "false" | ||
security: | ||
admin_user: root | ||
admin_password: secret | ||
--- | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: GrafanaDashboard | ||
metadata: | ||
name: grafanadashboard-sample | ||
spec: | ||
resyncPeriod: 30s | ||
instanceSelector: | ||
matchLabels: | ||
dashboards: "grafana" | ||
json: > | ||
{ | ||
"id": null, | ||
"title": "Simple Dashboard", | ||
"tags": [], | ||
"style": "dark", | ||
"timezone": "browser", | ||
"editable": true, | ||
"hideControls": false, | ||
"graphTooltip": 1, | ||
"panels": [], | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": { | ||
"time_options": [], | ||
"refresh_intervals": [] | ||
}, | ||
"templating": { | ||
"list": [] | ||
}, | ||
"annotations": { | ||
"list": [] | ||
}, | ||
"refresh": "5s", | ||
"schemaVersion": 17, | ||
"version": 0, | ||
"links": [] | ||
} |