Skip to content

Commit

Permalink
fix(kps): Remove duplicate apiserver / unused keepalived target (2.5) (
Browse files Browse the repository at this point in the history
…#1492)

* 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 90b170c)

* 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

* ci(gitlint): Increase body-max-line-length

---------

Co-authored-by: Grace Do <xgrace@gmail.com>
  • Loading branch information
github-actions[bot] and gracedo authored Aug 17, 2023
1 parent a47459c commit 29be41a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 50 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: "Lint PR"

on:
pull_request_target:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

jobs:
main:
Expand All @@ -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 }}
5 changes: 4 additions & 1 deletion .gitlint
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[general]
contrib=contrib-title-conventional-commits
ignore=body-is-missing
ignore=body-is-missing,title-max-length

[body-max-line-length]
line-length=120
48 changes: 0 additions & 48 deletions services/kube-prometheus-stack/44.2.1/defaults/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 29be41a

Please sign in to comment.