-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[collector] Provide alternateConfig option for use in subcharts to wo…
…rkaround null issue (#1301) * Allow alternate blank config * Fix template for older helm versions * remove debug template * Update values.yaml Co-authored-by: Dmitrii Anoshin <[email protected]> * bump version --------- Co-authored-by: Dmitrii Anoshin <[email protected]> Co-authored-by: Jared Tan <[email protected]>
- Loading branch information
1 parent
b39f601
commit b8d11b6
Showing
65 changed files
with
440 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
charts/opentelemetry-collector/examples/alternate-config/rendered/clusterrole.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/clusterrole.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: example-opentelemetry-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods", "namespaces"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: ["apps"] | ||
resources: ["replicasets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: ["replicasets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events", "namespaces", "namespaces/status", "nodes", "nodes/spec", "pods", "pods/status", "replicationcontrollers", "replicationcontrollers/status", "resourcequotas", "services" ] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: ["daemonsets", "deployments", "replicasets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["batch"] | ||
resources: ["jobs", "cronjobs"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["autoscaling"] | ||
resources: ["horizontalpodautoscalers"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["events.k8s.io"] | ||
resources: ["events"] | ||
verbs: ["watch", "list"] |
21 changes: 21 additions & 0 deletions
21
charts/opentelemetry-collector/examples/alternate-config/rendered/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/clusterrolebinding.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: example-opentelemetry-collector | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: example-opentelemetry-collector | ||
subjects: | ||
- kind: ServiceAccount | ||
name: example-opentelemetry-collector | ||
namespace: default |
68 changes: 68 additions & 0 deletions
68
charts/opentelemetry-collector/examples/alternate-config/rendered/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example-opentelemetry-collector | ||
namespace: default | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
data: | ||
relay: | | ||
exporters: | ||
debug: {} | ||
processors: | ||
k8sattributes: | ||
extract: | ||
metadata: | ||
- k8s.namespace.name | ||
- k8s.deployment.name | ||
- k8s.statefulset.name | ||
- k8s.daemonset.name | ||
- k8s.cronjob.name | ||
- k8s.job.name | ||
- k8s.node.name | ||
- k8s.pod.name | ||
- k8s.pod.uid | ||
- k8s.pod.start_time | ||
passthrough: false | ||
pod_association: | ||
- sources: | ||
- from: resource_attribute | ||
name: k8s.pod.ip | ||
- sources: | ||
- from: resource_attribute | ||
name: k8s.pod.uid | ||
- sources: | ||
- from: connection | ||
receivers: | ||
k8s_cluster: | ||
collection_interval: 10s | ||
k8sobjects: | ||
objects: | ||
- exclude_watch_type: | ||
- DELETED | ||
group: events.k8s.io | ||
mode: watch | ||
name: events | ||
service: | ||
pipelines: | ||
logs: | ||
exporters: | ||
- debug | ||
processors: | ||
- k8sattributes | ||
receivers: | ||
- k8sobjects | ||
metrics: | ||
exporters: | ||
- debug | ||
processors: | ||
- k8sattributes | ||
receivers: | ||
- k8s_cluster |
100 changes: 100 additions & 0 deletions
100
charts/opentelemetry-collector/examples/alternate-config/rendered/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: example-opentelemetry-collector | ||
namespace: default | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
component: standalone-collector | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config: b9ee8f766c36fa6c45f49fdc4a2d4107c8afcd5faf20ab829f12b54d12dde201 | ||
|
||
labels: | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
component: standalone-collector | ||
|
||
spec: | ||
|
||
serviceAccountName: example-opentelemetry-collector | ||
securityContext: | ||
{} | ||
containers: | ||
- name: opentelemetry-collector | ||
command: | ||
- /otelcol-k8s | ||
args: | ||
- --config=/conf/relay.yaml | ||
securityContext: | ||
{} | ||
image: "otel/opentelemetry-collector-k8s:0.108.0" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
|
||
- name: jaeger-compact | ||
containerPort: 6831 | ||
protocol: UDP | ||
- name: jaeger-grpc | ||
containerPort: 14250 | ||
protocol: TCP | ||
- name: jaeger-thrift | ||
containerPort: 14268 | ||
protocol: TCP | ||
- name: otlp | ||
containerPort: 4317 | ||
protocol: TCP | ||
- name: otlp-http | ||
containerPort: 4318 | ||
protocol: TCP | ||
- name: zipkin | ||
containerPort: 9411 | ||
protocol: TCP | ||
env: | ||
- name: MY_POD_IP | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: status.podIP | ||
- name: GOMEMLIMIT | ||
value: "3276MiB" | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 13133 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 13133 | ||
resources: | ||
limits: | ||
cpu: 2 | ||
memory: 4Gi | ||
volumeMounts: | ||
- mountPath: /conf | ||
name: opentelemetry-collector-configmap | ||
volumes: | ||
- name: opentelemetry-collector-configmap | ||
configMap: | ||
name: example-opentelemetry-collector | ||
items: | ||
- key: relay | ||
path: relay.yaml | ||
hostNetwork: false |
49 changes: 49 additions & 0 deletions
49
charts/opentelemetry-collector/examples/alternate-config/rendered/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: example-opentelemetry-collector | ||
namespace: default | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm | ||
|
||
component: standalone-collector | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
|
||
- name: jaeger-compact | ||
port: 6831 | ||
targetPort: 6831 | ||
protocol: UDP | ||
- name: jaeger-grpc | ||
port: 14250 | ||
targetPort: 14250 | ||
protocol: TCP | ||
- name: jaeger-thrift | ||
port: 14268 | ||
targetPort: 14268 | ||
protocol: TCP | ||
- name: otlp | ||
port: 4317 | ||
targetPort: 4317 | ||
protocol: TCP | ||
appProtocol: grpc | ||
- name: otlp-http | ||
port: 4318 | ||
targetPort: 4318 | ||
protocol: TCP | ||
- name: zipkin | ||
port: 9411 | ||
targetPort: 9411 | ||
protocol: TCP | ||
selector: | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
component: standalone-collector | ||
internalTrafficPolicy: Cluster |
13 changes: 13 additions & 0 deletions
13
charts/opentelemetry-collector/examples/alternate-config/rendered/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
# Source: opentelemetry-collector/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: example-opentelemetry-collector | ||
namespace: default | ||
labels: | ||
helm.sh/chart: opentelemetry-collector-0.104.0 | ||
app.kubernetes.io/name: opentelemetry-collector | ||
app.kubernetes.io/instance: example | ||
app.kubernetes.io/version: "0.108.0" | ||
app.kubernetes.io/managed-by: Helm |
34 changes: 34 additions & 0 deletions
34
charts/opentelemetry-collector/examples/alternate-config/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
mode: deployment | ||
|
||
image: | ||
repository: "otel/opentelemetry-collector-k8s" | ||
|
||
command: | ||
name: "otelcol-k8s" | ||
|
||
replicaCount: 1 | ||
|
||
resources: | ||
limits: | ||
cpu: 2 | ||
memory: 4Gi | ||
|
||
presets: | ||
clusterMetrics: | ||
enabled: true | ||
kubernetesAttributes: | ||
enabled: true | ||
kubernetesEvents: | ||
enabled: true | ||
|
||
alternateConfig: | ||
exporters: | ||
debug: {} | ||
service: | ||
pipelines: | ||
logs: | ||
exporters: | ||
- debug | ||
metrics: | ||
exporters: | ||
- debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.