Skip to content

Commit

Permalink
empty out the default configs
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhan-yilmaz committed Oct 22, 2024
1 parent 5232816 commit bcc0378
Showing 1 changed file with 5 additions and 89 deletions.
94 changes: 5 additions & 89 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,91 +76,7 @@ steampipe:
# source_types = ["deployed"]
# }

initDbSqlScripts:
cpu-milicore-func.sql: |
CREATE OR REPLACE FUNCTION public.cpu_m (cpu text)
RETURNS bigint
LANGUAGE plpgsql
AS $$
DECLARE
v bigint;
BEGIN
IF cpu like '%m' THEN
-- https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
-- m fractions get rounded up
SELECT
ceiling(trim(trailing 'm' from cpu)::numeric) INTO v;
ELSE
SELECT
cpu::numeric * 1000 INTO v;
END IF;
RETURN v;
END;
$$;
memory-bytes-func.sql: |
CREATE OR REPLACE FUNCTION memory_bytes (memory text)
RETURNS bigint
LANGUAGE plpgsql
AS $$
DECLARE
v bigint;
BEGIN
-- https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
-- base 10: m | "" | k | M | G | T | P | E
-- base 2: Ki | Mi | Gi | Ti | Pi | Ei
-- m fractions get rounded up
CASE --
WHEN memory LIKE '%m' THEN
SELECT
ceiling(trim(TRAILING 'm' FROM memory)::numeric / 1000) INTO v;
WHEN memory LIKE '%k' THEN
SELECT
trim(TRAILING 'k' FROM memory)::numeric * 1000 INTO v;
WHEN memory LIKE '%M' THEN
SELECT
trim(TRAILING 'M' FROM memory)::numeric * 1000_000 INTO v;
WHEN memory LIKE '%G' THEN
SELECT
trim(TRAILING 'G' FROM memory)::numeric * 1000_000_000 INTO v;
WHEN memory LIKE '%T' THEN
SELECT
trim(TRAILING 'T' FROM memory)::numeric * 1000_000_000_000 INTO v;
WHEN memory LIKE '%P' THEN
SELECT
trim(TRAILING 'P' FROM memory)::numeric * 1000_000_000_000_000 INTO v;
WHEN memory LIKE '%E' THEN
SELECT
trim(TRAILING 'E' FROM memory)::numeric * 1000_000_000_000_000 INTO v;
WHEN memory LIKE '%Ki' THEN
SELECT
trim(TRAILING 'Ki' FROM memory)::numeric * 1024 INTO v;
WHEN memory LIKE '%Mi' THEN
SELECT
trim(TRAILING 'Mi' FROM memory)::numeric * 1024 * 1024 INTO v;
WHEN memory LIKE '%Gi' THEN
SELECT
trim(TRAILING 'Gi' FROM memory)::numeric * 1024 * 1024 * 1024 INTO v;
WHEN memory LIKE '%Ti' THEN
SELECT
trim(TRAILING 'Ti' FROM memory)::numeric * 1024 * 1024 * 1024 * 1024 INTO v;
WHEN memory LIKE '%Pi' THEN
SELECT
trim(TRAILING 'Pi' FROM memory)::numeric * 1024 * 1024 * 1024 * 1024 * 1024 INTO v;
WHEN memory LIKE '%Ei' THEN
SELECT
trim(TRAILING 'Ei' FROM memory)::numeric * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 INTO v;
--
--
ELSE
SELECT
memory::bigint INTO v;
END CASE;
RETURN v;
END;
$$;
initDbSqlScripts: {}

replicaCount: 1
containerPort: 9193
Expand Down Expand Up @@ -214,17 +130,17 @@ powerpipe:
# Additional Secret Env variables for powerpipe
secretEnvVars: {}

envVars:
envVars: {}
# INSTALL_MODS will install Powerpipe modes at runtime
# Note: INSTALL_MODS should be space separated
# Take look at available mods: https://hub.powerpipe.io/

# INSTALL_MODS: "github.com/turbot/steampipe-mod-aws-insights github.com/turbot/steampipe-mod-aws-thrifty github.com/turbot/steampipe-mod-aws-top-10"

# following yaml syntax (>) will merge newlines with spaces
INSTALL_MODS: >
github.com/turbot/steampipe-mod-kubernetes-insights
github.com/turbot/steampipe-mod-kubernetes-compliance
# INSTALL_MODS: >
# github.com/turbot/steampipe-mod-kubernetes-insights
# github.com/turbot/steampipe-mod-kubernetes-compliance

replicaCount: 1
containerPort: 9033
Expand Down

0 comments on commit bcc0378

Please sign in to comment.