|
1 | 1 | # Current Operator version
|
2 |
| -VERSION ?= "$(shell git describe --tags | sed 's/^v//')" |
| 2 | +VERSION ?= $(shell git describe --tags | sed 's/^v//') |
3 | 3 | VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
|
4 | 4 | VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version"
|
5 | 5 | OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')"
|
6 | 6 | OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator= | awk -F= '{print $$2}')"
|
7 |
| -TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" |
| 7 | +TARGETALLOCATOR_VERSION ?= $(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}') |
8 | 8 | OPERATOR_OPAMP_BRIDGE_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator-opamp-bridge | awk -F= '{print $$2}')"
|
9 | 9 | AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')"
|
10 | 10 | AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')"
|
@@ -143,6 +143,23 @@ uninstall: manifests kustomize
|
143 | 143 | set-image-controller: manifests kustomize
|
144 | 144 | cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
|
145 | 145 |
|
| 146 | +.PHONY: add-operator-arg |
| 147 | +add-operator-arg: PATCH = [{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"$(OPERATOR_ARG)"}] |
| 148 | +add-operator-arg: manifests kustomize |
| 149 | + cd config/manager && $(KUSTOMIZE) edit add patch --kind Deployment --patch '$(PATCH)' |
| 150 | + |
| 151 | +.PHONY: add-image-targetallocator |
| 152 | +add-image-targetallocator: |
| 153 | + @$(MAKE) add-operator-arg OPERATOR_ARG=--target-allocator-image=$(TARGETALLOCATOR_IMG) |
| 154 | + |
| 155 | +.PHONY: add-image-opampbridge |
| 156 | +add-image-opampbridge: |
| 157 | + @$(MAKE) add-operator-arg OPERATOR_ARG=--operator-opamp-bridge-image=$(OPERATOROPAMPBRIDGE_IMG) |
| 158 | + |
| 159 | +.PHONY: enable-operator-featuregates |
| 160 | +enable-operator-featuregates: OPERATOR_ARG = --feature-gates=$(FEATUREGATES) |
| 161 | +enable-operator-featuregates: add-operator-arg |
| 162 | + |
146 | 163 | # Deploy controller in the current Kubernetes context, configured in ~/.kube/config
|
147 | 164 | .PHONY: deploy
|
148 | 165 | deploy: set-image-controller
|
@@ -239,13 +256,10 @@ e2e-opampbridge:
|
239 | 256 | $(KUTTL) test --config kuttl-test-opampbridge.yaml
|
240 | 257 |
|
241 | 258 | .PHONY: prepare-e2e
|
242 |
| -prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server install-targetallocator-prometheus-crds load-image-all deploy |
243 |
| - TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOROPAMPBRIDGE_IMG=$(OPERATOROPAMPBRIDGE_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh |
244 |
| - |
245 |
| -.PHONY: enable-prometheus-feature-flag |
246 |
| -enable-prometheus-feature-flag: |
247 |
| - $(SED) -i "s#--feature-gates=+operator.autoinstrumentation.go#--feature-gates=+operator.autoinstrumentation.go,+operator.observability.prometheus#g" config/default/manager_auth_proxy_patch.yaml |
| 259 | +prepare-e2e: kuttl set-image-controller add-image-targetallocator add-image-opampbridge container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server install-targetallocator-prometheus-crds load-image-all deploy |
248 | 260 |
|
| 261 | +.PHONY: prepare-e2e-with-featuregates |
| 262 | +prepare-e2e-with-featuregates: kuttl enable-operator-featuregates prepare-e2e |
249 | 263 |
|
250 | 264 | .PHONY: scorecard-tests
|
251 | 265 | scorecard-tests: operator-sdk
|
@@ -281,7 +295,7 @@ container-operator-opamp-bridge: operator-opamp-bridge
|
281 | 295 | .PHONY: start-kind
|
282 | 296 | start-kind:
|
283 | 297 | ifeq (true,$(START_KIND_CLUSTER))
|
284 |
| - kind create cluster --name $(KIND_CLUSTER_NAME) --config $(KIND_CONFIG) |
| 298 | + kind create cluster --name $(KIND_CLUSTER_NAME) --config $(KIND_CONFIG) || true |
285 | 299 | endif
|
286 | 300 |
|
287 | 301 | .PHONY: install-metrics-server
|
@@ -456,7 +470,6 @@ reset: kustomize operator-sdk manifests
|
456 | 470 | $(OPERATOR_SDK) bundle validate ./bundle
|
457 | 471 | ./hack/ignore-createdAt-bundle.sh
|
458 | 472 | git checkout config/manager/kustomization.yaml
|
459 |
| - OPERATOR_IMG=local/opentelemetry-operator:e2e TARGETALLOCATOR_IMG=local/opentelemetry-operator-targetallocator:e2e OPERATOROPAMPBRIDGE_IMG=local/opentelemetry-operator-opamp-bridge:e2e DEFAULT_OPERATOR_IMG=$(IMG) DEFAULT_TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) DEFAULT_OPERATOROPAMPBRIDGE_IMG=$(OPERATOROPAMPBRIDGE_IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh |
460 | 473 |
|
461 | 474 | # Build the bundle image, used only for local dev purposes
|
462 | 475 | .PHONY: bundle-build
|
|
0 commit comments