diff --git a/charts/newrelic-infrastructure/Chart.yaml b/charts/newrelic-infrastructure/Chart.yaml index 9cdc53528..d6a0e2309 100644 --- a/charts/newrelic-infrastructure/Chart.yaml +++ b/charts/newrelic-infrastructure/Chart.yaml @@ -8,8 +8,8 @@ sources: - https://github.com/newrelic/nri-kubernetes/tree/master/charts/newrelic-infrastructure - https://github.com/newrelic/infrastructure-agent/ -version: 3.7.4 -appVersion: 3.4.0 +version: 3.8.0 +appVersion: 3.4.1 dependencies: - name: common-library diff --git a/charts/newrelic-infrastructure/tests/configmap_cp_scraper_test.yaml b/charts/newrelic-infrastructure/tests/configmap_cp_scraper_test.yaml index 073710145..79270174d 100644 --- a/charts/newrelic-infrastructure/tests/configmap_cp_scraper_test.yaml +++ b/charts/newrelic-infrastructure/tests/configmap_cp_scraper_test.yaml @@ -102,6 +102,14 @@ tests: matchNode: true namespace: kube-system selector: k8s-app=kube-scheduler + - endpoints: + - auth: + type: bearer + insecureSkipVerify: true + url: https://localhost:10259 + matchNode: true + namespace: openshift-kube-scheduler + selector: app=openshift-kube-scheduler,scheduler=true - endpoints: - auth: type: bearer diff --git a/charts/newrelic-infrastructure/values.yaml b/charts/newrelic-infrastructure/values.yaml index 0f303e783..b0ebd3c1d 100644 --- a/charts/newrelic-infrastructure/values.yaml +++ b/charts/newrelic-infrastructure/values.yaml @@ -22,21 +22,21 @@ images: # @default -- See `values.yaml` forwarder: pullPolicy: IfNotPresent - tag: 1.27.4 + tag: 1.28.0 repository: newrelic/k8s-events-forwarder registry: "" # -- Image for the New Relic Infrastructure Agent plus integrations. # @default -- See `values.yaml` agent: pullPolicy: IfNotPresent - tag: 2.8.20 + tag: 2.8.22 repository: newrelic/infrastructure-bundle registry: "" # -- Image for the New Relic Kubernetes integration. # @default -- See `values.yaml` integration: pullPolicy: IfNotPresent - tag: 3.4.0 + tag: 3.4.1 repository: newrelic/nri-kubernetes registry: "" @@ -274,8 +274,8 @@ controlPlane: type: bearer # Openshift users might want to remove previous autodiscover entries and add this one instead. # Manual steps are required to create a secret containing the required TLS certificates to connect to etcd. - # - selector: "k8s-app=etcd" - # namespace: kube-system + # - selector: "app=etcd,etcd=true,k8s-app=etcd" + # namespace: openshift-etcd # matchNode: true # endpoints: # - url: https://localhost:9979 @@ -317,6 +317,14 @@ controlPlane: insecureSkipVerify: true auth: type: bearer + - selector: "app=openshift-kube-scheduler,scheduler=true" + namespace: openshift-kube-scheduler + matchNode: true + endpoints: + - url: https://localhost:10259 + insecureSkipVerify: true + auth: + type: bearer - selector: "app=openshift-kube-scheduler,scheduler=true" namespace: kube-system matchNode: true @@ -356,6 +364,14 @@ controlPlane: insecureSkipVerify: true auth: type: bearer + - selector: "app=kube-controller-manager,kube-controller-manager=true" + namespace: openshift-kube-controller-manager + matchNode: true + endpoints: + - url: https://localhost:10257 + insecureSkipVerify: true + auth: + type: bearer - selector: "app=kube-controller-manager,kube-controller-manager=true" namespace: kube-system matchNode: true @@ -364,9 +380,6 @@ controlPlane: insecureSkipVerify: true auth: type: bearer - # mtls: - # secretName: secret-name - # secretNamespace: secret-namespace - selector: "app=controller-manager,controller-manager=true" namespace: kube-system matchNode: true @@ -375,6 +388,9 @@ controlPlane: insecureSkipVerify: true auth: type: bearer + # mtls: + # secretName: secret-name + # secretNamespace: secret-namespace # -- staticEndpoint configuration. # It is possible to specify static endpoint to scrape. If specified 'autodiscover' section is ignored. # If set the static endpoint should be reachable, otherwise an error will be returned and the integration stops. @@ -413,6 +429,18 @@ controlPlane: auth: type: bearer - url: http://localhost:8080 + - selector: "app=openshift-kube-apiserver,apiserver=true" + namespace: openshift-kube-apiserver + matchNode: true + endpoints: + - url: https://localhost:8443 + insecureSkipVerify: true + auth: + type: bearer + - url: https://localhost:6443 + insecureSkipVerify: true + auth: + type: bearer - selector: "app=openshift-kube-apiserver,apiserver=true" namespace: kube-system matchNode: true diff --git a/src/controlplane/scraper.go b/src/controlplane/scraper.go index bceb91450..213b1d437 100644 --- a/src/controlplane/scraper.go +++ b/src/controlplane/scraper.go @@ -233,7 +233,7 @@ func (s *Scraper) autodiscover(c component) (*scrape.Job, error) { for _, autodiscover := range c.AutodiscoverConfigs { pod, err := s.podDiscoverer.Discover(autodiscover) if errors.Is(err, discoverer.ErrPodNotFound) { - s.logger.Debugf("No pod found for %q with labels %q", c.Name, autodiscover.Selector) + s.logger.Debugf("No pod found for %q with labels %q in namespace %q", c.Name, autodiscover.Selector, autodiscover.Namespace) continue } diff --git a/src/metric/definition.go b/src/metric/definition.go index d23108634..995a9749a 100644 --- a/src/metric/definition.go +++ b/src/metric/definition.go @@ -1017,14 +1017,15 @@ var KubeletSpecs = definition.SpecGroups{ // /metrics/cadvisor endpoint {Name: "containerID", ValueFunc: definition.FromRaw("containerID"), Type: sdkMetric.ATTRIBUTE}, {Name: "containerImageID", ValueFunc: definition.FromRaw("containerImageID"), Type: sdkMetric.ATTRIBUTE}, + {Name: "containerMemoryMappedFileBytes", ValueFunc: definition.FromRaw("container_memory_mapped_file"), Type: sdkMetric.GAUGE, Optional: true}, + {Name: "containerOOMEventsDelta", ValueFunc: definition.FromRaw("container_oom_events_total"), Type: sdkMetric.PDELTA, Optional: true}, + // In openshift (and possibly in other environments) these metrics were missing at first for pods that were not throttled. {Name: "containerCpuCfsPeriodsDelta", ValueFunc: definition.FromRaw("container_cpu_cfs_periods_total"), Type: sdkMetric.DELTA, Optional: true}, {Name: "containerCpuCfsThrottledPeriodsDelta", ValueFunc: definition.FromRaw("container_cpu_cfs_throttled_periods_total"), Type: sdkMetric.DELTA, Optional: true}, {Name: "containerCpuCfsThrottledSecondsDelta", ValueFunc: definition.FromRaw("container_cpu_cfs_throttled_seconds_total"), Type: sdkMetric.DELTA, Optional: true}, {Name: "containerCpuCfsPeriodsTotal", ValueFunc: definition.FromRaw("container_cpu_cfs_periods_total"), Type: sdkMetric.GAUGE, Optional: true}, {Name: "containerCpuCfsThrottledPeriodsTotal", ValueFunc: definition.FromRaw("container_cpu_cfs_throttled_periods_total"), Type: sdkMetric.GAUGE, Optional: true}, {Name: "containerCpuCfsThrottledSecondsTotal", ValueFunc: definition.FromRaw("container_cpu_cfs_throttled_seconds_total"), Type: sdkMetric.GAUGE, Optional: true}, - {Name: "containerMemoryMappedFileBytes", ValueFunc: definition.FromRaw("container_memory_mapped_file"), Type: sdkMetric.GAUGE, Optional: true}, - {Name: "containerOOMEventsDelta", ValueFunc: definition.FromRaw("container_oom_events_total"), Type: sdkMetric.PDELTA, Optional: true}, // /pods endpoint {Name: "containerName", ValueFunc: definition.FromRaw("containerName"), Type: sdkMetric.ATTRIBUTE},