Skip to content

Commit

Permalink
added rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Nov 1, 2023
1 parent 1c4be4b commit 656a670
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 60 deletions.
17 changes: 12 additions & 5 deletions sql/20231031113103_update_rakkess.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
ALTER TABLE rakkess
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 10 MINUTE
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS new_rakkess (
ClusterName String,
Name String,
Create String,
Delete String,
List String,
Update String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
17 changes: 12 additions & 5 deletions sql/20231031125103_update_DeprecatedAPIs.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
ALTER TABLE DeprecatedAPIs
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS DeprecatedAPIs (
ClusterName String,
ObjectName String,
Description String,
Kind String,
Deprecated UInt8,
Scope String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
20 changes: 15 additions & 5 deletions sql/20231031125304_update_DeletedAPIs.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
ALTER TABLE DeletedAPIs
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

CREATE TABLE IF NOT EXISTS DeletedAPIs (
ClusterName String,
ObjectName String,
Group String,
Kind String,
Version String,
Name String,
Deleted UInt8,
Scope String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
20 changes: 15 additions & 5 deletions sql/20231031125739_update_jfrogcontainerpush.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
ALTER TABLE jfrogcontainerpush
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS jfrogcontainerpush (
Domain String,
EventType String,
RegistryURL String,
RepositoryName String,
SHAID String,
Size Int32,
ImageName String,
Tag String,
Event String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
16 changes: 11 additions & 5 deletions sql/20231031130038_update_getall_resources.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
ALTER TABLE getall_resources
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS getall_resources (
ClusterName String,
Namespace String,
Kind String,
Resource String,
Age String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
19 changes: 14 additions & 5 deletions sql/20231031132022_update_outdated_images.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
ALTER TABLE outdated_images
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

CREATE TABLE IF NOT EXISTS outdated_images (
ClusterName String,
Namespace String,
Pod String,
CurrentImage String,
CurrentTag String,
LatestVersion String,
VersionsBehind Int64,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
15 changes: 10 additions & 5 deletions sql/20231031133328_update_kubescore.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
ALTER TABLE kubescore
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS kubescore (
id UUID,
namespace String,
cluster_name String,
recommendations String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
26 changes: 21 additions & 5 deletions sql/20231031133706_update_trivy_vul.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
ALTER TABLE trivy_vul
ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS trivy_vul (
id UUID,
cluster_name String,
namespace String,
kind String,
name String,
vul_id String,
vul_vendor_ids String,
vul_pkg_id String,
vul_pkg_name String,
vul_pkg_path String,
vul_installed_version String,
vul_fixed_version String,
vul_title String,
vul_severity String,
vul_published_date DateTime('UTC'),
vul_last_modified_date DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
27 changes: 22 additions & 5 deletions sql/20231031134029_update_trivy_misconfig.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
ALTER TABLE trivy_misconfig
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

CREATE TABLE IF NOT EXISTS trivy_misconfig (
id UUID,
cluster_name String,
namespace String,
kind String,
name String,
misconfig_id String,
misconfig_avdid String,
misconfig_type String,
misconfig_title String,
misconfig_desc String,
misconfig_msg String,
misconfig_query String,
misconfig_resolution String,
misconfig_severity String,
misconfig_status String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
22 changes: 17 additions & 5 deletions sql/20231031134236_update_trivyimage.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
ALTER TABLE trivyimage
ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS trivyimage (
id UUID,
cluster_name String,
artifact_name String,
vul_id String,
vul_pkg_id String,
vul_pkg_name String,
vul_installed_version String,
vul_fixed_version String,
vul_title String,
vul_severity String,
vul_published_date DateTime('UTC'),
vul_last_modified_date DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
18 changes: 13 additions & 5 deletions sql/20231031134526_update_dockerhubbuild.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
ALTER TABLE dockerhubbuild
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

CREATE TABLE IF NOT EXISTS dockerhubbuild (
PushedBy String,
ImageTag String,
RepositoryName String,
DateCreated String,
Owner String,
Event String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
18 changes: 13 additions & 5 deletions sql/20231031134807_update_azurecontainerpush.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
ALTER TABLE azurecontainerpush
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
CREATE TABLE IF NOT EXISTS azurecontainerpush (
RegistryURL String,
RepositoryName String,
Tag String,
ImageName String,
Event String,
Size Int32,
SHAID String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

0 comments on commit 656a670

Please sign in to comment.