From 85a4e16c699cd6ed449fac2042c70b8fedb822b3 Mon Sep 17 00:00:00 2001 From: Grace Do Date: Wed, 16 Aug 2023 15:17:33 -0700 Subject: [PATCH 1/3] fix(kps): Remove duplicate apiserver and unused keepalived scrapeconfig (#1483) * fix(kps): Remove duplicate apiserver scrapeconfig It looks like the KPS chart already defines a servicemonitor which scrapes the apiserver metrics. Our additional scrapeconfig definition is resulting in scraping the same apiserver targets and generating duplicate metrics. We can remove our scrape config and rely on the chart created servicemonitor. * fix(kps): Remove unnecessary keepalived scrape target (cherry picked from commit 90b170c20ef8d62639f83b15ef0de7bf1b7b07ab) --- .../44.2.1/defaults/cm.yaml | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/services/kube-prometheus-stack/44.2.1/defaults/cm.yaml b/services/kube-prometheus-stack/44.2.1/defaults/cm.yaml index 36004197e..da0adccc4 100644 --- a/services/kube-prometheus-stack/44.2.1/defaults/cm.yaml +++ b/services/kube-prometheus-stack/44.2.1/defaults/cm.yaml @@ -160,22 +160,6 @@ data: - configMapRef: name: cluster-info-configmap additionalScrapeConfigs: - # Kubernetes API - - job_name: 'kubernetes-apiserver' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - default - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: kubernetes;https # Kubernetes pods - job_name: 'kubernetes-pods' kubernetes_sd_configs: @@ -266,38 +250,6 @@ data: - source_labels: [__meta_kubernetes_namespace] target_label: namespace action: replace - - job_name: 'kubernetes-keepalived' - metrics_path: /snmp - params: - target: ["127.0.0.1:6161"] - module: ["keepalived"] - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - kubernetes_sd_configs: - - role: pod - namespaces: - names: - - kube-system - relabel_configs: - - source_labels: [__meta_kubernetes_pod_container_port_protocol] - regex: TCP - action: keep - - source_labels: [__meta_kubernetes_pod_container_port_number] - regex: "6161" - action: keep - - source_labels: [__meta_kubernetes_pod_container_port_name] - target_label: endpoint - action: replace - - source_labels: [__meta_kubernetes_pod_node_name] - target_label: node - action: replace - - source_labels: [__meta_kubernetes_pod_name] - target_label: pod - action: replace - - source_labels: [__meta_kubernetes_namespace] - target_label: namespace - action: replace enableAdminAPI: true walCompression: true # secrets: From 60fb92143454c5db953a50efccbdb13af07a0c94 Mon Sep 17 00:00:00 2001 From: Grace Do Date: Thu, 27 Jul 2023 11:39:46 -0700 Subject: [PATCH 2/3] ci: Validate PR title length instead of commit (#1433) * ci(pre-commit): Ignore commit title length in gitlint config, validate in PR title instead * fix(gha): Remove invalid pull_request_target action for pr linter --- .github/workflows/lint-pr.yaml | 8 +++++++- .gitlint | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index ad6df65f2..59a8cd73a 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -1,11 +1,12 @@ name: "Lint PR" on: - pull_request_target: + pull_request: types: - opened - edited - synchronize + - reopened jobs: main: @@ -15,3 +16,8 @@ jobs: - uses: amannn/action-semantic-pull-request@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: deepakputhraya/action-pr-title@master + with: + max_length: 72 # Max length of PR title + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitlint b/.gitlint index 15251e34a..ff4f968d1 100644 --- a/.gitlint +++ b/.gitlint @@ -1,3 +1,3 @@ [general] contrib=contrib-title-conventional-commits -ignore=body-is-missing +ignore=body-is-missing,title-max-length From 26ecf53dede6a5cd7673d07fc39e6615882c7cae Mon Sep 17 00:00:00 2001 From: Grace Do Date: Wed, 16 Aug 2023 16:15:16 -0700 Subject: [PATCH 3/3] ci(gitlint): Increase body-max-line-length --- .gitlint | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlint b/.gitlint index ff4f968d1..100011b37 100644 --- a/.gitlint +++ b/.gitlint @@ -1,3 +1,6 @@ [general] contrib=contrib-title-conventional-commits ignore=body-is-missing,title-max-length + +[body-max-line-length] +line-length=120