Skip to content

Commit

Permalink
feat: Add overrides for excludeTargets and includeTargets
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-justindaines committed Oct 2, 2024
1 parent 74bbf39 commit 6e46d08
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.tgz
demo
.kubeconfig

.idea

#terraform
integration/.terraform
Expand Down
2 changes: 1 addition & 1 deletion charts/events/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: events
description: Observe kubernetes event collection
type: application
version: 0.1.26
version: 0.2.0
appVersion: v0.11.1
dependencies:
- name: endpoint
Expand Down
4 changes: 3 additions & 1 deletion charts/events/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# events

![Version: 0.1.26](https://img.shields.io/badge/Version-0.1.26-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.11.1](https://img.shields.io/badge/AppVersion-v0.11.1-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.11.1](https://img.shields.io/badge/AppVersion-v0.11.1-informational?style=flat-square)

Observe kubernetes event collection

Expand All @@ -22,6 +22,8 @@ Observe kubernetes event collection
|-----|------|---------|-------------|
| affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].key | string | `"observeinc.com/unschedulable"` | |
| affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].operator | string | `"DoesNotExist"` | |
| containerOverrides.excludeTargets | object | `{}` | |
| containerOverrides.includeTargets | object | `{}` | |
| customLabels | object | `{}` | |
| global.observe | object | `{}` | |
| image.kube_cluster_info.pullPolicy | string | `"Always"` | |
Expand Down
13 changes: 13 additions & 0 deletions charts/events/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ spec:
image: {{ .Values.image.kube_state_events.repository }}:{{ default .Chart.AppVersion .Values.image.kube_state_events.tag }}
imagePullPolicy: {{ .Values.image.kube_state_events.pullPolicy }}
args:
# Include excludeTags if defined
{{- if .Values.containerOverrides.excludeTargets }}
{{- range .Values.containerOverrides.excludeTargets }}
- -exclude-target={{ . }}
{{- end }}
{{- end }}
# Include includeTags if defined
{{- if .Values.containerOverrides.includeTargets }}
{{- range .Values.containerOverrides.includeTargets }}
- -include-target={{ . }}
{{- end }}
{{- end }}
- -healthz-addr=:5171
- -metrics-addr=:9090
- -o={{ include "observe.collectionEndpointWithToken" . }}/v1/http/kubernetes/events?clusterUid=$(OBSERVE_CLUSTER)
Expand All @@ -55,6 +67,7 @@ spec:
- autoscaling/v1
- batch/v1
- networking.k8s.io/v1

ports:
- containerPort: 5171
- containerPort: 9090
Expand Down
6 changes: 6 additions & 0 deletions charts/events/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ serviceAccount:
annotations: {}
name:

# Override exclude or include resources matching pattern from being watched. View resources with `kubectl api-resources`
# Does not work for "Core" APIs. Values must be in format <group>/<version>/<resource>. example "events.k8s.io/v1/events"
containerOverrides:
excludeTargets: {}
includeTargets: {}

resources:
limits:
cpu: 50m
Expand Down
6 changes: 3 additions & 3 deletions charts/stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ dependencies:
version: 0.3.25
- name: events
repository: file://../events
version: 0.1.26
version: 0.2.0
- name: proxy
repository: file://../proxy
version: 0.1.8
- name: traces
repository: file://../traces
version: 1.0.6
digest: sha256:0b0eeefbe2ee2ca0698adccdfe5e306976365ced30fe1da7cf83ed4bfb6d3572
generated: "2024-09-23T14:41:25.299168-07:00"
digest: sha256:6df6b041f08a4cbf0c1c4b6100adb097531bcb721f2802b8fa37a2b3ae83f7cf
generated: "2024-10-02T16:27:16.536402-04:00"
4 changes: 2 additions & 2 deletions charts/stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: stack
description: Observe Kubernetes agent stack
type: application
version: 1.0.6
version: 1.1.0
dependencies:
- name: logs
version: 0.1.33
Expand All @@ -13,7 +13,7 @@ dependencies:
repository: file://../metrics
condition: metrics.enabled
- name: events
version: 0.1.26
version: 0.2.0
repository: file://../events
condition: events.enabled
- name: proxy
Expand Down
4 changes: 2 additions & 2 deletions charts/stack/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# stack

![Version: 1.0.6](https://img.shields.io/badge/Version-1.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Observe Kubernetes agent stack

Expand All @@ -14,7 +14,7 @@ Observe Kubernetes agent stack

| Repository | Name | Version |
|------------|------|---------|
| file://../events | events | 0.1.26 |
| file://../events | events | 0.2.0 |
| file://../logs | logs | 0.1.33 |
| file://../metrics | metrics | 0.3.25 |
| file://../proxy | proxy | 0.1.8 |
Expand Down

0 comments on commit 6e46d08

Please sign in to comment.