Skip to content

Commit

Permalink
Generate only TargetAllocator CR from Collector CR (#3402)
Browse files Browse the repository at this point in the history
This is hidden behind a feature flag. Nothing changes by default.
  • Loading branch information
swiatekm authored Oct 30, 2024
1 parent 8adc2f5 commit 49ca805
Show file tree
Hide file tree
Showing 17 changed files with 2,278 additions and 112 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
- group: e2e-native-sidecar
setup: "add-operator-arg OPERATOR_ARG='--feature-gates=operator.sidecarcontainers.native' prepare-e2e"
kube-version: "1.29"
- group: e2e-targetallocator
setup: "enable-targetallocator-cr prepare-e2e"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ add-rbac-permissions-to-operator: manifests kustomize
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/rbac.yaml
cd config/rbac && $(KUSTOMIZE) edit add patch --kind ClusterRole --name manager-role --path extra-permissions-operator/replicaset.yaml

.PHONY: enable-targetallocator-cr
enable-targetallocator-cr:
@$(MAKE) add-operator-arg OPERATOR_ARG='--feature-gates=operator.collector.targetallocatorcr'
cd config/crd && $(KUSTOMIZE) edit add resource bases/opentelemetry.io_targetallocators.yaml

# Deploy controller in the current Kubernetes context, configured in ~/.kube/config
.PHONY: deploy
deploy: set-image-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
categories: Logging & Tracing,Monitoring
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2024-10-29T11:05:37Z"
createdAt: "2024-10-30T17:23:26Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -389,6 +389,7 @@ spec:
- opentelemetry.io
resources:
- opampbridges
- targetallocators
verbs:
- create
- delete
Expand All @@ -409,6 +410,7 @@ spec:
- opampbridges/status
- opentelemetrycollectors/finalizers
- opentelemetrycollectors/status
- targetallocators/status
verbs:
- get
- patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
categories: Logging & Tracing,Monitoring
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2024-10-29T11:05:47Z"
createdAt: "2024-10-30T17:23:26Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -389,6 +389,7 @@ spec:
- opentelemetry.io
resources:
- opampbridges
- targetallocators
verbs:
- create
- delete
Expand All @@ -409,6 +410,7 @@ spec:
- opampbridges/status
- opentelemetrycollectors/finalizers
- opentelemetrycollectors/status
- targetallocators/status
verbs:
- get
- patch
Expand Down
2 changes: 2 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ rules:
- opentelemetry.io
resources:
- opampbridges
- targetallocators
verbs:
- create
- delete
Expand All @@ -155,6 +156,7 @@ rules:
- opampbridges/status
- opentelemetrycollectors/finalizers
- opentelemetrycollectors/status
- targetallocators/status
verbs:
- get
- patch
Expand Down
Loading

0 comments on commit 49ca805

Please sign in to comment.