Skip to content

Commit

Permalink
chore(netdata): update every 3s (#17953)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored Jul 11, 2024
1 parent bde5fa1 commit 16839fb
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,76 @@
controller:
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 200m
memory: 512Mi
limits:
cpu: 500m
memory: 1Gi
server:
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 256Mi
repoServer:
resources:
requests:
cpu: 50m
memory: 64Mi
cpu: 500m
memory: 512Mi
limits:
cpu: 100m
memory: 128Mi
cpu: 1000m
memory: 1Gi
applicationSet:
resources:
requests:
cpu: 10m
memory: 64Mi
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
memory: 256Mi
dex:
enabled: true
resources:
requests:
cpu: 10m
memory: 64Mi
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
memory: 256Mi
initImage:
resources:
requests:
cpu: 10m
memory: 64Mi
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
memory: 256Mi
redisSecretInit:
enabled: true
resources:
requests:
cpu: 100m
memory: 64Mi
memory: 128Mi
limits:
cpu: 200m
memory: 128Mi
memory: 256Mi
redis:
enabled: true
resources:
requests:
cpu: 10m
memory: 64Mi
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
memory: 256Mi
notifications:
enabled: true
resources:
requests:
cpu: 10m
memory: 64Mi
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 128Mi
memory: 256Mi
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,19 @@ module "hm_amazon_ebs_csi_driver_iam_role" {
module "hm_kubernetes_namespace_hm_argo_cd" {
source = "../../../../modules/kubernetes/hm_kubernetes_namespace"
kubernetes_namespace = "${var.environment}-hm-argo-cd"
labels = {
"goldilocks.fairwinds.com/enabled" = "true"
}
depends_on = [
module.hm_amazon_eks_cluster
]
}
module "hm_argo_cd_helm_chart" {
source = "../../../../modules/kubernetes/hm_argo_cd_helm_chart"
name = "hm-argo-cd"
# https://artifacthub.io/packages/helm/argo/argo-cd
argo_cd_version = "7.2.0"
source = "../../../../modules/kubernetes/hm_helm_chart"
repository = "https://argoproj.github.io/argo-helm"
chart_name = "argo-cd"
chart_version = "7.3.5" # https://artifacthub.io/packages/helm/argo/argo-cd
release_name = "hm-argo-cd"
namespace = module.hm_kubernetes_namespace_hm_argo_cd.namespace
my_values_yaml_path = "files/argo-cd/helm/my-values.yaml"
environment = var.environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "aws_mskconnect_connector" "hm_amazon_msk_connector" {
"buffer.count.records" = 10000
"buffer.flush.time" = 5
"buffer.size.bytes" = 20000000
"snowflake.url.name" = "hongbomiao.snowflakecomputing.com:443"
"snowflake.url.name" = "hongbomiao.snowflakecomputing.com"
"snowflake.user.name" = var.snowflake_user_name
"snowflake.private.key" = var.snowflake_private_key
"snowflake.private.key.passphrase" = var.snowflake_private_key_passphrase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ terraform {
}
}

# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role
# https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect-service-execution-role.html
locals {
aws_iam_role_name_prefix = "AmazonMSKConnectorRole"
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role
resource "aws_iam_role" "hm_amazon_msk_connector_iam_role" {
name = "AmazonMSKConnectorServiceRole-${var.amazon_msk_connector_name}"
name = "${local.aws_iam_role_name_prefix}-${var.amazon_msk_connector_name}"
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [
Expand All @@ -23,14 +26,14 @@ resource "aws_iam_role" "hm_amazon_msk_connector_iam_role" {
]
})
tags = {
Environment = var.environment
Team = var.team
ResourceName = "AmazonMSKConnectorServiceRole-${var.amazon_msk_connector_name}"
Environment = var.environment
Team = var.team
Name = "${local.aws_iam_role_name_prefix}-${var.amazon_msk_connector_name}"
}
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy
resource "aws_iam_role_policy" "hm_amazon_msk_connector_iam_role_policy" {
name = "AmazonMSKConnectorServicePolicyForMSK-${var.amazon_msk_connector_name}"
resource "aws_iam_role_policy" "hm_amazon_msk_connector_iam_role_msk_policy" {
name = "${local.aws_iam_role_name_prefix}MSKPolicy-${var.amazon_msk_connector_name}"
role = aws_iam_role.hm_amazon_msk_connector_iam_role.name
policy = jsonencode({
Version = "2012-10-17"
Expand Down Expand Up @@ -92,8 +95,8 @@ resource "aws_iam_role_policy" "hm_amazon_msk_connector_iam_role_policy" {
})
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy
resource "aws_iam_role_policy" "hm_aws_glue_databrew_iam_role_input_policy" {
name = "AmazonMSKConnectorServicePolicyForMSKPluginS3-${var.amazon_msk_connector_name}"
resource "aws_iam_role_policy" "hm_amazon_msk_connector_iam_role_plugin_s3_policy" {
name = "${local.aws_iam_role_name_prefix}PluginS3Policy-${var.amazon_msk_connector_name}"
role = aws_iam_role.hm_amazon_msk_connector_iam_role.name
policy = jsonencode({
Version = "2012-10-17"
Expand All @@ -113,8 +116,8 @@ resource "aws_iam_role_policy" "hm_aws_glue_databrew_iam_role_input_policy" {
})
}
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy
resource "aws_iam_role_policy" "hm_aws_glue_databrew_iam_role_kafka_worker_log_s3_policy" {
name = "AmazonMSKConnectorServicePolicyForMSKLogS3-${var.amazon_msk_connector_name}"
resource "aws_iam_role_policy" "hm_amazon_msk_connector_iam_role_log_s3_policy" {
name = "${local.aws_iam_role_name_prefix}LogS3Policy-${var.amazon_msk_connector_name}"
role = aws_iam_role.hm_amazon_msk_connector_iam_role.name
policy = jsonencode({
Version = "2012-10-17"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
terraform {
required_providers {
helm = {
source = "hashicorp/helm"
}
}
}

# https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release
resource "helm_release" "hm_helm_chart" {
repository = var.repository
chart = var.chart_name
version = var.chart_version
name = var.release_name
namespace = var.namespace
values = var.my_values_yaml_path != "" ? [file(var.my_values_yaml_path)] : []
reset_values = true
wait = true
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
variable "name" {
variable "repository" {
type = string
}
variable "argo_cd_version" {
variable "chart_name" {
type = string
}
variable "my_values_yaml_path" {
variable "chart_version" {
type = string
}
variable "release_name" {
type = string
}
variable "my_values_yaml_path" {
type = string
default = ""
}
variable "namespace" {
type = string
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
sources:
- repoURL: https://airbytehq.github.io/helm-charts
# https://artifacthub.io/packages/helm/airbyte/airbyte
targetRevision: 0.233.2
targetRevision: 0.282.0
chart: airbyte
helm:
releaseName: hm-airbyte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
source:
repoURL: https://charts.bitnami.com/bitnami
# https://artifacthub.io/packages/helm/bitnami/external-dns
targetRevision: 8.0.0
targetRevision: 8.2.1
chart: external-dns
helm:
releaseName: hm-external-dns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
sources:
- repoURL: https://netdata.github.io/helmchart
# https://artifacthub.io/packages/helm/netdata/netdata
targetRevision: 3.7.94
targetRevision: 3.7.95
chart: netdata
helm:
releaseName: hm-netdata
Expand All @@ -28,18 +28,48 @@ spec:
persistence: true
storageclass: hm-netdata-storage-class
volumesize: 1Gi
parent:
enabled: true
port: 19999
resources:
requests:
cpu: 100m
memory: 512Mi
limits:
cpu: 200m
memory: 1Gi
resources:
requests:
cpu: 100m
memory: 1Gi
limits:
cpu: 200m
memory: 2Gi
child:
enabled: true
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
configs:
kubelet:
enabled: true
data: |
update_every: 3
autodetection_retry: 0
jobs:
- url: http://127.0.0.1:10255/metrics
- url: https://localhost:10250/metrics
tls_skip_verify: yes
kubeproxy:
enabled: true
data: |
update_every: 3
autodetection_retry: 0
jobs:
- url: http://127.0.0.1:10249/metrics
k8sState:
enabled: true
configs:
go.d-k8s_state:
enabled: true
data: |
jobs:
- name: k8s_state
update_every: 3
resources:
requests:
cpu: 50m
Expand Down

0 comments on commit 16839fb

Please sign in to comment.