Skip to content

Commit

Permalink
chore: adjust docs
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <[email protected]>
  • Loading branch information
csatib02 committed Jan 17, 2025
1 parent d2b4ff8 commit 8a51377
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 50 deletions.
2 changes: 1 addition & 1 deletion api/telemetry/v1alpha1/output_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type Endpoint struct {
// Controls whether to validate the tcp address.
// Turning this ON may result in the collector failing to start if it came up faster then the endpoint.
// default is false.
ValidateTCPResolution bool `json:"validate_tcp_resolution"`
ValidateTCPResolution bool `json:"validate_tcp_resolution,omitempty"`
}

type KubernetesMetadata struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ spec:
type: boolean
required:
- tcp_addr
- validate_tcp_resolution
type: object
kubernetes_metadata:
properties:
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/telemetry.kube-logging.dev_outputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ spec:
type: boolean
required:
- tcp_addr
- validate_tcp_resolution
type: object
kubernetes_metadata:
properties:
Expand Down
25 changes: 16 additions & 9 deletions docs/demos/loki/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ spec:
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: loki
namespace: collector
name: loki-1
namespace: tenant-demo-1
spec:
otlphttp:
endpoint: http://loki.loki.svc.cluster.local:3100/otlp/
tls:
insecure: true
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: loki-2
namespace: tenant-demo-2
spec:
otlphttp:
endpoint: http://loki.loki.svc.cluster.local:3100/otlp/
Expand Down Expand Up @@ -62,9 +73,7 @@ spec:
condition: "true"
outputs:
- name: loki
namespace: collector
- name: openobserve-1
namespace: collector
namespace: tenant-demo-1
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Tenant
Expand All @@ -88,7 +97,5 @@ metadata:
spec:
condition: "true"
outputs:
- name: loki
namespace: collector
- name: openobserve-2
namespace: collector
- name: loki-2
namespace: tenant-demo-2
15 changes: 2 additions & 13 deletions docs/demos/openobserve/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,13 @@ spec:
condition: "true"
outputs:
- name: otlp-openobserve
namespace: collector
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Subscription
metadata:
name: subscription-sample-2
namespace: example-tenant-ns
spec:
condition: "true"
outputs:
- name: otlp-openobserve
namespace: collector
namespace: example-tenant-ns
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-openobserve
namespace: collector
namespace: example-tenant-ns
spec:
otlp:
endpoint: openobserve-otlp-grpc.openobserve.svc.cluster.local:5081
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/fluent-forward/telemetry-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ metadata:
namespace: default
spec:
fluentforward:
endpoint: all-to-file-fluentd.default:24240
endpoint:
tcp_addr: all-to-file-fluentd.default:24240
tag: otelcol
kubernetes_metadata:
key: kubernetes
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/simple-demo-with-secretref/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ spec:
condition: "true"
outputs:
- name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns
---
apiVersion: v1
kind: Secret
metadata:
name: otlp-test-output-1-basicauth-token-secret
namespace: collector
namespace: example-tenant-ns
type: Opaque
data:
username: dXNlcg== # user
Expand All @@ -60,13 +60,13 @@ apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns
spec:
authentication:
basicauth:
secretRef:
name: otlp-test-output-1-basicauth-token-secret
namespace: collector
namespace: example-tenant-ns
otlp:
endpoint: receiver-otelcol-collector.receiver.svc.cluster.local:4317
tls:
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/simple-demo/one_tenant_two_subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
condition: "true"
outputs:
- name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Subscription
Expand All @@ -54,13 +54,13 @@ spec:
condition: "true"
outputs:
- name: otlp-test-output-2
namespace: collector
namespace: example-tenant-ns
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns
spec:
otlp:
endpoint: openobserve-otlp-grpc.openobserve.svc.cluster.local:5081
Expand All @@ -75,7 +75,7 @@ apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-test-output-2
namespace: collector
namespace: example-tenant-ns
spec:
otlp:
endpoint: openobserve-otlp-grpc.openobserve.svc.cluster.local:5081
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/two_tenants_one_subscription_each.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
condition: "true"
outputs:
- name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns-1
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Subscription
Expand All @@ -85,13 +85,13 @@ spec:
condition: "true"
outputs:
- name: otlp-test-output-2
namespace: collector
namespace: example-tenant-ns-2
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-test-output-1
namespace: collector
namespace: example-tenant-ns-1
spec:
otlp:
endpoint: receiver-collector.example-tenant-ns.svc.cluster.local:4317
Expand All @@ -102,7 +102,7 @@ apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: otlp-test-output-2
namespace: collector
namespace: example-tenant-ns-2
spec:
otlp:
endpoint: receiver-collector.example-tenant-ns.svc.cluster.local:4317
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ exporters:
fluentforwardexporter/collector_fluentforward-test-output:
endpoint:
tcp_addr: fluentd.example-tenant-b-ns.svc.cluster.local:24224
validate_tcp_resolution: false
retry_on_failure:
enabled: true
max_elapsed_time: 0
Expand Down Expand Up @@ -94,14 +93,14 @@ exporters:
tls:
insecure: true
otlp/collector_otlp-test-output-3:
endpoint: "receiver-collector.example-tenant-b-ns.svc.cluster.local:4317"
endpoint: receiver-collector.example-tenant-b-ns.svc.cluster.local:4317
retry_on_failure:
enabled: true
max_elapsed_time: 0.0
max_elapsed_time: 0
sending_queue:
enabled: true
queue_size: 100.0
storage: "file_storage/example-tenant-b"
queue_size: 100
storage: file_storage/example-tenant-b
tls:
insecure: true
otlphttp/collector_loki-test-output:
Expand Down Expand Up @@ -149,9 +148,9 @@ processors:
value: otlp/collector_otlp-test-output-2
attributes/exporter_name_otlp-test-output-3:
actions:
- action: "insert"
key: "exporter"
value: "otlp/collector_otlp-test-output-3"
- action: insert
key: exporter
value: otlp/collector_otlp-test-output-3
attributes/metricattributes:
actions:
- action: insert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func TestGenerateFluentforwardExporters(t *testing.T) {
expectedResult: map[string]any{
"fluentforwardexporter/default_output1": map[string]any{
"endpoint": map[string]any{
"tcp_addr": "http://example.com",
"validate_tcp_resolution": false,
"tcp_addr": "http://example.com",
},
"sending_queue": map[string]any{
"enabled": true,
Expand Down Expand Up @@ -211,8 +210,7 @@ func TestGenerateFluentforwardExporters(t *testing.T) {
expectedResult: map[string]any{
"fluentforwardexporter/default_output2": map[string]any{
"endpoint": map[string]any{
"tcp_addr": "http://example.com",
"validate_tcp_resolution": false,
"tcp_addr": "http://example.com",
},
"connection_timeout": "30s",
"shared_key": "shared-key",
Expand Down

0 comments on commit 8a51377

Please sign in to comment.