@@ -97,13 +97,15 @@ CREATE TABLE IF NOT EXISTS outdated_images (
97
97
`
98
98
99
99
const kubescoreTable DBStatement = `
100
- CREATE TABLE IF NOT EXISTS kubescore (
101
- id UUID,
102
- namespace String,
103
- cluster_name String,
104
- recommendations String
105
- ) engine=File(TabSeparated)
106
- `
100
+ CREATE TABLE IF NOT EXISTS kubescore (
101
+ id UUID,
102
+ namespace String,
103
+ cluster_name String,
104
+ recommendations String,
105
+ EventTime DateTime('UTC')
106
+ ) engine=File(TabSeparated)
107
+ `
108
+
107
109
const trivyTableVul DBStatement = `
108
110
CREATE TABLE IF NOT EXISTS trivy_vul (
109
111
id UUID,
@@ -236,7 +238,7 @@ const InsertDeletedApi DBStatement = "INSERT INTO DeletedAPIs (ClusterName, Obje
236
238
const InsertKubvizEvent DBStatement = "INSERT INTO events (ClusterName, Id, EventTime, OpType, Name, Namespace, Kind, Message, Reason, Host, Event, FirstTime, LastTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
237
239
const clickhouseExperimental DBStatement = `SET allow_experimental_object_type=1;`
238
240
const containerGithubTable DBStatement = `CREATE table IF NOT EXISTS container_github(event JSON) ENGINE = MergeTree ORDER BY tuple();`
239
- const InsertKubeScore string = "INSERT INTO kubescore (id, namespace, cluster_name, recommendations) VALUES (?, ?, ?, ?)"
241
+ const InsertKubeScore string = "INSERT INTO kubescore (id, namespace, cluster_name, recommendations, EventTime ) VALUES (?, ?, ?, ?, ?)"
240
242
const InsertTrivyVul string = "INSERT INTO trivy_vul (id, cluster_name, namespace, kind, name, vul_id, vul_vendor_ids, vul_pkg_id, vul_pkg_name, vul_pkg_path, vul_installed_version, vul_fixed_version, vul_title, vul_severity, vul_published_date, vul_last_modified_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?. ?)"
241
243
const InsertTrivyImage string = "INSERT INTO trivyimage (id, cluster_name, artifact_name, vul_id, vul_pkg_id, vul_pkg_name, vul_installed_version, vul_fixed_version, vul_title, vul_severity, vul_published_date, vul_last_modified_date) VALUES ( ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
242
244
const InsertTrivyMisconfig string = "INSERT INTO trivy_misconfig (id, cluster_name, namespace, kind, name, misconfig_id, misconfig_avdid, misconfig_type, misconfig_title, misconfig_desc, misconfig_msg, misconfig_query, misconfig_resolution, misconfig_severity, misconfig_status, EventTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
0 commit comments