diff --git a/cmoa_pgpatch.yaml b/cmoa_pgpatch.yaml index affe50c..2b91c2a 100755 --- a/cmoa_pgpatch.yaml +++ b/cmoa_pgpatch.yaml @@ -2,6 +2,8 @@ - hosts: cluster become: true gather_facts: true + environment: + KUBECONFIG: /root/.kube/ansible_config vars: cmoa_namespace: imxc pg_version: diff --git a/inventory b/inventory index fdb15b0..5b969cd 100755 --- a/inventory +++ b/inventory @@ -1,11 +1,11 @@ [master] -10.10.43.210 +10.10.43.200 [worker1] -10.10.43.211 +10.10.43.201 [worker2] -10.10.43.212 +10.10.43.202 [cluster:children] master diff --git a/roles/cmoa_install/files/02-base/base/charts/cortex/values.yaml b/roles/cmoa_install/files/02-base/base/charts/cortex/values.yaml index 22fbef5..4e04337 100644 --- a/roles/cmoa_install/files/02-base/base/charts/cortex/values.yaml +++ b/roles/cmoa_install/files/02-base/base/charts/cortex/values.yaml @@ -355,7 +355,7 @@ alertmanager: readOnlyRootFilesystem: true distributor: - replicas: 1 + replicas: 2 service: annotations: {} @@ -458,7 +458,7 @@ distributor: lifecycle: {} ingester: - replicas: 1 + replicas: 3 statefulSet: # -- If true, use a statefulset instead of a deployment for pod management. @@ -737,7 +737,7 @@ ruler: readOnlyRootFilesystem: true querier: - replicas: 1 + replicas: 3 service: annotations: {} @@ -839,7 +839,7 @@ querier: lifecycle: {} query_frontend: - replicas: 1 + replicas: 3 service: annotations: {} diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql index 02903a0..7244d27 100644 --- a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql +++ b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_ddl.psql @@ -1792,12 +1792,14 @@ create table public.audit_log target jsonb ); -CREATE TABLE "intermax" ( - "cluster_id" VARCHAR(128) NOT NULL, - "namespace" VARCHAR(128) NOT NULL, - "url" VARCHAR(256) NULL DEFAULT NULL, - "service_name" VARCHAR(128) NULL DEFAULT NULL, - PRIMARY KEY ("cluster_id", "namespace") +create table public.intermax +( + cluster_id varchar(128) not null, + namespace varchar(128) not null, + url varchar(256), + service_name varchar(128), + constraint intermax_pk + primary key (cluster_id, namespace) ); -- Configuration Table 생성 @@ -1900,4 +1902,4 @@ CREATE TABLE "cmoa_serviceaccount_base" ( "metadata_namespace" TEXT NULL DEFAULT NULL, "secrets" TEXT NULL DEFAULT NULL, PRIMARY KEY ("kube_flatting_time", "cluster_id", "kind", "metadata_uid", "row_index") -); +); \ No newline at end of file diff --git a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql index e200e8d..39b611a 100644 --- a/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql +++ b/roles/cmoa_install/files/03-ddl-dml/postgres/postgres_insert_dml.psql @@ -2623,4 +2623,4 @@ INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,ent VALUES ('count_pod_oomkilled','OOMKilled of Pods By Workload','OOMKilled of Pods By Workload','count by (xm_clst_id, xm_pod_id, xm_cont_name, xm_namespace) (imxc_pod_container_status_terminated_reason_oom{{filter}})','State','Workload','xm_clst_id, xm_namespace, xm_pod_id',TRUE,'CLST:{{$labels.xm_clst_id}} POD:{{$labels.xm_pod_id}} NS:{{$labels.xm_namespace}}.'); -- Last Reason OOMKilled INSERT INTO public.metric_meta2 (id,meta_name,description,expr,resource_type,entity_type,groupby_keys,in_use,message) -VALUES ('count_pod_last_oomkilled','Last OOMKilled of Pods By Workload','Last OOMKilled of Pods By Workload','count by (xm_clst_id, xm_pod_id, xm_cont_name, xm_namespace) (imxc_pod_container_status_last_terminated_reason_oom{{filter}})','State','Workload','xm_clst_id, xm_namespace, xm_pod_id', TRUE,'CLST:{{$labels.xm_clst_id}} POD:{{$labels.xm_pod_id}} NS:{{$labels.xm_namespace}}.'); +VALUES ('count_pod_last_oomkilled','Last OOMKilled of Pods By Workload','Last OOMKilled of Pods By Workload','count by (xm_clst_id, xm_pod_id, xm_cont_name, xm_namespace) (imxc_pod_container_status_last_terminated_reason_oom{{filter}})','State','Workload','xm_clst_id, xm_namespace, xm_pod_id', TRUE,'CLST:{{$labels.xm_clst_id}} POD:{{$labels.xm_pod_id}} NS:{{$labels.xm_namespace}}.'); \ No newline at end of file