Skip to content

Commit

Permalink
chore: added e2e tests for extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Ankit152 <[email protected]>
  • Loading branch information
Ankit152 committed Nov 10, 2024
1 parent 07787f4 commit 58a1494
Show file tree
Hide file tree
Showing 4 changed files with 339 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Changes by Version

<!-- next version -->
### 💡 Enhancements 💡

- `ExtensionService`: Support for creating a service for extensions when ports are specified for a given extension.

### Components

* [OpenTelemetry Collector - v0.112.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.112.0)
* [OpenTelemetry Contrib - v0.112.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.112.0)
* [Java auto-instrumentation - v1.33.5](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.33.5)
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.53.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.53.0)
* [Python - v0.48b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.48b0)
* [Go - v0.15.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.15.0-alpha)
* [ApacheHTTPD - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
* [Nginx - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)

## 0.113.0

Expand Down
277 changes: 277 additions & 0 deletions tests/e2e/extension/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
apiVersion: v1
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
name: jaeger-inmemory-v1beta1-snap-collector
namespace: default
ownerReferences:
- apiVersion: opentelemetry.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: OpenTelemetryCollector
name: jaeger-inmemory
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory-v1beta1-snap
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
spec:
containers:
- args:
- --config=/conf/collector.yaml
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: jaegertracing/jaeger-snapshot:latest
imagePullPolicy: Always
name: otc-container
ports:
- containerPort: 16686
name: jaeger
protocol: TCP
- containerPort: 8888
name: metrics
protocol: TCP
- containerPort: 4317
name: otlp-grpc
protocol: TCP
- containerPort: 4318
name: otlp-http
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /conf
name: otc-internal
dnsConfig: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: jaeger-inmemory-collector
serviceAccountName: jaeger-inmemory-collector
shareProcessNamespace: false
terminationGracePeriodSeconds: 30
kind: List
metadata:
resourceVersion: ""
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
name: jaeger-inmemory-collector
namespace: default
ownerReferences:
- apiVersion: opentelemetry.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: OpenTelemetryCollector
name: jaeger-inmemory
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
operator.opentelemetry.io/collector-service-type: base
name: jaeger-inmemory-collector
namespace: default
ownerReferences:
- apiVersion: opentelemetry.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: OpenTelemetryCollector
name: jaeger-inmemory
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: jaeger
port: 16686
protocol: TCP
targetPort: 16686
- appProtocol: grpc
name: otlp-grpc
port: 4317
protocol: TCP
targetPort: 4317
- appProtocol: http
name: otlp-http
port: 4318
protocol: TCP
targetPort: 4318
selector:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: jaeger-inmemory-collector-headless-tls
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
operator.opentelemetry.io/collector-headless-service: Exists
operator.opentelemetry.io/collector-service-type: headless
name: jaeger-inmemory-collector-headless
namespace: default
ownerReferences:
- apiVersion: opentelemetry.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: OpenTelemetryCollector
name: jaeger-inmemory
spec:
clusterIP: None
clusterIPs:
- None
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: jaeger
port: 16686
protocol: TCP
targetPort: 16686
- appProtocol: grpc
name: otlp-grpc
port: 4317
protocol: TCP
targetPort: 4317
- appProtocol: http
name: otlp-http
port: 4318
protocol: TCP
targetPort: 4318
selector:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: jaeger-inmemory-collector-monitoring
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
operator.opentelemetry.io/collector-monitoring-service: Exists
operator.opentelemetry.io/collector-service-type: monitoring
name: jaeger-inmemory-collector-monitoring
namespace: default
ownerReferences:
- apiVersion: opentelemetry.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: OpenTelemetryCollector
name: jaeger-inmemory
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: monitoring
port: 8888
protocol: TCP
targetPort: 8888
selector:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
app.kubernetes.io/version: latest
operator.opentelemetry.io/collector-extension-service: Exists
operator.opentelemetry.io/collector-service-type: extension
spec:
selector:
app.kubernetes.io/component: opentelemetry-collector
app.kubernetes.io/instance: default.jaeger-inmemory
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/part-of: opentelemetry
status:
loadBalancer: {}
33 changes: 33 additions & 0 deletions tests/e2e/extension/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: jaeger-instance
spec:
image: jaegertracing/jaeger-snapshot:latest
ports:
- name: jaeger
port: 16686
config:
service:
extensions: [jaeger_storage, jaeger_query]
pipelines:
traces:
receivers: [otlp]
exporters: [jaeger_storage_exporter]
extensions:
jaeger_query:
storage:
traces: memstore
jaeger_storage:
backends:
memstore:
memory:
max_traces: 100000
receivers:
otlp:
protocols:
grpc:
http:
exporters:
jaeger_storage_exporter:
trace_storage: memstore
14 changes: 14 additions & 0 deletions tests/e2e/extension/chainsaw-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: env-vars
spec:
steps:
- name: step-00
try:
- apply:
file: 00-install.yaml
- assert:
file: 00-assert.yaml

0 comments on commit 58a1494

Please sign in to comment.