diff --git a/charts/openobserve-collector/templates/clusterrole.yaml b/charts/openobserve-collector/templates/clusterrole.yaml index e427d1f..1346d3d 100644 --- a/charts/openobserve-collector/templates/clusterrole.yaml +++ b/charts/openobserve-collector/templates/clusterrole.yaml @@ -68,4 +68,11 @@ rules: resources: - events verbs: ["get", "list", "watch"] +{{- if .Values.rbac.extraRules }} +{{- range .Values.rbac.extraRules }} +- apiGroups: {{ .apiGroups | toJson }} + resources: {{ .resources | toJson }} + verbs: {{ .verbs | toJson }} +{{- end }} +{{- end }} {{- end }} diff --git a/charts/openobserve-collector/values.yaml b/charts/openobserve-collector/values.yaml index 43629d5..9e29c89 100644 --- a/charts/openobserve-collector/values.yaml +++ b/charts/openobserve-collector/values.yaml @@ -37,6 +37,17 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +# If additional RBAC rules are needed for the collector, they can be added here +# Example use case: To allow the collector to access the custom resources from the third-party API groups +rbac: {} +# rbac: +# extraRules: +# - apiGroups: ["thirdparty.api.group"] +# resources: ["customresourcename"] +# verbs: ["get", "list", "watch"] + +labels: {} + # If Opentelemetry operator should be installed with the chart. If you already have the operator installed, set enabled to false. Refer https://opentelemetry.io/docs/kubernetes/operator/ and https://opentelemetry.io/docs/kubernetes/helm/operator/ opentelemetry-operator: enabled: false @@ -80,6 +91,18 @@ agent: # cpu: 100m # memory: 128Mi receivers: + otlp: + protocols: + grpc: {} + http: {} + prometheus: + config: + scrape_configs: + - job_name: "otel-collector" + scrape_interval: 5s + static_configs: + - targets: ["0.0.0.0:8888"] + filelog/std: include: [/var/log/pods/*/*/*.log] exclude: